public TaskOrchestrationShim( DurableTaskConfiguration config, DurableOrchestrationContext context) { this.config = config ?? throw new ArgumentNullException(nameof(config)); this.context = context ?? throw new ArgumentNullException(nameof(context)); }
public DurableTaskWorkerContext(DurableTaskConfiguration configuration, ExtensionConfigContext extensionContext) { this.listenerConfig = configuration; this.extensionContext = extensionContext; this.orchestrations = new List <ObjectCreator <TaskOrchestration> >(); this.activities = new List <ObjectCreator <TaskActivity> >(); }
public OrchestrationTriggerAttributeBindingProvider( DurableTaskConfiguration config, ExtensionConfigContext extensionContext, EndToEndTraceHelper traceHelper) { this.config = config; this.extensionContext = extensionContext; this.traceHelper = traceHelper; }
public OrchestrationTriggerBinding( DurableTaskConfiguration config, ParameterInfo parameterInfo, string orchestrationName, string version) { this.config = config; this.parameterInfo = parameterInfo; this.orchestrationName = orchestrationName; this.version = version; }
public ActivityTriggerAttributeBindingProvider( DurableTaskConfiguration durableTaskConfig, ExtensionConfigContext extensionContext, EndToEndTraceHelper traceHelper) { this.durableTaskConfig = durableTaskConfig; this.extensionContext = extensionContext; this.traceHelper = traceHelper; ActivityTriggerBinding.RegisterBindingRules(extensionContext.Config); }
public TaskActivityShim( DurableTaskConfiguration config, ITriggeredFunctionExecutor executor, string activityName, string activityVersion) { this.config = config ?? throw new ArgumentNullException(nameof(config)); this.executor = executor ?? throw new ArgumentNullException(nameof(executor)); if (string.IsNullOrEmpty(activityName)) { throw new ArgumentNullException(nameof(activityName)); } this.activityName = activityName; this.activityVersion = activityVersion; }
public static DurableTaskListener CreateForActivity( DurableTaskConfiguration config, string activityName, string activityVersion, ITriggeredFunctionExecutor activityFunctionExecutor) { if (activityFunctionExecutor == null) { throw new ArgumentNullException(nameof(activityFunctionExecutor)); } string key = GetFunctionKey(activityName, activityVersion); if (!activityFunctionExecutors.TryAdd(key, activityFunctionExecutor)) { // Best effort for now until we can figure out how to properly remove registrations when the listener is recycled. } return(new DurableTaskListener(config)); }
private DurableTaskListener(DurableTaskConfiguration config) { this.config = config ?? throw new ArgumentNullException(nameof(config)); lock (singletonInitLock) { string taskHubName = config.HubName; if (sharedWorker == null) { sharedOrchestrationService = new AzureStorageOrchestrationService(config.GetOrchestrationServiceSettings()); sharedWorker = new TaskHubWorker(sharedOrchestrationService, this, this); sharedWorker.AddOrchestrationDispatcherMiddleware(this.OrchestrationMiddleware); sharedWorkerHubName = taskHubName; } else if (!string.Equals(sharedWorkerHubName, taskHubName, StringComparison.OrdinalIgnoreCase)) { throw new InvalidOperationException("Only one task hub is supported in a single application."); } } }
public static void UseDurableTask( this JobHostConfiguration hostConfig, DurableTaskConfiguration listenerConfig) { if (hostConfig == null) { throw new ArgumentNullException(nameof(hostConfig)); } if (listenerConfig == null) { throw new ArgumentNullException(nameof(listenerConfig)); } IExtensionRegistry extensions = hostConfig.GetService <IExtensionRegistry>(); extensions.RegisterExtension <IExtensionConfigProvider>(listenerConfig); // TODO: We try to disable dashboard logging because the dashboard logger's // network I/O causes DTFx orchestrations to hang. This is an open issue // that currently has no solution. hostConfig.DashboardConnectionString = null; }
public HttpApiHandler(DurableTaskConfiguration config, TraceWriter traceWriter) { this.config = config; this.traceWriter = traceWriter; }
public BindingHelper(DurableTaskConfiguration config, EndToEndTraceHelper traceHelper) { this.config = config; this.traceHelper = traceHelper; }