public override Task RaiseEventAsync(string taskHubName, string instanceId, string eventName, object eventData, string connectionName = null) { if (string.IsNullOrEmpty(taskHubName)) { throw new ArgumentNullException(nameof(taskHubName)); } if (string.IsNullOrEmpty(eventName)) { throw new ArgumentNullException(nameof(eventName)); } if (string.IsNullOrEmpty(connectionName)) { connectionName = this.attribute.ConnectionName; } var attribute = new OrchestrationClientAttribute { TaskHub = taskHubName, ConnectionName = connectionName, }; TaskHubClient taskHubClient = this.config.GetClient(attribute).client; return(this.RaiseEventInternalAsync(taskHubClient, taskHubName, instanceId, eventName, eventData)); }
private readonly OrchestrationClientAttribute attribute; // for rehydrating a Client after a webhook internal DurableOrchestrationClient( IOrchestrationServiceClient serviceClient, DurableTaskExtension config, OrchestrationClientAttribute attribute, EndToEndTraceHelper traceHelper) { this.client = new TaskHubClient(serviceClient); this.traceHelper = traceHelper; this.config = config; this.hubName = config.HubName; this.attribute = attribute; }
private readonly OrchestrationClientAttribute attribute; // for rehydrating a Client after a webhook internal DurableOrchestrationClient( IOrchestrationServiceClient serviceClient, DurableTaskExtension config, OrchestrationClientAttribute attribute) { this.config = config ?? throw new ArgumentNullException(nameof(config)); this.client = new TaskHubClient(serviceClient); this.traceHelper = config.TraceHelper; this.hubName = attribute.TaskHub ?? config.Options.HubName; this.attribute = attribute; }