public WorkflowOperationInvoker(OperationDescription operationDescription, ServiceEndpoint endpoint, CorrelationKeyCalculator keyCalculator, WorkflowOperationBehavior behavior, ServiceHostBase host, IOperationInvoker innerInvoker) : base(operationDescription, endpoint, keyCalculator, host) { base.StaticBookmarkName = (behavior.bookmark == null) ? null : behavior.bookmark.Name; this.behavior = behavior; base.CanCreateInstance = behavior.CanCreateInstance; this.performanceCountersEnabled = PerformanceCounters.PerformanceCountersEnabled; this.propagateActivity = TraceUtility.ShouldPropagateActivity; this.isHostingEndpoint = endpoint is WorkflowHostingEndpoint; this.innerInvoker = innerInvoker; this.isFirstReceiveOfTransactedReceiveScopeTree = operationDescription.IsFirstReceiveOfTransactedReceiveScopeTree; }
private WorkflowOperationContext(object[] inputs, System.ServiceModel.OperationContext operationContext, string operationName, bool performanceCountersEnabled, bool propagateActivity, Transaction currentTransaction, WorkflowServiceInstance workflowInstance, IInvokeReceivedNotification notification, WorkflowOperationBehavior behavior, TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state) { this.inputs = inputs; this.operationName = operationName; this.OperationContext = operationContext; this.CurrentTransaction = currentTransaction; this.performanceCountersEnabled = performanceCountersEnabled; this.propagateActivity = propagateActivity; this.timeoutHelper = new TimeoutHelper(timeout); this.workflowInstance = workflowInstance; this.thisLock = new object(); this.notification = notification; base.OnCompleting = onCompleting; this.bookmark = behavior.OnResolveBookmark(this, out this.bookmarkScope, out this.bookmarkValue); bool flag = false; try { if (TraceUtility.MessageFlowTracingOnly) { this.e2eActivityId = TraceUtility.GetReceivedActivityId(this.OperationContext); DiagnosticTrace.ActivityId = this.e2eActivityId; } if (this.workflowInstance.BufferedReceiveManager != null) { ReceiveContext.TryGet(this.OperationContext.IncomingMessageProperties, out this.receiveContext); this.OperationContext.IncomingMessageProperties.Remove(ReceiveContext.Name); } flag = this.ProcessRequest(); } catch (Exception exception) { if (Fx.IsFatal(exception)) { throw; } base.OnCompleting(this, exception); throw; } if (flag) { base.Complete(true); } }
public static IAsyncResult BeginProcessRequest(WorkflowServiceInstance workflowInstance, System.ServiceModel.OperationContext operationContext, string operationName, object[] inputs, bool performanceCountersEnabled, bool propagateActivity, Transaction currentTransaction, IInvokeReceivedNotification notification, WorkflowOperationBehavior behavior, TimeSpan timeout, AsyncCallback callback, object state) { return new WorkflowOperationContext(inputs, operationContext, operationName, performanceCountersEnabled, propagateActivity, currentTransaction, workflowInstance, notification, behavior, timeout, callback, state); }