public static GetCommandBuffer ( string value ) : IList |
||
value | string | The command to be converted. |
Результат | IList |
protected internal override IList <ArraySegment <byte> > GetBuffer() { // gets key1 key2 key3 ... keyN\r\n var command = "gets " + String.Join(" ", Keys.ToArray()) + TextSocketHelper.CommandTerminator; return(TextSocketHelper.GetCommandBuffer(command)); }
protected internal override IList <ArraySegment <byte> > GetBuffer() { var command = String.IsNullOrEmpty(this.type) ? "stats" + TextSocketHelper.CommandTerminator : "stats " + this.type + TextSocketHelper.CommandTerminator; return(TextSocketHelper.GetCommandBuffer(command)); }
protected internal override IList <ArraySegment <byte> > GetBuffer() { var command = (this.mode == MutationMode.Increment ? "incr " : "decr ") + this.Key + " " + this.delta.ToString(CultureInfo.InvariantCulture) + TextSocketHelper.CommandTerminator; return(TextSocketHelper.GetCommandBuffer(command)); }
protected internal override System.Collections.Generic.IList <ArraySegment <byte> > GetBuffer() { // todo adjust the size to fit a request using a fnv hashed key var sb = new StringBuilder(128); var buffers = new List <ArraySegment <byte> >(3); switch (this.command) { case StoreCommand.Add: sb.Append("add "); break; case StoreCommand.Replace: sb.Append("replace "); break; case StoreCommand.Set: sb.Append("set "); break; case StoreCommand.Append: sb.Append("append "); break; case StoreCommand.Prepend: sb.Append("prepend "); break; case StoreCommand.CheckAndSet: sb.Append("cas "); break; default: throw new MemcachedClientException(command + " is not supported."); } sb.Append(this.Key); sb.Append(" "); sb.Append(this.value.Flags.ToString(CultureInfo.InvariantCulture)); sb.Append(" "); sb.Append(this.expires.ToString(CultureInfo.InvariantCulture)); sb.Append(" "); var data = this.value.Data; sb.Append(Convert.ToString(data.Count, CultureInfo.InvariantCulture)); if (command == StoreCommand.CheckAndSet) { sb.Append(" "); sb.Append(Convert.ToString(this.cas, CultureInfo.InvariantCulture)); } sb.Append(TextSocketHelper.CommandTerminator); TextSocketHelper.GetCommandBuffer(sb.ToString(), buffers); buffers.Add(data); buffers.Add(StoreOperationBase.DataTerminator); return(buffers); }
protected internal override System.Collections.Generic.IList <ArraySegment <byte> > GetBuffer() { var command = "delete " + this.Key + TextSocketHelper.CommandTerminator; return(TextSocketHelper.GetCommandBuffer(command)); }
protected internal override IList <System.ArraySegment <byte> > GetBuffer() => TextSocketHelper.GetCommandBuffer("flush_all" + TextSocketHelper.CommandTerminator);
protected internal override IList <ArraySegment <byte> > GetBuffer() { var command = "gets " + this.Key + TextSocketHelper.CommandTerminator; return(TextSocketHelper.GetCommandBuffer(command)); }