mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-26 20:11:49 +02:00
stuff we did :D
This commit is contained in:
@@ -30,12 +30,18 @@ namespace NzbDrone.Api
|
||||
return model.InjectTo<TResource>();
|
||||
}
|
||||
|
||||
protected List<TResource> Apply<TModel>(Func<IEnumerable<TModel>> function) where TModel : ModelBase, new()
|
||||
protected List<TResource> ApplyToList<TModel>(Func<IEnumerable<TModel>> function) where TModel : ModelBase, new()
|
||||
{
|
||||
var modelList = function();
|
||||
return modelList.InjectTo<List<TResource>>();
|
||||
}
|
||||
|
||||
protected TResource Apply<TModel>(Func<TModel> function) where TModel : ModelBase, new()
|
||||
{
|
||||
var modelList = function();
|
||||
return modelList.InjectTo<TResource>();
|
||||
}
|
||||
|
||||
protected TResource Apply<TModel>(Func<int, TModel> action, int id) where TModel : ModelBase, new()
|
||||
{
|
||||
var model = action(id);
|
||||
|
Reference in New Issue
Block a user