mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
stuff we did :D
This commit is contained in:
parent
32701d5e84
commit
4cd75cd8aa
29 changed files with 648 additions and 479 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue