mirror of
https://github.com/fergalmoran/SilkierQuartz.git
synced 2025-12-22 09:37:56 +00:00
25 lines
573 B
C#
25 lines
573 B
C#
using Microsoft.Extensions.Options;
|
|
using Quartz;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SampleQuartzHostedService.Jobs
|
|
{
|
|
public class InjectSampleJob : IJob
|
|
{
|
|
InjectProperty _options;
|
|
|
|
public InjectSampleJob(IOptions<InjectProperty> options)
|
|
{
|
|
_options = options.Value;
|
|
}
|
|
public Task Execute(IJobExecutionContext context)
|
|
{
|
|
Console.WriteLine(_options.WriteText);
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|
|
}
|