示例#1
0
        protected override void Run(Execution <HandleContext> execution)
        {
            try
            {
                using (IHandlerInstance handler = CreateHandler.Run(execution.Context))
                {
                    var handleContext = new HandlerContext(execution.Context.Message.Payload, handler.Current, execution.Context.Message);
                    BeginHandle.Run(handleContext);
                    new DiagnosticsWorkflow <HandlerContext>(ActualHandle).Run(handleContext);
                    EndHandle.Run(handleContext);
                }
            }

            catch (Exception ex)
            {
                Error.Run(new ErrorContext(ex, execution.Context.Message, execution.Context.HandlerType));
                throw;
            }
            finally
            {
                Finalize.Run(execution.Context);
            }
        }