示例#1
0
        async Task OnDeactivate(RevaleeRequestException exception)
        {
            //Trace.TraceError("A Revalee recurring task could not be scheduled.");

            if (_currentState.TransitionToInactive())
            {
                await Start();

                _option?.TaskEvent.Deactivated(new DeactivationEventArgs(exception));
            }
        }
示例#2
0
        protected void OnDeactivate(RevaleeRequestException exception)
        {
            Trace.TraceError("A Revalee recurring task could not be scheduled.");

            if (_CurrentState.TransitionToInactive())
            {
                this.Start();
                EventHandler <DeactivationEventArgs> handler = Deactivated;

                if (handler != null)
                {
                    handler(this, new DeactivationEventArgs(exception));
                }
            }
        }
示例#3
0
        private void OnDeactivate(RevaleeRequestException exception)
        {
            Trace.TraceError("A Revalee recurring task could not be scheduled.");

            if (_CurrentState.TransitionToInactive())
            {
                Task.Factory.StartNew(() =>
                {
                    Thread.Sleep(2000);
                    this.Start();
                });

                Deactivated.Invoke(this, new DeactivationEventArgs(exception));
            }
        }
示例#4
0
 /// <summary>
 /// Creates an instance of the <see cref="T:Revalee.Client.RecurringTasks.DeactivationEventArgs"/> class.
 /// </summary>
 /// <param name="exception">A <see cref="T:Revalee.Client.RevaleeRequestException"/> that is the cause of the deactivation.</param>
 public DeactivationEventArgs(RevaleeRequestException exception)
 {
     this.Exception = exception;
 }
示例#5
0
		/// <summary>
		/// Creates an instance of the <see cref="T:Revalee.Client.RecurringTasks.DeactivationEventArgs"/> class.
		/// </summary>
		/// <param name="exception">A <see cref="T:Revalee.Client.RevaleeRequestException"/> that is the cause of the deactivation.</param>
		public DeactivationEventArgs(RevaleeRequestException exception)
		{
			this.Exception = exception;
		}
示例#6
0
        private void OnDeactivate(RevaleeRequestException exception)
        {
            Trace.TraceError("A Revalee recurring task could not be scheduled.");

            if (_CurrentState.TransitionToInactive())
            {
                Task.Factory.StartNew(() =>
                {
                    Thread.Sleep(2000);
                    this.Start();
                });

                Deactivated.Invoke(this, new DeactivationEventArgs(exception));
            }
        }
示例#7
0
        protected void OnDeactivate(RevaleeRequestException exception)
        {
            Trace.TraceError("A Revalee recurring task could not be scheduled.");

            if (_CurrentState.TransitionToInactive())
            {
                this.Start();
                EventHandler<DeactivationEventArgs> handler = Deactivated;

                if (handler != null)
                {
                    handler(this, new DeactivationEventArgs(exception));
                }
            }
        }