mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 06:00:50 -07:00
17 lines
No EOL
395 B
C#
17 lines
No EOL
395 B
C#
using FluentScheduler;
|
|
using Nancy.TinyIoc;
|
|
|
|
namespace PlexRequests.UI.Jobs
|
|
{
|
|
public class TaskFactory : ITaskFactory
|
|
{
|
|
public ITask GetTaskInstance<T>() where T : ITask
|
|
{
|
|
var container = TinyIoCContainer.Current;
|
|
object outT;
|
|
container.TryResolve(typeof(T), out outT);
|
|
|
|
return (T)outT;
|
|
}
|
|
}
|
|
} |