HangfireIO / HangfireIO/Hangfire
passing injected parameter
Open
a: core
t: enhancement
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
How can I inject instances in the method similar to CancellationToken ??
```
public class CustomService : ICustomService
{
public static ICustomService Null => null;
}
public interface ICustomService
{
}
public interface ICustomJob
{
void Execute(ICustomJob customToken);
}
public class CustomJob: ICustomJob
{
public void Execute(ICustomService customService)
{
Thread.Sleep(30000);
}
}
RecurringJob.AddOrUpdate(a => a.Execute(CustomService.Null), Cron.Minutely());
```
Contributor guide
Assessment
This issue has not been assessed yet.