示例#1
0
        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
        }
示例#2
0
        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
        }