Exemple #1
0
        IServerPool IMemcachedClientConfiguration.CreatePool()
        {
            switch (this.Protocol)
            {
            case MemcachedProtocol.Text:
                this.Pool = new AutoServerPool(this, new Enyim.Caching.Memcached.Protocol.Text.TextOperationFactory());
                break;

            case MemcachedProtocol.Binary:
                this.Pool = new AutoBinaryPool(this);
                break;

            default:
                throw new ArgumentOutOfRangeException("Unknown protocol: " + (int)this.Protocol);
            }

            return(this.Pool);
        }
Exemple #2
0
        IServerPool IMemcachedClientConfiguration.CreatePool()
        {
            switch (Protocol)
            {
            case MemcachedProtocol.Text:
                Pool = new AutoServerPool(
                    this, new TextOperationFactory(), _loggerFactory);
                break;

            case MemcachedProtocol.Binary:
                Pool = new AutoBinaryPool(this, _loggerFactory);
                break;

            default:
                throw new ArgumentOutOfRangeException("Unknown protocol: " + (int)Protocol);
            }

            return(Pool);
        }