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); }
/// <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); }