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);
 }
 public FabricOrchestrationServiceClient(IReliableStateManager stateManager, SessionProvider orchestrationProvider, IFabricOrchestrationServiceInstanceStore instanceStore)
 {
     this.stateManager          = stateManager ?? throw new ArgumentNullException(nameof(stateManager));
     this.orchestrationProvider = orchestrationProvider ?? throw new ArgumentNullException(nameof(orchestrationProvider));
     this.instanceStore         = instanceStore ?? throw new ArgumentNullException(nameof(instanceStore));
 }