Esempio n. 1
0
 public override void Define(IStateFromBuilder<AuthenticationState> builder)
 {
     builder.From(AuthenticationState.Unauthenticated).To(AuthenticationState.Authenticated)
         .Changing(this, a => a.ChangingHandler1)
         .Changed(this, a => a.ChangedHandler1);
     builder.OnEntering(AuthenticationState.Authenticated, this, a => a.OnEnteringHandler1);
     builder.OnEntered(AuthenticationState.Authenticated, this, a => a.OnEnteredHandler1);
     
     builder.OnExiting(AuthenticationState.Unauthenticated, this, a => a.OnExitingHandler1);
     builder.OnExited(AuthenticationState.Authenticated, this, a => a.OnExitedHandler1);
     
     builder.OnEditing(AuthenticationState.Authenticated, this, a => a.OnEditingHandler1);
     builder.OnEdited(AuthenticationState.Authenticated, this, a => a.OnEditedHandler1);
     
     builder.ThrowExceptionWhenDiscontinued = true;
 }
Esempio n. 2
0
 public override void Define(IStateFromBuilder<AuthenticationState> builder)
 {
     builder.From(AuthenticationState.Unauthenticated).To(AuthenticationState.Authenticated)
         .Changing(this, a => a.ChangingHandler2);
 }