Commit 9bb2665b authored by Nick Craver's avatar Nick Craver

Deprecate WriteBuffer

Being removed in v2.0
parent 18c607d4
......@@ -321,6 +321,7 @@ public int ConnectTimeout
/// <summary>
/// The size of the output buffer to use
/// </summary>
[Obsolete("WriteBuffer will be removed in the 2.0 release - see https://github.com/StackExchange/StackExchange.Redis/issues/871 for details.", false)]
public int WriteBuffer { get { return writeBuffer.GetValueOrDefault(4096); } set { writeBuffer = value; } }
internal LocalCertificateSelectionCallback CertificateSelectionCallback { get { return CertificateSelection; } private set { CertificateSelection = value; } }
......@@ -631,7 +632,9 @@ private void DoParse(string configuration, bool ignoreUnknown)
HighPrioritySocketThreads = OptionKeys.ParseBoolean(key, value);
break;
case OptionKeys.WriteBuffer:
#pragma warning disable CS0618 // Type or member is obsolete
WriteBuffer = OptionKeys.ParseInt32(key, value);
#pragma warning restore CS0618 // Type or member is obsolete
break;
case OptionKeys.Proxy:
Proxy = OptionKeys.ParseProxy(key, value);
......
......@@ -759,7 +759,9 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
}
OnWrapForLogging(ref stream, physicalName);
#pragma warning disable CS0618 // Type or member is obsolete
int bufferSize = config.WriteBuffer;
#pragma warning restore CS0618 // Type or member is obsolete
netStream = stream;
outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize);
Multiplexer.LogLocked(log, "Connected {0}", Bridge);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment