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);
     }
 }
Exemplo n.º 3
0
 public override void Handle(Problem context, StateChangeInfo stateChangeInfo)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public override void SendStateInformation(StateChangeInfo state, string path)
 {
     // do nothing, just for trace
 }
Exemplo n.º 5
0
 public virtual void SendStateInformation(StateChangeInfo state, string path)
 {
 }
Exemplo n.º 6
0
 private void ChangedHandler1(StateChangeInfo<AuthenticationState> changeinfo)
 {
 }