Commit e4a01848 authored by Jeremy Meng's avatar Jeremy Meng

Exclude platform-specific code for NetCore. Remove usage of unsupported IClone interface.

parent 65e141ec
......@@ -29,7 +29,10 @@ public enum Proxy
/// <summary>
/// The options relevant to a set of redis connections
/// </summary>
public sealed class ConfigurationOptions : ICloneable
public sealed class ConfigurationOptions
#if !NETCORE
: ICloneable
#endif
{
internal const string DefaultTieBreaker = "__Booksleeve_TieBreak", DefaultConfigurationChannel = "__Booksleeve_MasterChanged";
......@@ -467,10 +470,13 @@ static void Append(StringBuilder sb, string prefix, object value)
}
}
#if !NETCORE
static bool IsOption(string option, string prefix)
{
return option.StartsWith(prefix, StringComparison.InvariantCultureIgnoreCase);
}
#endif
void Clear()
{
clientName = serviceName = password = tieBreaker = sslHost = configChannel = null;
......@@ -486,7 +492,9 @@ void Clear()
SocketManager = null;
}
#if !NETCORE
object ICloneable.Clone() { return Clone(); }
#endif
private void DoParse(string configuration, bool ignoreUnknown)
{
......
......@@ -1887,7 +1887,6 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
else
{
int inst, qu, qs, qc, wr, wq, @in, ar;
string iocp, worker;
#if !__MonoCS__
var mgrState = socketManager.State;
var lastError = socketManager.LastErrorTimeRelative();
......@@ -1918,6 +1917,7 @@ internal T ExecuteSyncImpl<T>(Message message, ResultProcessor<T> processor, Ser
add("Client-Name", "clientName", ClientName);
#if !NETCORE
string iocp, worker;
int busyWorkerCount = GetThreadPoolStats(out iocp, out worker);
add("ThreadPool-IO-Completion", "IOCP", iocp);
add("ThreadPool-Workers", "WORKER", worker);
......
......@@ -221,6 +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)
// 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.
#if !NETCORE
const int SIO_LOOPBACK_FAST_PATH = -1744830448;
// windows only
......@@ -234,6 +235,7 @@ internal void SetFastLoopbackOption(Socket socket)
socket.IOControl(SIO_LOOPBACK_FAST_PATH, optionInValue, null);
}
}
#endif
}
internal void RequestWrite(PhysicalBridge bridge, bool forced)
......
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