Commit 17e82256 authored by Jeremy Meng's avatar Jeremy Meng

Use DNXCORE50 constant instead of NETCORE. Socket is only supported on dnxcore.

parent d694d922
...@@ -239,7 +239,7 @@ public void MassiveBulkOpsAsync(bool preserveOrder, bool withContinuation) ...@@ -239,7 +239,7 @@ public void MassiveBulkOpsAsync(bool preserveOrder, bool withContinuation)
Action<Task> nonTrivial = delegate Action<Task> nonTrivial = delegate
{ {
#if !NETCORE #if !DNXCORE50
Thread.SpinWait(5); Thread.SpinWait(5);
#else #else
var spinWait = new SpinWait(); var spinWait = new SpinWait();
...@@ -488,14 +488,17 @@ public void MassiveBulkOpsSyncOldStyle(ResultCompletionMode completionMode, int ...@@ -488,14 +488,17 @@ public void MassiveBulkOpsSyncOldStyle(ResultCompletionMode completionMode, int
} }
#endif #endif
//TODO: Ignore("dnxcore crash")
#if !DNXCORE50
[Test] [Test]
[TestCase(true, 1)] [TestCase(true, 1)]
[TestCase(false, 1)] [TestCase(false, 1)]
[TestCase(true, 5)] [TestCase(true, 5)]
[TestCase(false, 5)] [TestCase(false, 5)]
#endif
public void MassiveBulkOpsFireAndForget(bool preserveOrder, int threads) public void MassiveBulkOpsFireAndForget(bool preserveOrder, int threads)
{ {
using (var muxer = Create()) using (var muxer = Create(syncTimeout:20000))
{ {
muxer.PreserveAsyncOrder = preserveOrder; muxer.PreserveAsyncOrder = preserveOrder;
#if DEBUG #if DEBUG
......
...@@ -20,7 +20,7 @@ public class Cluster : TestBase ...@@ -20,7 +20,7 @@ public class Cluster : TestBase
protected override string GetConfiguration() protected override string GetConfiguration()
{ {
var server = ClusterIp; var server = ClusterIp;
#if !NETCORE #if !DNXCORE50
if (string.Equals(Environment.MachineName, "MARC-LAPTOP", StringComparison.InvariantCultureIgnoreCase)) if (string.Equals(Environment.MachineName, "MARC-LAPTOP", StringComparison.InvariantCultureIgnoreCase))
#else #else
if (string.Equals(Environment.GetEnvironmentVariable("COMPUTERNAME"), "MARC-LAPTOP", StringComparison.OrdinalIgnoreCase)) if (string.Equals(Environment.GetEnvironmentVariable("COMPUTERNAME"), "MARC-LAPTOP", StringComparison.OrdinalIgnoreCase))
......
...@@ -144,7 +144,7 @@ public void ReadConfig() ...@@ -144,7 +144,7 @@ public void ReadConfig()
var all = conn.ConfigGet(); var all = conn.ConfigGet();
Assert.IsTrue(all.Length > 0, "any"); Assert.IsTrue(all.Length > 0, "any");
#if !NETCORE #if !DNXCORE50
var pairs = all.ToDictionary(x => (string)x.Key, x => (string)x.Value, StringComparer.InvariantCultureIgnoreCase); var pairs = all.ToDictionary(x => (string)x.Key, x => (string)x.Value, StringComparer.InvariantCultureIgnoreCase);
#else #else
var pairs = all.ToDictionary(x => (string)x.Key, x => (string)x.Value, StringComparer.OrdinalIgnoreCase); var pairs = all.ToDictionary(x => (string)x.Key, x => (string)x.Value, StringComparer.OrdinalIgnoreCase);
......
...@@ -9,7 +9,7 @@ public class SO25567566 : TestBase ...@@ -9,7 +9,7 @@ public class SO25567566 : TestBase
{ {
protected override string GetConfiguration() protected override string GetConfiguration()
{ {
return "127.0.0.1"; return "127.0.0.1:6379";
} }
[Test] [Test]
public async void Execute() public async void Execute()
......
...@@ -150,7 +150,7 @@ public void CheckSyncAsyncMethodsMatch(Type from, Type to) ...@@ -150,7 +150,7 @@ public void CheckSyncAsyncMethodsMatch(Type from, Type to)
var pFrom = method.GetParameters(); var pFrom = method.GetParameters();
Type[] args = pFrom.Select(x => x.ParameterType).ToArray(); Type[] args = pFrom.Select(x => x.ParameterType).ToArray();
Assert.AreEqual(typeof(CommandFlags), args.Last()); Assert.AreEqual(typeof(CommandFlags), args.Last());
#if !NETCORE #if !DNXCORE50
var found = to.GetMethod(huntName, flags, null, method.CallingConvention, args, null); var found = to.GetMethod(huntName, flags, null, method.CallingConvention, args, null);
#else #else
var found = to.GetMethods(flags) var found = to.GetMethods(flags)
...@@ -176,14 +176,14 @@ void CheckMethod(MethodInfo method, bool isAsync) ...@@ -176,14 +176,14 @@ void CheckMethod(MethodInfo method, bool isAsync)
{ {
#if DEBUG #if DEBUG
#if !NETCORE #if !DNXCORE50
bool ignorePrefix = ignoreType != null && Attribute.IsDefined(method, ignoreType); bool ignorePrefix = ignoreType != null && Attribute.IsDefined(method, ignoreType);
#else #else
bool ignorePrefix = ignoreType != null && method.IsDefined(ignoreType); bool ignorePrefix = ignoreType != null && method.IsDefined(ignoreType);
#endif #endif
if (ignorePrefix) if (ignorePrefix)
{ {
#if !NETCORE #if !DNXCORE50
Attribute attrib = Attribute.GetCustomAttribute(method, ignoreType); Attribute attrib = Attribute.GetCustomAttribute(method, ignoreType);
#else #else
Attribute attrib = method.GetCustomAttribute(ignoreType); Attribute attrib = method.GetCustomAttribute(ignoreType);
...@@ -228,7 +228,7 @@ void CheckName(MemberInfo member, bool isAsync) ...@@ -228,7 +228,7 @@ void CheckName(MemberInfo member, bool isAsync)
public static class ReflectionExtensions public static class ReflectionExtensions
{ {
#if !NETCORE #if !DNXCORE50
public static Type GetTypeInfo(this Type type) public static Type GetTypeInfo(this Type type)
{ {
return type; return type;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
#if NETCORE #if DNXCORE50
using System.Reflection; using System.Reflection;
#endif #endif
using System.Threading.Tasks; using System.Threading.Tasks;
......
...@@ -417,7 +417,7 @@ internal static class VolatileWrapper ...@@ -417,7 +417,7 @@ internal static class VolatileWrapper
{ {
public static int Read(ref int location) public static int Read(ref int location)
{ {
#if !NETCORE #if !DNXCORE50
return Thread.VolatileRead(ref location); return Thread.VolatileRead(ref location);
#else #else
return Volatile.Read(ref location); return Volatile.Read(ref location);
......
...@@ -285,7 +285,7 @@ protected static TimeSpan RunConcurrent(Action work, int threads, int timeout = ...@@ -285,7 +285,7 @@ protected static TimeSpan RunConcurrent(Action work, int threads, int timeout =
} }
if (!allDone.WaitOne(timeout)) if (!allDone.WaitOne(timeout))
{ {
#if !NETCORE #if !DNXCORE50
for (int i = 0; i < threads; i++) for (int i = 0; i < threads; i++)
{ {
var thd = threadArr[i]; var thd = threadArr[i];
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
"frameworks": { "frameworks": {
"dnxcore50": { "dnxcore50": {
"compilationOptions": { "compilationOptions": {
"define": [ "NETCORE" ],
"warningsAsErrors": false "warningsAsErrors": false
}, },
"dependencies": { "dependencies": {
......
...@@ -10,7 +10,7 @@ internal static class VolatileWrapper ...@@ -10,7 +10,7 @@ internal static class VolatileWrapper
{ {
public static int Read(ref int location) public static int Read(ref int location)
{ {
#if !NETCORE #if !DNXCORE50
return System.Threading.Thread.VolatileRead(ref location); return System.Threading.Thread.VolatileRead(ref location);
#else #else
return System.Threading.Volatile.Read(ref location); return System.Threading.Volatile.Read(ref location);
...@@ -19,7 +19,7 @@ public static int Read(ref int location) ...@@ -19,7 +19,7 @@ public static int Read(ref int location)
public static void Write(ref int address, int value) public static void Write(ref int address, int value)
{ {
#if !NETCORE #if !DNXCORE50
System.Threading.Thread.VolatileWrite(ref address, value); System.Threading.Thread.VolatileWrite(ref address, value);
#else #else
System.Threading.Volatile.Write(ref address, value); System.Threading.Volatile.Write(ref address, value);
......
...@@ -30,7 +30,7 @@ public enum Proxy ...@@ -30,7 +30,7 @@ public enum Proxy
/// The options relevant to a set of redis connections /// The options relevant to a set of redis connections
/// </summary> /// </summary>
public sealed class ConfigurationOptions public sealed class ConfigurationOptions
#if !NETCORE #if !DNXCORE50
: ICloneable : ICloneable
#endif #endif
{ {
...@@ -143,7 +143,7 @@ public static string TryNormalize(string value) ...@@ -143,7 +143,7 @@ public static string TryNormalize(string value)
/// Indicates whether the connection should be encrypted /// Indicates whether the connection should be encrypted
/// </summary> /// </summary>
[Obsolete("Please use .Ssl instead of .UseSsl"), [Obsolete("Please use .Ssl instead of .UseSsl"),
#if !NETCORE #if !DNXCORE50
Browsable(false), Browsable(false),
#endif #endif
EditorBrowsable(EditorBrowsableState.Never)] EditorBrowsable(EditorBrowsableState.Never)]
...@@ -470,7 +470,7 @@ static void Append(StringBuilder sb, string prefix, object value) ...@@ -470,7 +470,7 @@ static void Append(StringBuilder sb, string prefix, object value)
} }
} }
#if !NETCORE #if !DNXCORE50
static bool IsOption(string option, string prefix) static bool IsOption(string option, string prefix)
{ {
return option.StartsWith(prefix, StringComparison.InvariantCultureIgnoreCase); return option.StartsWith(prefix, StringComparison.InvariantCultureIgnoreCase);
...@@ -492,7 +492,7 @@ void Clear() ...@@ -492,7 +492,7 @@ void Clear()
SocketManager = null; SocketManager = null;
} }
#if !NETCORE #if !DNXCORE50
object ICloneable.Clone() { return Clone(); } object ICloneable.Clone() { return Clone(); }
#endif #endif
......
...@@ -561,7 +561,7 @@ private static bool WaitAllIgnoreErrors(Task[] tasks, int timeout) ...@@ -561,7 +561,7 @@ private static bool WaitAllIgnoreErrors(Task[] tasks, int timeout)
return false; return false;
} }
#if !NETCORE #if !DNXCORE50
private void LogLockedWithThreadPoolStats(TextWriter log, string message, out int busyWorkerCount) private void LogLockedWithThreadPoolStats(TextWriter log, string message, out int busyWorkerCount)
{ {
busyWorkerCount = 0; busyWorkerCount = 0;
...@@ -603,7 +603,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli ...@@ -603,7 +603,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
} }
var watch = Stopwatch.StartNew(); var watch = Stopwatch.StartNew();
#if !NETCORE #if !DNXCORE50
int busyWorkerCount; int busyWorkerCount;
LogLockedWithThreadPoolStats(log, "Awaiting task completion", out busyWorkerCount); LogLockedWithThreadPoolStats(log, "Awaiting task completion", out busyWorkerCount);
#endif #endif
...@@ -613,7 +613,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli ...@@ -613,7 +613,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
var remaining = timeoutMilliseconds - checked((int)watch.ElapsedMilliseconds); var remaining = timeoutMilliseconds - checked((int)watch.ElapsedMilliseconds);
if (remaining <= 0) if (remaining <= 0)
{ {
#if !NETCORE #if !DNXCORE50
LogLockedWithThreadPoolStats(log, "Timeout before awaiting for tasks", out busyWorkerCount); LogLockedWithThreadPoolStats(log, "Timeout before awaiting for tasks", out busyWorkerCount);
#endif #endif
return false; return false;
...@@ -627,7 +627,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli ...@@ -627,7 +627,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
var any = Task.WhenAny(allTasks, Task.Delay(remaining)).ObserveErrors(); var any = Task.WhenAny(allTasks, Task.Delay(remaining)).ObserveErrors();
#endif #endif
bool all = await any.ForAwait() == allTasks; bool all = await any.ForAwait() == allTasks;
#if !NETCORE #if !DNXCORE50
LogLockedWithThreadPoolStats(log, all ? "All tasks completed cleanly" : "Not all tasks completed cleanly", out busyWorkerCount); LogLockedWithThreadPoolStats(log, all ? "All tasks completed cleanly" : "Not all tasks completed cleanly", out busyWorkerCount);
#endif #endif
return all; return all;
...@@ -645,7 +645,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli ...@@ -645,7 +645,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
var remaining = timeoutMilliseconds - checked((int)watch.ElapsedMilliseconds); var remaining = timeoutMilliseconds - checked((int)watch.ElapsedMilliseconds);
if (remaining <= 0) if (remaining <= 0)
{ {
#if !NETCORE #if !DNXCORE50
LogLockedWithThreadPoolStats(log, "Timeout awaiting tasks", out busyWorkerCount); LogLockedWithThreadPoolStats(log, "Timeout awaiting tasks", out busyWorkerCount);
#endif #endif
return false; return false;
...@@ -663,7 +663,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli ...@@ -663,7 +663,7 @@ private async Task<bool> WaitAllIgnoreErrorsAsync(Task[] tasks, int timeoutMilli
{ } { }
} }
} }
#if !NETCORE #if !DNXCORE50
LogLockedWithThreadPoolStats(log, "Finished awaiting tasks", out busyWorkerCount); LogLockedWithThreadPoolStats(log, "Finished awaiting tasks", out busyWorkerCount);
#endif #endif
return false; return false;
...@@ -1887,7 +1887,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser ...@@ -1887,7 +1887,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
else else
{ {
int inst, qu, qs, qc, wr, wq, @in, ar; int inst, qu, qs, qc, wr, wq, @in, ar;
#if !__MonoCS__ && !NETCORE #if !__MonoCS__ && !DNXCORE50
var mgrState = socketManager.State; var mgrState = socketManager.State;
var lastError = socketManager.LastErrorTimeRelative(); var lastError = socketManager.LastErrorTimeRelative();
...@@ -1902,7 +1902,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser ...@@ -1902,7 +1902,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
int queue = server.GetOutstandingCount(message.Command, out inst, out qu, out qs, out qc, out wr, out wq, out @in, out ar); int queue = server.GetOutstandingCount(message.Command, out inst, out qu, out qs, out qc, out wr, out wq, out @in, out ar);
add("Instantaneous", "inst", inst.ToString()); add("Instantaneous", "inst", inst.ToString());
#if !__MonoCS__ && !NETCORE #if !__MonoCS__ && !DNXCORE50
add("Manager-State", "mgr", mgrState.ToString()); add("Manager-State", "mgr", mgrState.ToString());
add("Last-Error", "err", lastError); add("Last-Error", "err", lastError);
#endif #endif
...@@ -1916,7 +1916,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser ...@@ -1916,7 +1916,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
add("Active-Readers", "ar", ar.ToString()); add("Active-Readers", "ar", ar.ToString());
add("Client-Name", "clientName", ClientName); add("Client-Name", "clientName", ClientName);
#if !NETCORE #if !DNXCORE50
string iocp, worker; string iocp, worker;
int busyWorkerCount = GetThreadPoolStats(out iocp, out worker); int busyWorkerCount = GetThreadPoolStats(out iocp, out worker);
add("ThreadPool-IO-Completion", "IOCP", iocp); add("ThreadPool-IO-Completion", "IOCP", iocp);
...@@ -1953,7 +1953,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser ...@@ -1953,7 +1953,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
} }
} }
#if !NETCORE #if !DNXCORE50
private static int GetThreadPoolStats(out string iocp, out string worker) private static int GetThreadPoolStats(out string iocp, out string worker)
{ {
//BusyThreads = TP.GetMaxThreads() –TP.GetAVailable(); //BusyThreads = TP.GetMaxThreads() –TP.GetAVailable();
......
...@@ -32,7 +32,7 @@ public HashEntry(RedisValue name, RedisValue value) ...@@ -32,7 +32,7 @@ public HashEntry(RedisValue name, RedisValue value)
/// The name of the hash field /// The name of the hash field
/// </summary> /// </summary>
[ [
#if !NETCORE #if !DNXCORE50
Browsable(false), Browsable(false),
#endif #endif
EditorBrowsable(EditorBrowsableState.Never), Obsolete("Please use Name", false)] EditorBrowsable(EditorBrowsableState.Never), Obsolete("Please use Name", false)]
......
#if NETCORE #if DNXCORE50
using System; using System;
#endif #endif
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
...@@ -11,7 +11,7 @@ internal static class InternalRegexCompiledOption ...@@ -11,7 +11,7 @@ internal static class InternalRegexCompiledOption
static InternalRegexCompiledOption() static InternalRegexCompiledOption()
{ {
#if NETCORE #if DNXCORE50
if (!Enum.TryParse("Compiled", out RegexCompiledOption)) if (!Enum.TryParse("Compiled", out RegexCompiledOption))
RegexCompiledOption = RegexOptions.None; RegexCompiledOption = RegexOptions.None;
#else #else
......
...@@ -306,7 +306,7 @@ public int CompareTo(RedisValue other) ...@@ -306,7 +306,7 @@ public int CompareTo(RedisValue other)
if (otherType == CompareType.Double) return thisDouble.CompareTo(otherDouble); if (otherType == CompareType.Double) return thisDouble.CompareTo(otherDouble);
} }
// otherwise, compare as strings // otherwise, compare as strings
#if !NETCORE #if !DNXCORE50
return StringComparer.InvariantCulture.Compare((string)this, (string)other); return StringComparer.InvariantCulture.Compare((string)this, (string)other);
#else #else
var compareInfo = System.Globalization.CultureInfo.InvariantCulture.CompareInfo; var compareInfo = System.Globalization.CultureInfo.InvariantCulture.CompareInfo;
......
...@@ -313,7 +313,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc ...@@ -313,7 +313,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
LocalBuilder redisKeyLoc = null; LocalBuilder redisKeyLoc = null;
var loc = il.DeclareLocal(t); var loc = il.DeclareLocal(t);
il.Emit(OpCodes.Ldarg_0); // object il.Emit(OpCodes.Ldarg_0); // object
#if !NETCORE #if !DNXCORE50
if (t.IsValueType) if (t.IsValueType)
#else #else
if (t.GetTypeInfo().IsValueType) if (t.GetTypeInfo().IsValueType)
...@@ -348,7 +348,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc ...@@ -348,7 +348,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
{ {
il.Emit(OpCodes.Dup); // RedisKey[] RedisKey[] il.Emit(OpCodes.Dup); // RedisKey[] RedisKey[]
il.Emit(OpCodes.Ldc_I4, i); // RedisKey[] RedisKey[] int il.Emit(OpCodes.Ldc_I4, i); // RedisKey[] RedisKey[] int
#if !NETCORE #if !DNXCORE50
if (t.IsValueType) if (t.IsValueType)
#else #else
if (t.GetTypeInfo().IsValueType) if (t.GetTypeInfo().IsValueType)
...@@ -380,7 +380,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc ...@@ -380,7 +380,7 @@ static void PrefixIfNeeded(ILGenerator il, LocalBuilder needsPrefixBool, ref Loc
{ {
il.Emit(OpCodes.Dup); // RedisKey[] RedisValue[] RedisValue[] il.Emit(OpCodes.Dup); // RedisKey[] RedisValue[] RedisValue[]
il.Emit(OpCodes.Ldc_I4, i); // RedisKey[] RedisValue[] RedisValue[] int il.Emit(OpCodes.Ldc_I4, i); // RedisKey[] RedisValue[] RedisValue[] int
#if !NETCORE #if !DNXCORE50
if (t.IsValueType) if (t.IsValueType)
#else #else
if (t.GetTypeInfo().IsValueType) if (t.GetTypeInfo().IsValueType)
......
#if __MonoCS__ || NETCORE #if __MonoCS__ || DNXCORE50
namespace StackExchange.Redis namespace StackExchange.Redis
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
#if !__MonoCS__ && !NETCORE #if !__MonoCS__ && !DNXCORE50
namespace StackExchange.Redis namespace StackExchange.Redis
{ {
...@@ -376,12 +376,8 @@ private void ReadImpl() ...@@ -376,12 +376,8 @@ private void ReadImpl()
private void StartReader() private void StartReader()
{ {
#if !NETCORE
var thread = new Thread(read, 32 * 1024); // don't need a huge stack var thread = new Thread(read, 32 * 1024); // don't need a huge stack
thread.Priority = ThreadPriority.AboveNormal; // time critical thread.Priority = ThreadPriority.AboveNormal; // time critical
#else
var thread = new Thread(read); // don't need a huge stack
#endif
thread.Name = name + ":Read"; thread.Name = name + ":Read";
thread.IsBackground = true; thread.IsBackground = true;
thread.Start(this); thread.Start(this);
......
...@@ -126,7 +126,7 @@ public SocketManager(string name = null) ...@@ -126,7 +126,7 @@ public SocketManager(string name = null)
// we need a dedicated writer, because when under heavy ambient load // we need a dedicated writer, because when under heavy ambient load
// (a busy asp.net site, for example), workers are not reliable enough // (a busy asp.net site, for example), workers are not reliable enough
#if !NETCORE #if !DNXCORE50
Thread dedicatedWriter = new Thread(writeAllQueues, 32 * 1024); // don't need a huge stack; Thread dedicatedWriter = new Thread(writeAllQueues, 32 * 1024); // don't need a huge stack;
dedicatedWriter.Priority = ThreadPriority.AboveNormal; // time critical dedicatedWriter.Priority = ThreadPriority.AboveNormal; // time critical
#else #else
...@@ -221,7 +221,7 @@ internal void SetFastLoopbackOption(Socket socket) ...@@ -221,7 +221,7 @@ internal void SetFastLoopbackOption(Socket socket)
// SIO_LOOPBACK_FAST_PATH (http://msdn.microsoft.com/en-us/library/windows/desktop/jj841212%28v=vs.85%29.aspx) // SIO_LOOPBACK_FAST_PATH (http://msdn.microsoft.com/en-us/library/windows/desktop/jj841212%28v=vs.85%29.aspx)
// Speeds up localhost operations significantly. OK to apply to a socket that will not be hooked up to localhost, // Speeds up localhost operations significantly. OK to apply to a socket that will not be hooked up to localhost,
// or will be subject to WFP filtering. // or will be subject to WFP filtering.
#if !NETCORE #if !DNXCORE50
const int SIO_LOOPBACK_FAST_PATH = -1744830448; const int SIO_LOOPBACK_FAST_PATH = -1744830448;
// windows only // windows only
...@@ -340,7 +340,7 @@ private void Shutdown(Socket socket) ...@@ -340,7 +340,7 @@ private void Shutdown(Socket socket)
{ {
OnShutdown(socket); OnShutdown(socket);
try { socket.Shutdown(SocketShutdown.Both); } catch { } try { socket.Shutdown(SocketShutdown.Both); } catch { }
#if !NETCORE #if !DNXCORE50
try { socket.Close(); } catch { } try { socket.Close(); } catch { }
#endif #endif
try { socket.Dispose(); } catch { } try { socket.Dispose(); } catch { }
......
...@@ -33,7 +33,7 @@ public SortedSetEntry(RedisValue element, double score) ...@@ -33,7 +33,7 @@ public SortedSetEntry(RedisValue element, double score)
/// The score against the element /// The score against the element
/// </summary> /// </summary>
[ [
#if !NETCORE #if !DNXCORE50
Browsable(false), Browsable(false),
#endif #endif
EditorBrowsable(EditorBrowsableState.Never), Obsolete("Please use Score", false)] EditorBrowsable(EditorBrowsableState.Never), Obsolete("Please use Score", false)]
...@@ -43,7 +43,7 @@ public SortedSetEntry(RedisValue element, double score) ...@@ -43,7 +43,7 @@ public SortedSetEntry(RedisValue element, double score)
/// The unique element stored in the sorted set /// The unique element stored in the sorted set
/// </summary> /// </summary>
[ [
#if !NETCORE #if !DNXCORE50
Browsable(false), Browsable(false),
#endif #endif
EditorBrowsable(EditorBrowsableState.Never), Obsolete("Please use Element", false)] EditorBrowsable(EditorBrowsableState.Never), Obsolete("Please use Element", false)]
......
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