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();
 }
示例#4
0
 public override void SendStateInformation(StateChangeInfo state, string path)
 {
     // do nothing, just for trace
 }
示例#5
0
 public virtual void SendStateInformation(StateChangeInfo state, string path)
 {
 }
示例#6
0
 private void ChangedHandler1(StateChangeInfo<AuthenticationState> changeinfo)
 {
 }