コード例 #1
0
 /// <summary>
 /// Exit action to invoke the callback
 /// fallback is to exit to root
 /// </summary>
 protected virtual void Exit()
 {
     if (ExitAction.HasDelegate)
     {
         ExitAction.InvokeAsync();
     }
     else
     {
         this.NavManager.NavigateTo("/");
     }
 }
コード例 #2
0
 /// <summary>
 /// Method to exit the form
 /// </summary>
 protected virtual void Exit()
 {
     // If we're in a modal context, call Close on the cascaded Modal object
     if (this._isModal)
     {
         this.Modal.Close(ModalResult.OK());
     }
     // If there's a delegate registered on the ExitAction, execute it.
     else if (ExitAction.HasDelegate)
     {
         ExitAction.InvokeAsync();
     }
     // else fallback action is to navigate to root
     else
     {
         this.NavManager.NavigateTo("/");
     }
 }