Пример #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)
 {
 }