using System.Threading.Tasks; namespace System.Net.WebSockets { // Needed to support the WebSockets code from CoreFX. internal static class CompatHelpers { internal static readonly Task CompletedTask; static CompatHelpers() { var tcs = new TaskCompletionSource(); tcs.SetResult(null); CompletedTask = tcs.Task; } public static Task FromException(Exception ex) { return Task.FromException(ex); } public static Task FromException(Exception ex) { return Task.FromException(ex); } internal static T[] Empty() { return Array.Empty(); } } // This is just here to be used by a nameof in the CoreFX code. //internal static class ClientWebSocket { } }