public SuperSampleTask( IScheduledTaskOptions <SuperSampleTask> options, ILogger <SuperSampleTask> logger ) { this.Options = options; this.logger = logger; }
private static IServiceCollection AddService <TScheduledTask>( this IServiceCollection services, IScheduledTaskOptions <TScheduledTask> options ) where TScheduledTask : class, IScheduledTask { if (options != null) { services.AddSingleton <IScheduledTaskOptions <TScheduledTask> >(options); } services.TryAddSingleton <ISchedulerHostedService, SchedulerHostedService>(); return(services.AddSingleton <IScheduledTask, TScheduledTask>()); }
public static IServiceCollection AddScheduledTask <TScheduledTask>( this IServiceCollection services, IScheduledTaskOptions <TScheduledTask> options ) where TScheduledTask : class, IScheduledTask { if (services == null) { throw new ArgumentNullException(nameof(services)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } return(services.AddService <TScheduledTask>(options)); }
public ABaseScheduledtTask(IScheduledTaskOptions options) : base(options) { }