Ejemplo n.º 1
0
        /// <summary>
        ///     初始化数据库环境、实例化子类中,所有Set属性
        /// </summary>
        public void Initializer()
        {
            if (IsInitializer)
            {
                return;
            }
            _client       = new RedisClient(_redisConnection);
            IsInitializer = true;

            Connection  = new RedisConnection(_client);
            Hash        = new RedisHash(_client);
            Key         = new RedisKey(_client);
            List        = new RedisList(_client);
            PubSub      = new RedisPubSub(_client);
            Script      = new RedisScript(_client);
            Server      = new RedisServer(_client);
            Set         = new RedisSet(_client);
            SortedSet   = new RedisSortedSet(_client);
            String      = new RedisString(_client);
            Transaction = new RedisTransaction(_client);
            Bit         = new RedisBit(_client);
            Expire      = new RedisExpire(_client);
            Sort        = new RedisSort(_client);
            Number      = new RedisNumber(_client);
        }
        /// <summary>
        ///     初始化数据库环境、实例化子类中,所有Set属性
        /// </summary>
        public void Initializer()
        {
            if (IsInitializer) { return; }
            _client = new RedisClient(_redisConnection);
            IsInitializer = true;

            Connection = new RedisConnection(_client);
            Hash = new RedisHash(_client);
            Key = new RedisKey(_client);
            List = new RedisList(_client);
            PubSub = new RedisPubSub(_client);
            Script = new RedisScript(_client);
            Server = new RedisServer(_client);
            Set = new RedisSet(_client);
            SortedSet = new RedisSortedSet(_client);
            String = new RedisString(_client);
            Transaction = new RedisTransaction(_client);
            Bit = new RedisBit(_client);
            Expire = new RedisExpire(_client);
            Sort = new RedisSort(_client);
            Number = new RedisNumber(_client);
        }