示例#1
0
        protected override void State_Changed(SynchronizedStateEventArgs <SupercedableTaskState <TSource, TResult> > args)
        {
            using (SynchronizedStateChange <int> idChange = _currentTaskId.ChangeState())
                idChange.NewState = args.CurrentState.TaskId;

            args.CurrentState.ContinueWith(StateChangeContinuation);
        }
示例#2
0
 /// <summary>
 /// Occurs when <see cref="CurrentState"/> has changed.
 /// </summary>
 /// <param name="args">Containing the previous and current values of <see cref="CurrentState"/>.</param>
 protected virtual void State_Changed(SynchronizedStateEventArgs <TState> args)
 {
     OnStateChanged?.Invoke(this, args);
 }