private OrchestrationSessionPartitionHandler(ConnectionMultiplexer redisConnection, string taskHub, string partition = "singleton")
 {
     this.taskHub                  = taskHub;
     this.redisConnection          = redisConnection;
     this.partition                = partition;
     this.activeOrchestrationLocks = new ConcurrentDictionary <string, SemaphoreSlim>();
     this.partitionControlQueueKey = RedisKeyNameResolver.GetPartitionControlQueueKey(this.taskHub, this.partition);
     this.partitionControlQueueNotificationChannelKey = RedisKeyNameResolver.GetPartitionControlNotificationChannelKey(this.taskHub, this.partition);
     this.currentOrchestrationsSetKey = RedisKeyNameResolver.GetOrchestrationsSetKey(this.taskHub, this.partition);
     this.logger = new RedisLogger(redisConnection, taskHub);
 }
        public RedisTransactionBuilder AddOrchestrationToSet(string orchestrationId)
        {
            if (this.partition == null)
            {
                throw new ArgumentNullException($"Cannot call {nameof(AddOrchestrationToSet)} without a partition set.");
            }
            string orchestrationStateKey = RedisKeyNameResolver.GetOrchestrationsSetKey(this.taskHub, this.partition);

            transaction.SetAddAsync(orchestrationStateKey, orchestrationId);
            return(this);
        }