public MessageHandleWorkflow(Workflow <HandleContext, IHandlerInstance> createHandler) { CreateHandler = createHandler; BeginHandle = WorkflowExtensions.Lamda <HandlerContext>(); ActualHandle = WorkflowExtensions.Lamda <HandlerContext>().Use((context) => new DynamicMessageHandle().RunAsync(context.Context)); EndHandle = WorkflowExtensions.Lamda <HandlerContext>(); Error = WorkflowExtensions.Lamda <ErrorContext>().Use((context) => new LogExceptionOnHandleError().RunAsync(context.Context)); Finalize = WorkflowExtensions.Lamda <HandleContext>(); }
public MessageHandleWorkflow(Workflow <HandleContext, IHandlerInstance> createHandler) { CreateHandler = createHandler; BeginHandle = WorkflowExtensions.Lamda <HandlerContext>(); ActualHandle = new DynamicMessageHandle(); EndHandle = WorkflowExtensions.Lamda <HandlerContext>(); Error = WorkflowExtensions.Lamda <ErrorContext>(); Finalize = WorkflowExtensions.Lamda <HandleContext>(); }