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 ...@@ -321,6 +321,7 @@ public int ConnectTimeout
/// <summary> /// <summary>
/// The size of the output buffer to use /// The size of the output buffer to use
/// </summary> /// </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; } } public int WriteBuffer { get { return writeBuffer.GetValueOrDefault(4096); } set { writeBuffer = value; } }
internal LocalCertificateSelectionCallback CertificateSelectionCallback { get { return CertificateSelection; } private set { CertificateSelection = value; } } internal LocalCertificateSelectionCallback CertificateSelectionCallback { get { return CertificateSelection; } private set { CertificateSelection = value; } }
...@@ -631,7 +632,9 @@ private void DoParse(string configuration, bool ignoreUnknown) ...@@ -631,7 +632,9 @@ private void DoParse(string configuration, bool ignoreUnknown)
HighPrioritySocketThreads = OptionKeys.ParseBoolean(key, value); HighPrioritySocketThreads = OptionKeys.ParseBoolean(key, value);
break; break;
case OptionKeys.WriteBuffer: case OptionKeys.WriteBuffer:
#pragma warning disable CS0618 // Type or member is obsolete
WriteBuffer = OptionKeys.ParseInt32(key, value); WriteBuffer = OptionKeys.ParseInt32(key, value);
#pragma warning restore CS0618 // Type or member is obsolete
break; break;
case OptionKeys.Proxy: case OptionKeys.Proxy:
Proxy = OptionKeys.ParseProxy(key, value); Proxy = OptionKeys.ParseProxy(key, value);
......
...@@ -759,7 +759,9 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log) ...@@ -759,7 +759,9 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
} }
OnWrapForLogging(ref stream, physicalName); OnWrapForLogging(ref stream, physicalName);
#pragma warning disable CS0618 // Type or member is obsolete
int bufferSize = config.WriteBuffer; int bufferSize = config.WriteBuffer;
#pragma warning restore CS0618 // Type or member is obsolete
netStream = stream; netStream = stream;
outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize); outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize);
Multiplexer.LogLocked(log, "Connected {0}", Bridge); 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