Exemplo n.º 1
0
        public SubscriptionOperation(IRedisChannel channel, RESPCommand[] commands, RESPObject[] responses, SubscriptionSplitter subscriptions)
        {
            Contract.Assert(commands.Length == responses.Length, "The number of commands is different than the responses placeholder.");

            _subscriptions = subscriptions;
            _channel       = channel;
            _commands      = commands;
            _responses     = responses;

            for (int i = 0; i < _commands.Length; i++)
            {
                if (_commands[i].IsSubscription)
                {
                    _responses[i] = RESPSimpleString.OK;
                }
            }
        }
 internal RedisSubscriberConnection(IPEndPoint[] endpoints, RedisClientOptions options)
     : base(endpoints, options)
 {
     _subscriptions = new SubscriptionSplitter();
     Initializers.Add(new SubscriptionsInitialization(_subscriptions));
 }
 public RemoveChannelOperation(IRedisChannel channel, SubscriptionSplitter subscriptions)
 {
     _subscriptions = subscriptions;
     _channel       = channel;
 }
Exemplo n.º 4
0
 internal SubscriptionsInitialization(SubscriptionSplitter subscriptions)
 {
     _subscriptions = subscriptions;
 }