You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/PlexRequests.UI/Jobs/PlexTaskFactory.cs

23 lines
538 B

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;
}
}
}