public WorkflowOperationAsyncResult(WorkflowOperationInvoker workflowOperationInvoker, WorkflowDurableInstance workflowDurableInstance, object[] inputs, AsyncCallback callback, object state, long time) : base(callback, state) { if (inputs == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("inputs"); } if (workflowDurableInstance == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("workflowDurableInstance"); } if (workflowOperationInvoker == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("workflowOperationInvoker"); } string queueName; WorkflowRequestContext workflowRequestContext = new WorkflowRequestContext( this, inputs, GetContextProperties()); queueName = workflowOperationInvoker.StaticQueueName; if (workflowRequestContext.ContextProperties.Count > 1) //DurableDispatchContextProperty. { queueName = QueueNameHelper.Create(workflowOperationInvoker.StaticQueueName, workflowRequestContext.ContextProperties); } WorkflowInstance workflowInstance = workflowDurableInstance.GetWorkflowInstance (workflowOperationInvoker.CanCreateInstance); AsyncCallbackState callbackState = new AsyncCallbackState(workflowRequestContext, workflowInstance, workflowOperationInvoker.DispatchRuntime.SynchronizationContext, workflowOperationInvoker.InstanceLifetimeManager, queueName); this.isOneway = workflowOperationInvoker.IsOneWay; this.instanceIdGuid = workflowInstance.InstanceId; this.time = time; ActionItem.Schedule(waitCallback, callbackState); if (DiagnosticUtility.ShouldTraceVerbose) { string traceText = SR2.GetString(SR2.WorkflowOperationInvokerItemQueued, this.InstanceId, queueName); TraceUtility.TraceEvent(TraceEventType.Verbose, TraceCode.WorkflowOperationInvokerItemQueued, SR.GetString(SR.TraceCodeWorkflowOperationInvokerItemQueued), new StringTraceRecord("ItemDetails", traceText), this, null); } }