예제 #1
0
 public void Execute(object parameter)
 {
     var context = new ExitContext();
     try
     {
         OnExecuteEntry();
         execute(parameter);
     }
     catch (Exception ex)
     {
         context.AddException(ex);
     }
     finally
     {
         OnExecuteExit(context);
     }
 }
예제 #2
0
        protected override void OnExecuteExit(ExitContext context)
        {
            viewModel.SetState(context.ExceptionsOccured ? ViewModelState.Faulted : ViewModelState.Still);

            base.OnExecuteExit(context);
        }
예제 #3
0
 /// <summary>
 /// Runs after Execute call even if it raised exceptions in process
 /// </summary>
 protected virtual void OnExecuteExit(ExitContext context)
 {
 }