/// <summary> /// Internal constructor. /// </summary> /// <param name="client">The associated client.</param> /// <param name="methodName"> /// Optionally identifies the target workflow method by the name specified in /// the <c>[WorkflowMethod]</c> attribute tagging the method. Pass a <c>null</c> /// or empty string to target the default method. /// </param> /// <param name="options">Optional workflow options.</param> internal WorkflowFutureStub(CadenceClient client, string methodName = null, WorkflowOptions options = null) { Covenant.Requires <ArgumentNullException>(client != null, nameof(client)); var workflowInterface = typeof(WorkflowInterface); var method = CadenceHelper.GetWorkflowMethod(workflowInterface, methodName); CadenceHelper.ValidateWorkflowInterface(workflowInterface); this.client = client; this.workflowTypeName = CadenceHelper.GetWorkflowTarget(workflowInterface, methodName).WorkflowTypeName; this.options = WorkflowOptions.Normalize(client, options, workflowInterface, method); }