public override void Handle(Problem context,StateChangeInfo stateChangeInfo) { var newState = new ProblemAcceptedState(); newState.IsCurrent = true; context.CurrentState.IsCurrent = false; context.States.Add(newState); }
public override void Handle(Proposal context, StateChangeInfo stateChangeInfo) { var comment = new Comment { Description = stateChangeInfo.Description, Reason = stateChangeInfo.Reason, Problem = context.Problem, Proposal = context, Unit = stateChangeInfo.UnitHandler, IsAccepted = stateChangeInfo.IsAccepted }; Comments.Add(comment); if(stateChangeInfo.IsAccepted) { IsCurrent = false; var newState = new ProposalAcceptedState(); newState.IsCurrent = true; context.States.Add(newState); context.Problem.Request(stateChangeInfo); } else { IsCurrent = false; var newState = new ProposalCancelState(); newState.IsCurrent = true; context.States.Add(newState); } }
public override void Handle(Problem context, StateChangeInfo stateChangeInfo) { throw new NotImplementedException(); }
public override void SendStateInformation(StateChangeInfo state, string path) { // do nothing, just for trace }
public virtual void SendStateInformation(StateChangeInfo state, string path) { }
private void ChangedHandler1(StateChangeInfo<AuthenticationState> changeinfo) { }