1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| public class HangfireService:IHangfireService { public void AddOrUpdate(Expression<Action> methodCall, Func<string> cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate<T>(Expression<Action<T>> methodCall, Func<string> cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate(Expression<Action> methodCall, string cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate<T>(Expression<Action<T>> methodCall, string cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate(Expression<Func<Task>> methodCall, Func<string> cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate<T>(Expression<Func<T, Task>> methodCall, Func<string> cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate(Expression<Func<Task>> methodCall, string cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public void AddOrUpdate<T>(Expression<Func<T, Task>> methodCall, string cronExpression, TimeZoneInfo timeZone = null, string queue = "default") => RecurringJob.AddOrUpdate(methodCall, cronExpression, timeZone, queue);
public bool Delete(string jobId) => BackgroundJob.Delete(jobId);
public bool Delete(string jobId, string fromState) => BackgroundJob.Delete(jobId, fromState);
public string Enqueue(Expression<Func<Task>> methodCall) => BackgroundJob.Enqueue(methodCall);
public string Enqueue<T>(Expression<Action<T>> methodCall) => BackgroundJob.Enqueue(methodCall);
public string Enqueue(Expression<Action> methodCall) => BackgroundJob.Enqueue(methodCall);
public string Enqueue<T>(Expression<Func<T, Task>> methodCall) => BackgroundJob.Enqueue(methodCall);
public bool Requeue(string jobId) => BackgroundJob.Requeue(jobId);
public bool Requeue(string jobId, string fromState) => BackgroundJob.Requeue(jobId, fromState);
public string Schedule(Expression<Action> methodCall, TimeSpan delay) => BackgroundJob.Schedule(methodCall, delay);
public string Schedule(Expression<Func<Task>> methodCall, TimeSpan delay) => BackgroundJob.Schedule(methodCall, delay);
public string Schedule(Expression<Action> methodCall, DateTimeOffset enqueueAt) => BackgroundJob.Schedule(methodCall, enqueueAt);
public string Schedule(Expression<Func<Task>> methodCall, DateTimeOffset enqueueAt) => BackgroundJob.Schedule(methodCall, enqueueAt);
public string Schedule<T>(Expression<Action<T>> methodCall, TimeSpan delay) => BackgroundJob.Schedule(methodCall, delay);
public string Schedule<T>(Expression<Func<T, Task>> methodCall, TimeSpan delay) => BackgroundJob.Schedule(methodCall, delay);
public string Schedule<T>(Expression<Action<T>> methodCall, DateTimeOffset enqueueAt) => BackgroundJob.Schedule(methodCall, enqueueAt);
public string Schedule<T>(Expression<Func<T, Task>> methodCall, DateTimeOffset enqueueAt) => BackgroundJob.Schedule(methodCall, enqueueAt); }
|