Commit d186716b authored by Jeremy Meng's avatar Jeremy Meng

Remove usage of unsupported BufferedStream for netcore.

Replace unsupported Environment.MachineName with Environment.GetEnvironmentVariable("ComputerName") call.
parent 157e18d7
......@@ -95,7 +95,7 @@ public ServerCounters GetCounters()
/// <summary>
/// Gets the client-name that will be used on all new connections
/// </summary>
public string ClientName { get { return configuration.ClientName ?? Environment.MachineName; } }
public string ClientName { get { return configuration.ClientName ?? Environment.GetEnvironmentVariable("ComputerName"); } }
/// <summary>
/// Gets the configuration of the connection
......
......@@ -742,7 +742,11 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
int bufferSize = config.WriteBuffer;
this.netStream = stream;
#if !NETCORE
this.outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize);
#else
this.outStream = stream;
#endif
multiplexer.LogLocked(log, "Connected {0}", bridge);
bridge.OnConnected(this, log);
......
......@@ -302,7 +302,12 @@ public int CompareTo(RedisValue other)
if (otherType == CompareType.Double) return thisDouble.CompareTo(otherDouble);
}
// otherwise, compare as strings
#if !NETCORE
return StringComparer.InvariantCulture.Compare((string)this, (string)other);
#else
var compareInfo = System.Globalization.CultureInfo.InvariantCulture.CompareInfo;
return compareInfo.Compare((string)this, (string)other, System.Globalization.CompareOptions.IgnoreCase);
#endif
}
catch(Exception ex)
{
......
......@@ -21,11 +21,11 @@
"warningsAsErrors": false
},
"dependencies": {
"System.ComponentModel.Primitives": "4.0.0",
"System.Diagnostics.Debug": "4.0.0",
"System.Diagnostics.TraceSource": "4.0.0-beta-*",
"System.Diagnostics.Tracing": "4.0.20",
"System.Diagnostics.Tools": "4.0.0-beta-*",
"System.IO.Compression": "4.0.0",
"System.Globalization": "4.0.10",
"System.Linq": "4.0.0",
"System.Net.Primitives": "4.0.10",
"System.Net.Sockets": "4.1.0-beta-*",
......@@ -37,7 +37,6 @@
"System.Reflection.Primitives": "4.0.0",
"System.Reflection.Emit.Lightweight": "4.0.0",
"System.Security.Cryptography.Algorithms": "4.0.0-beta-*",
"System.Security.Cryptography.Hashing": "4.0.0-beta-*",
"System.Security.Cryptography.Hashing.Algorithms": "4.0.0-beta-*",
"System.Security.Cryptography.X509Certificates": "4.0.0-beta-*",
"System.Text.RegularExpressions": "4.0.0",
......
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