Commit e6d810c4 authored by Nick Craver's avatar Nick Craver

Static initializers run in order and I'm an idiot.

parent 5505ace5
using System; using System;
using System.IO.Compression;
namespace StackExchange.Redis namespace StackExchange.Redis
{ {
internal class PlatformHelper internal class PlatformHelper
{ {
public static SocketMode DefaultSocketMode => IsMono && IsUnix ? SocketMode.Async : SocketMode.Poll; public static bool IsMono { get; } = Type.GetType("Mono.Runtime") != null;
public static bool IsUnix { get; } = (int)Environment.OSVersion.Platform == 4
|| (int)Environment.OSVersion.Platform == 6
|| (int)Environment.OSVersion.Platform == 128;
public static bool IsMono => Type.GetType("Mono.Runtime") != null; public static SocketMode DefaultSocketMode = IsMono && IsUnix ? SocketMode.Async : SocketMode.Poll;
public static bool IsUnix => (int)Environment.OSVersion.Platform == 4
|| (int)Environment.OSVersion.Platform == 6
|| (int)Environment.OSVersion.Platform == 128;
} }
} }
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