Exemplo n.º 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
        }
Exemplo n.º 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
        }