public void ChangeToDeletedState() { #region DeletedState var client = new BackgroundJobClient(); var jobId = client.Enqueue(() => Console.WriteLine("Hello")); var state = new DeletedState(); client.ChangeState(jobId, state, EnqueuedState.StateName); #endregion }
public void ChangeToEnqueuedState() { var jobId = "someid"; #region EnqueuedState #2 var client = new BackgroundJobClient(); var state = new EnqueuedState(); // Use the default queue client.ChangeState(jobId, state, FailedState.StateName); #endregion }