mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
First pass at the plex update service
This commit is contained in:
parent
f2819664e7
commit
7636409790
25 changed files with 661 additions and 16 deletions
23
PlexRequests.UI/Jobs/PlexTaskFactory.cs
Normal file
23
PlexRequests.UI/Jobs/PlexTaskFactory.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using FluentScheduler;
|
||||
using Nancy.TinyIoc;
|
||||
|
||||
using PlexRequests.Services;
|
||||
|
||||
namespace PlexRequests.UI.Jobs
|
||||
{
|
||||
public class PlexTaskFactory : ITaskFactory
|
||||
{
|
||||
public ITask GetTaskInstance<T>() where T : ITask
|
||||
{
|
||||
//typeof(AvailabilityUpdateService);
|
||||
var container = TinyIoCContainer.Current;
|
||||
|
||||
var a= container.ResolveAll(typeof(T));
|
||||
|
||||
object outT;
|
||||
container.TryResolve(typeof(T), out outT);
|
||||
|
||||
return (T)outT;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue