/// <summary> /// Constructor that takes the custom <see cref="FabricOrchestrationProviderSettings"/>. /// </summary> /// <param name="stateManager">Reliable state manager instance. Comes from service fabric stateful service implementation.</param> /// <param name="settings">Settings to be used for the provider. Refer to <see cref="FabricOrchestrationProviderSettings"/> for documentation about specific settings.</param> public FabricOrchestrationProviderFactory(IReliableStateManager stateManager, FabricOrchestrationProviderSettings settings) { if (stateManager == null) { throw new ArgumentNullException(nameof(stateManager)); } this.stateManager = stateManager; this.settings = settings ?? new FabricOrchestrationProviderSettings(); }
internal FabricOrchestrationProvider(IReliableStateManager stateManager, FabricOrchestrationProviderSettings settings) { this.cancellationTokenSource = new CancellationTokenSource(); var sessionProvider = new SessionProvider(stateManager, cancellationTokenSource.Token); var instanceStore = new FabricOrchestrationInstanceStore(stateManager, cancellationTokenSource.Token); this.orchestrationService = new FabricOrchestrationService(stateManager, sessionProvider, instanceStore, settings, cancellationTokenSource); this.orchestrationClient = new FabricOrchestrationServiceClient(stateManager, sessionProvider, instanceStore); this.fabricProviderClient = new FabricProviderClient(stateManager, sessionProvider); }
public FabricOrchestrationService(IReliableStateManager stateManager, SessionProvider orchestrationProvider, IFabricOrchestrationServiceInstanceStore instanceStore, FabricOrchestrationProviderSettings settings, CancellationTokenSource cancellationTokenSource) { this.stateManager = stateManager ?? throw new ArgumentNullException(nameof(stateManager)); this.orchestrationProvider = orchestrationProvider; this.instanceStore = instanceStore; this.settings = settings; this.cancellationTokenSource = cancellationTokenSource; this.activitiesProvider = new ActivityProvider(this.stateManager, Constants.ActivitiesQueueName, cancellationTokenSource.Token); this.scheduledMessagesProvider = new ScheduledMessageProvider(this.stateManager, Constants.ScheduledMessagesDictionaryName, orchestrationProvider, cancellationTokenSource.Token); }