From: Chris Ross Date: Thu, 20 Feb 2020 21:42:07 +0000 (-0800) Subject: Move System.Net.Quic to internal shared source (#32549) (#32610) X-Git-Tag: submit/tizen/20210909.063632~9584 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfac865f9d44a443843d7dfc660a497f7d5bdf5a;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Move System.Net.Quic to internal shared source (#32549) (#32610) --- diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs new file mode 100644 index 0000000..46cd2ee --- /dev/null +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/NetEventSource.Common.cs @@ -0,0 +1,738 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +#if DEBUG +// Uncomment to enable runtime checks to help validate that NetEventSource isn't being misused +// in a way that will cause performance problems, e.g. unexpected boxing of value types. +//#define DEBUG_NETEVENTSOURCE_MISUSE +#endif + +#nullable enable +using System.Collections; +using System.Diagnostics; +using System.Diagnostics.Tracing; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +#if NET46 +using System.Security; +#endif + +#pragma warning disable CA1823 // not all IDs are used by all partial providers + +namespace System.Net +{ + // Implementation: + // This partial file is meant to be consumed into each System.Net.* assembly that needs to log. Each such assembly also provides + // its own NetEventSource partial class that adds an appropriate [EventSource] attribute, giving it a unique name for that assembly. + // Those partials can then also add additional events if needed, starting numbering from the NextAvailableEventId defined by this partial. + + // Usage: + // - Operations that may allocate (e.g. boxing a value type, using string interpolation, etc.) or that may have computations + // at call sites should guard access like: + // if (NetEventSource.IsEnabled) NetEventSource.Enter(this, refArg1, valueTypeArg2); // entering an instance method with a value type arg + // if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"Found certificate: {cert}"); // info logging with a formattable string + // - Operations that have zero allocations / measurable computations at call sites can use a simpler pattern, calling methods like: + // NetEventSource.Enter(this); // entering an instance method + // NetEventSource.Info(this, "literal string"); // arbitrary message with a literal string + // NetEventSource.Enter(this, refArg1, regArg2); // entering an instance method with two reference type arguments + // NetEventSource.Enter(null); // entering a static method + // NetEventSource.Enter(null, refArg1); // entering a static method with one reference type argument + // Debug.Asserts inside the logging methods will help to flag some misuse if the DEBUG_NETEVENTSOURCE_MISUSE compilation constant is defined. + // However, because it can be difficult by observation to understand all of the costs involved, guarding can be done everywhere. + // - NetEventSource.Fail calls typically do not need to be prefixed with an IsEnabled check, even if they allocate, as FailMessage + // should only be used in cases similar to Debug.Fail, where they are not expected to happen in retail builds, and thus extra costs + // don't matter. + // - Messages can be strings, formattable strings, or any other object. Objects (including those used in formattable strings) have special + // formatting applied, controlled by the Format method. Partial specializations can also override this formatting by implementing a partial + // method that takes an object and optionally provides a string representation of it, in case a particular library wants to customize further. + + /// Provides logging facilities for System.Net libraries. +#if NET46 + [SecuritySafeCritical] +#endif + internal sealed partial class NetEventSource : EventSource + { + /// The single event source instance to use for all logging. + public static readonly NetEventSource Log = new NetEventSource(); + + #region Metadata + public class Keywords + { + public const EventKeywords Default = (EventKeywords)0x0001; + public const EventKeywords Debug = (EventKeywords)0x0002; + public const EventKeywords EnterExit = (EventKeywords)0x0004; + } + + private const string MissingMember = "(?)"; + private const string NullInstance = "(null)"; + private const string StaticMethodObject = "(static)"; + private const string NoParameters = ""; + private const int MaxDumpSize = 1024; + + private const int EnterEventId = 1; + private const int ExitEventId = 2; + private const int AssociateEventId = 3; + private const int InfoEventId = 4; + private const int ErrorEventId = 5; + private const int CriticalFailureEventId = 6; + private const int DumpArrayEventId = 7; + + // These events are implemented in NetEventSource.Security.cs. + // Define the ids here so that projects that include NetEventSource.Security.cs will not have conflicts. + private const int EnumerateSecurityPackagesId = 8; + private const int SspiPackageNotFoundId = 9; + private const int AcquireDefaultCredentialId = 10; + private const int AcquireCredentialsHandleId = 11; + private const int InitializeSecurityContextId = 12; + private const int SecurityContextInputBufferId = 13; + private const int SecurityContextInputBuffersId = 14; + private const int AcceptSecuritContextId = 15; + private const int OperationReturnedSomethingId = 16; + + private const int NextAvailableEventId = 17; // Update this value whenever new events are added. Derived types should base all events off of this to avoid conflicts. + #endregion + + #region Events + #region Enter + /// Logs entrance to a method. + /// `this`, or another object that serves to provide context for the operation. + /// A description of the entrance, including any arguments to the call. + /// The calling member. + [NonEvent] + public static void Enter(object? thisOrContextObject, FormattableString? formattableString = null, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(formattableString); + if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters); + } + + /// Logs entrance to a method. + /// `this`, or another object that serves to provide context for the operation. + /// The object to log. + /// The calling member. + [NonEvent] + public static void Enter(object? thisOrContextObject, object arg0, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(arg0); + if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)})"); + } + + /// Logs entrance to a method. + /// `this`, or another object that serves to provide context for the operation. + /// The first object to log. + /// The second object to log. + /// The calling member. + [NonEvent] + public static void Enter(object? thisOrContextObject, object arg0, object arg1, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(arg0); + DebugValidateArg(arg1); + if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)})"); + } + + /// Logs entrance to a method. + /// `this`, or another object that serves to provide context for the operation. + /// The first object to log. + /// The second object to log. + /// The third object to log. + /// The calling member. + [NonEvent] + public static void Enter(object? thisOrContextObject, object arg0, object arg1, object arg2, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(arg0); + DebugValidateArg(arg1); + DebugValidateArg(arg2); + if (IsEnabled) Log.Enter(IdOf(thisOrContextObject), memberName, $"({Format(arg0)}, {Format(arg1)}, {Format(arg2)})"); + } + + [Event(EnterEventId, Level = EventLevel.Informational, Keywords = Keywords.EnterExit)] + private void Enter(string thisOrContextObject, string? memberName, string parameters) => + WriteEvent(EnterEventId, thisOrContextObject, memberName ?? MissingMember, parameters); + #endregion + + #region Exit + /// Logs exit from a method. + /// `this`, or another object that serves to provide context for the operation. + /// A description of the exit operation, including any return values. + /// The calling member. + [NonEvent] + public static void Exit(object? thisOrContextObject, FormattableString? formattableString = null, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(formattableString); + if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters); + } + + /// Logs exit from a method. + /// `this`, or another object that serves to provide context for the operation. + /// A return value from the member. + /// The calling member. + [NonEvent] + public static void Exit(object? thisOrContextObject, object arg0, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(arg0); + if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, Format(arg0).ToString()); + } + + /// Logs exit from a method. + /// `this`, or another object that serves to provide context for the operation. + /// A return value from the member. + /// A second return value from the member. + /// The calling member. + [NonEvent] + public static void Exit(object? thisOrContextObject, object arg0, object arg1, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(arg0); + DebugValidateArg(arg1); + if (IsEnabled) Log.Exit(IdOf(thisOrContextObject), memberName, $"{Format(arg0)}, {Format(arg1)}"); + } + + [Event(ExitEventId, Level = EventLevel.Informational, Keywords = Keywords.EnterExit)] + private void Exit(string thisOrContextObject, string? memberName, string? result) => + WriteEvent(ExitEventId, thisOrContextObject, memberName ?? MissingMember, result); + #endregion + + #region Info + /// Logs an information message. + /// `this`, or another object that serves to provide context for the operation. + /// The message to be logged. + /// The calling member. + [NonEvent] + public static void Info(object? thisOrContextObject, FormattableString? formattableString = null, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(formattableString); + if (IsEnabled) Log.Info(IdOf(thisOrContextObject), memberName, formattableString != null ? Format(formattableString) : NoParameters); + } + + /// Logs an information message. + /// `this`, or another object that serves to provide context for the operation. + /// The message to be logged. + /// The calling member. + [NonEvent] + public static void Info(object? thisOrContextObject, object? message, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(message); + if (IsEnabled) Log.Info(IdOf(thisOrContextObject), memberName, Format(message).ToString()); + } + + [Event(InfoEventId, Level = EventLevel.Informational, Keywords = Keywords.Default)] + private void Info(string thisOrContextObject, string? memberName, string? message) => + WriteEvent(InfoEventId, thisOrContextObject, memberName ?? MissingMember, message); + #endregion + + #region Error + /// Logs an error message. + /// `this`, or another object that serves to provide context for the operation. + /// The message to be logged. + /// The calling member. + [NonEvent] + public static void Error(object? thisOrContextObject, FormattableString formattableString, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(formattableString); + if (IsEnabled) Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(formattableString)); + } + + /// Logs an error message. + /// `this`, or another object that serves to provide context for the operation. + /// The message to be logged. + /// The calling member. + [NonEvent] + public static void Error(object? thisOrContextObject, object message, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(message); + if (IsEnabled) Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(message).ToString()); + } + + [Event(ErrorEventId, Level = EventLevel.Error, Keywords = Keywords.Default)] + private void ErrorMessage(string thisOrContextObject, string? memberName, string? message) => + WriteEvent(ErrorEventId, thisOrContextObject, memberName ?? MissingMember, message); + #endregion + + #region Fail + /// Logs a fatal error and raises an assert. + /// `this`, or another object that serves to provide context for the operation. + /// The message to be logged. + /// The calling member. + [NonEvent] + public static void Fail(object? thisOrContextObject, FormattableString formattableString, [CallerMemberName] string? memberName = null) + { + // Don't call DebugValidateArg on args, as we expect Fail to be used in assert/failure situations + // that should never happen in production, and thus we don't care about extra costs. + + if (IsEnabled) Log.CriticalFailure(IdOf(thisOrContextObject), memberName, Format(formattableString)); + Debug.Fail(Format(formattableString), $"{IdOf(thisOrContextObject)}.{memberName}"); + } + + /// Logs a fatal error and raises an assert. + /// `this`, or another object that serves to provide context for the operation. + /// The message to be logged. + /// The calling member. + [NonEvent] + public static void Fail(object? thisOrContextObject, object message, [CallerMemberName] string? memberName = null) + { + // Don't call DebugValidateArg on args, as we expect Fail to be used in assert/failure situations + // that should never happen in production, and thus we don't care about extra costs. + + if (IsEnabled) Log.CriticalFailure(IdOf(thisOrContextObject), memberName, Format(message).ToString()); + Debug.Fail(Format(message).ToString(), $"{IdOf(thisOrContextObject)}.{memberName}"); + } + + [Event(CriticalFailureEventId, Level = EventLevel.Critical, Keywords = Keywords.Debug)] + private void CriticalFailure(string thisOrContextObject, string? memberName, string? message) => + WriteEvent(CriticalFailureEventId, thisOrContextObject, memberName ?? MissingMember, message); + #endregion + + #region DumpBuffer + /// Logs the contents of a buffer. + /// `this`, or another object that serves to provide context for the operation. + /// The buffer to be logged. + /// The calling member. + [NonEvent] + public static void DumpBuffer(object? thisOrContextObject, byte[] buffer, [CallerMemberName] string? memberName = null) + { + DumpBuffer(thisOrContextObject, buffer, 0, buffer.Length, memberName); + } + + /// Logs the contents of a buffer. + /// `this`, or another object that serves to provide context for the operation. + /// The buffer to be logged. + /// The starting offset from which to log. + /// The number of bytes to log. + /// The calling member. + [NonEvent] + public static void DumpBuffer(object? thisOrContextObject, byte[] buffer, int offset, int count, [CallerMemberName] string? memberName = null) + { + if (IsEnabled) + { + if (offset < 0 || offset > buffer.Length - count) + { + Fail(thisOrContextObject, $"Invalid {nameof(DumpBuffer)} Args. Length={buffer.Length}, Offset={offset}, Count={count}", memberName); + return; + } + + count = Math.Min(count, MaxDumpSize); + + byte[] slice = buffer; + if (offset != 0 || count != buffer.Length) + { + slice = new byte[count]; + Buffer.BlockCopy(buffer, offset, slice, 0, count); + } + + Log.DumpBuffer(IdOf(thisOrContextObject), memberName, slice); + } + } + + /// Logs the contents of a buffer. + /// `this`, or another object that serves to provide context for the operation. + /// The starting location of the buffer to be logged. + /// The number of bytes to log. + /// The calling member. + [NonEvent] + public static unsafe void DumpBuffer(object? thisOrContextObject, IntPtr bufferPtr, int count, [CallerMemberName] string? memberName = null) + { + Debug.Assert(bufferPtr != IntPtr.Zero); + Debug.Assert(count >= 0); + + if (IsEnabled) + { + var buffer = new byte[Math.Min(count, MaxDumpSize)]; + fixed (byte* targetPtr = buffer) + { + Buffer.MemoryCopy((byte*)bufferPtr, targetPtr, buffer.Length, buffer.Length); + } + Log.DumpBuffer(IdOf(thisOrContextObject), memberName, buffer); + } + } + + [Event(DumpArrayEventId, Level = EventLevel.Verbose, Keywords = Keywords.Debug)] + private unsafe void DumpBuffer(string thisOrContextObject, string? memberName, byte[] buffer) => + WriteEvent(DumpArrayEventId, thisOrContextObject, memberName ?? MissingMember, buffer); + #endregion + + #region Associate + /// Logs a relationship between two objects. + /// The first object. + /// The second object. + /// The calling member. + [NonEvent] + public static void Associate(object first, object second, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(first); + DebugValidateArg(second); + if (IsEnabled) Log.Associate(IdOf(first), memberName, IdOf(first), IdOf(second)); + } + + /// Logs a relationship between two objects. + /// `this`, or another object that serves to provide context for the operation. + /// The first object. + /// The second object. + /// The calling member. + [NonEvent] + public static void Associate(object? thisOrContextObject, object first, object second, [CallerMemberName] string? memberName = null) + { + DebugValidateArg(thisOrContextObject); + DebugValidateArg(first); + DebugValidateArg(second); + if (IsEnabled) Log.Associate(IdOf(thisOrContextObject), memberName, IdOf(first), IdOf(second)); + } + + [Event(AssociateEventId, Level = EventLevel.Informational, Keywords = Keywords.Default, Message = "[{2}]<-->[{3}]")] + private void Associate(string thisOrContextObject, string? memberName, string first, string second) => + WriteEvent(AssociateEventId, thisOrContextObject, memberName ?? MissingMember, first, second); + #endregion + #endregion + + #region Helpers + [Conditional("DEBUG_NETEVENTSOURCE_MISUSE")] + private static void DebugValidateArg(object? arg) + { + if (!IsEnabled) + { + Debug.Assert(!(arg is ValueType), $"Should not be passing value type {arg?.GetType()} to logging without IsEnabled check"); + Debug.Assert(!(arg is FormattableString), $"Should not be formatting FormattableString \"{arg}\" if tracing isn't enabled"); + } + } + + [Conditional("DEBUG_NETEVENTSOURCE_MISUSE")] + private static void DebugValidateArg(FormattableString? arg) + { + Debug.Assert(IsEnabled || arg == null, $"Should not be formatting FormattableString \"{arg}\" if tracing isn't enabled"); + } + + public static new bool IsEnabled => + Log.IsEnabled(); + + [NonEvent] + public static string IdOf(object? value) => value != null ? value.GetType().Name + "#" + GetHashCode(value) : NullInstance; + + [NonEvent] + public static int GetHashCode(object value) => value?.GetHashCode() ?? 0; + + [NonEvent] + public static object Format(object? value) + { + // If it's null, return a known string for null values + if (value == null) + { + return NullInstance; + } + + // Give another partial implementation a chance to provide its own string representation + string? result = null; + AdditionalCustomizedToString(value, ref result); + if (result != null) + { + return result; + } + + // Format arrays with their element type name and length + if (value is Array arr) + { + return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]"; + } + + // Format ICollections as the name and count + if (value is ICollection c) + { + return $"{c.GetType().Name}({c.Count})"; + } + + // Format SafeHandles as their type, hash code, and pointer value + if (value is SafeHandle handle) + { + return $"{handle.GetType().Name}:{handle.GetHashCode()}(0x{handle.DangerousGetHandle():X})"; + } + + // Format IntPtrs as hex + if (value is IntPtr) + { + return $"0x{value:X}"; + } + + // If the string representation of the instance would just be its type name, + // use its id instead. + string? toString = value.ToString(); + if (toString == null || toString == value.GetType().FullName) + { + return IdOf(value); + } + + // Otherwise, return the original object so that the caller does default formatting. + return value; + } + + [NonEvent] + private static string Format(FormattableString s) + { + switch (s.ArgumentCount) + { + case 0: return s.Format; + case 1: return string.Format(s.Format, Format(s.GetArgument(0))); + case 2: return string.Format(s.Format, Format(s.GetArgument(0)), Format(s.GetArgument(1))); + case 3: return string.Format(s.Format, Format(s.GetArgument(0)), Format(s.GetArgument(1)), Format(s.GetArgument(2))); + default: + object?[] args = s.GetArguments(); + object[] formattedArgs = new object[args.Length]; + for (int i = 0; i < args.Length; i++) + { + formattedArgs[i] = Format(args[i]); + } + return string.Format(s.Format, formattedArgs); + } + } + + static partial void AdditionalCustomizedToString(T value, ref string? result); + #endregion + + #region Custom WriteEvent overloads + + [NonEvent] + private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? arg3, string? arg4) + { + if (IsEnabled()) + { + if (arg1 == null) arg1 = ""; + if (arg2 == null) arg2 = ""; + if (arg3 == null) arg3 = ""; + if (arg4 == null) arg4 = ""; + + fixed (char* string1Bytes = arg1) + fixed (char* string2Bytes = arg2) + fixed (char* string3Bytes = arg3) + fixed (char* string4Bytes = arg4) + { + const int NumEventDatas = 4; + var descrs = stackalloc EventData[NumEventDatas]; + + descrs[0] = new EventData + { + DataPointer = (IntPtr)string1Bytes, + Size = ((arg1.Length + 1) * 2) + }; + descrs[1] = new EventData + { + DataPointer = (IntPtr)string2Bytes, + Size = ((arg2.Length + 1) * 2) + }; + descrs[2] = new EventData + { + DataPointer = (IntPtr)string3Bytes, + Size = ((arg3.Length + 1) * 2) + }; + descrs[3] = new EventData + { + DataPointer = (IntPtr)string4Bytes, + Size = ((arg4.Length + 1) * 2) + }; + + WriteEventCore(eventId, NumEventDatas, descrs); + } + } + } + + [NonEvent] + private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, byte[]? arg3) + { + if (IsEnabled()) + { + if (arg1 == null) arg1 = ""; + if (arg2 == null) arg2 = ""; + if (arg3 == null) arg3 = Array.Empty(); + + fixed (char* arg1Ptr = arg1) + fixed (char* arg2Ptr = arg2) + fixed (byte* arg3Ptr = arg3) + { + int bufferLength = arg3.Length; + const int NumEventDatas = 4; + var descrs = stackalloc EventData[NumEventDatas]; + + descrs[0] = new EventData + { + DataPointer = (IntPtr)arg1Ptr, + Size = (arg1.Length + 1) * sizeof(char) + }; + descrs[1] = new EventData + { + DataPointer = (IntPtr)arg2Ptr, + Size = (arg2.Length + 1) * sizeof(char) + }; + descrs[2] = new EventData + { + DataPointer = (IntPtr)(&bufferLength), + Size = 4 + }; + descrs[3] = new EventData + { + DataPointer = (IntPtr)arg3Ptr, + Size = bufferLength + }; + + WriteEventCore(eventId, NumEventDatas, descrs); + } + } + } + + [NonEvent] + private unsafe void WriteEvent(int eventId, string? arg1, int arg2, int arg3, int arg4) + { + if (IsEnabled()) + { + if (arg1 == null) arg1 = ""; + + fixed (char* arg1Ptr = arg1) + { + const int NumEventDatas = 4; + var descrs = stackalloc EventData[NumEventDatas]; + + descrs[0] = new EventData + { + DataPointer = (IntPtr)(arg1Ptr), + Size = (arg1.Length + 1) * sizeof(char) + }; + descrs[1] = new EventData + { + DataPointer = (IntPtr)(&arg2), + Size = sizeof(int) + }; + descrs[2] = new EventData + { + DataPointer = (IntPtr)(&arg3), + Size = sizeof(int) + }; + descrs[3] = new EventData + { + DataPointer = (IntPtr)(&arg4), + Size = sizeof(int) + }; + + WriteEventCore(eventId, NumEventDatas, descrs); + } + } + } + + [NonEvent] + private unsafe void WriteEvent(int eventId, string? arg1, int arg2, string? arg3) + { + if (IsEnabled()) + { + if (arg1 == null) arg1 = ""; + if (arg3 == null) arg3 = ""; + + fixed (char* arg1Ptr = arg1) + fixed (char* arg3Ptr = arg3) + { + const int NumEventDatas = 3; + var descrs = stackalloc EventData[NumEventDatas]; + + descrs[0] = new EventData + { + DataPointer = (IntPtr)(arg1Ptr), + Size = (arg1.Length + 1) * sizeof(char) + }; + descrs[1] = new EventData + { + DataPointer = (IntPtr)(&arg2), + Size = sizeof(int) + }; + descrs[2] = new EventData + { + DataPointer = (IntPtr)(arg3Ptr), + Size = (arg3.Length + 1) * sizeof(char) + }; + + WriteEventCore(eventId, NumEventDatas, descrs); + } + } + } + + [NonEvent] + private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, int arg3) + { + if (IsEnabled()) + { + if (arg1 == null) arg1 = ""; + if (arg2 == null) arg2 = ""; + + fixed (char* arg1Ptr = arg1) + fixed (char* arg2Ptr = arg2) + { + const int NumEventDatas = 3; + var descrs = stackalloc EventData[NumEventDatas]; + + descrs[0] = new EventData + { + DataPointer = (IntPtr)(arg1Ptr), + Size = (arg1.Length + 1) * sizeof(char) + }; + descrs[1] = new EventData + { + DataPointer = (IntPtr)(arg2Ptr), + Size = (arg2.Length + 1) * sizeof(char) + }; + descrs[2] = new EventData + { + DataPointer = (IntPtr)(&arg3), + Size = sizeof(int) + }; + + WriteEventCore(eventId, NumEventDatas, descrs); + } + } + } + + [NonEvent] + private unsafe void WriteEvent(int eventId, string? arg1, string? arg2, string? arg3, int arg4) + { + if (IsEnabled()) + { + if (arg1 == null) arg1 = ""; + if (arg2 == null) arg2 = ""; + if (arg3 == null) arg3 = ""; + + fixed (char* arg1Ptr = arg1) + fixed (char* arg2Ptr = arg2) + fixed (char* arg3Ptr = arg3) + { + const int NumEventDatas = 4; + var descrs = stackalloc EventData[NumEventDatas]; + + descrs[0] = new EventData + { + DataPointer = (IntPtr)(arg1Ptr), + Size = (arg1.Length + 1) * sizeof(char) + }; + descrs[1] = new EventData + { + DataPointer = (IntPtr)(arg2Ptr), + Size = (arg2.Length + 1) * sizeof(char) + }; + descrs[2] = new EventData + { + DataPointer = (IntPtr)(arg3Ptr), + Size = (arg3.Length + 1) * sizeof(char) + }; + descrs[3] = new EventData + { + DataPointer = (IntPtr)(&arg4), + Size = sizeof(int) + }; + + WriteEventCore(eventId, NumEventDatas, descrs); + } + } + } + #endregion + } +} diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockConnection.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockConnection.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockConnection.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockConnection.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockImplementationProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockImplementationProvider.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockImplementationProvider.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockImplementationProvider.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockListener.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockListener.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockListener.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockListener.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockStream.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockStream.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/Mock/MockStream.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/Mock/MockStream.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicApi.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicParameterHelpers.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSecurityConfig.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/MsQuicSession.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/QuicExceptionHelpers.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/Internal/ResettableCompletionSource.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicConnection.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicConnection.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicConnection.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicConnection.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicImplementationProvider.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicListener.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs similarity index 98% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicListener.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs index 20d677a..14323d9 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicListener.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicListener.cs @@ -170,9 +170,8 @@ namespace System.Net.Quic.Implementations.MsQuic return MsQuicStatusCodes.InternalError; } } - catch (Exception ex) + catch (Exception) { - Console.WriteLine(ex.Message); return MsQuicStatusCodes.InternalError; } } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicStream.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/MsQuic/MsQuicStream.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicConnectionProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicConnectionProvider.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicConnectionProvider.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicConnectionProvider.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicImplementationProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs similarity index 90% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicImplementationProvider.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs index 683a752..906f456 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicImplementationProvider.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicImplementationProvider.cs @@ -6,7 +6,7 @@ using System.Net.Security; namespace System.Net.Quic.Implementations { - public abstract class QuicImplementationProvider + internal abstract class QuicImplementationProvider { internal QuicImplementationProvider() { } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicListenerProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicListenerProvider.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicListenerProvider.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicListenerProvider.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicStreamProvider.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicStreamProvider.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/QuicStreamProvider.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Implementations/QuicStreamProvider.cs diff --git a/src/libraries/System.Net.Quic/src/Interop/Interop.MsQuic.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/Interop.MsQuic.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/Interop/Interop.MsQuic.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/Interop.MsQuic.cs diff --git a/src/libraries/System.Net.Quic/src/Interop/MsQuicEnums.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicEnums.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/Interop/MsQuicEnums.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicEnums.cs diff --git a/src/libraries/System.Net.Quic/src/Interop/MsQuicNativeMethods.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicNativeMethods.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/Interop/MsQuicNativeMethods.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicNativeMethods.cs diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs new file mode 100644 index 0000000..72c3568 --- /dev/null +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusCodes.cs @@ -0,0 +1,121 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; + +namespace System.Net.Quic.Implementations.MsQuic.Internal +{ + internal static class MsQuicStatusCodes + { + internal static readonly uint Success = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Windows.Success : Linux.Success; + internal static readonly uint Pending = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Windows.Pending : Linux.Pending; + internal static readonly uint InternalError = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? Windows.InternalError : Linux.InternalError; + + // TODO return better error messages here. + public static string GetError(uint status) + { + return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) + ? Windows.GetError(status) : Linux.GetError(status); + } + + private static class Windows + { + internal const uint Success = 0; + internal const uint Pending = 0x703E5; + internal const uint Continue = 0x704DE; + internal const uint OutOfMemory = 0x8007000E; + internal const uint InvalidParameter = 0x80070057; + internal const uint InvalidState = 0x8007139F; + internal const uint NotSupported = 0x80004002; + internal const uint NotFound = 0x80070490; + internal const uint BufferTooSmall = 0x8007007A; + internal const uint HandshakeFailure = 0x80410000; + internal const uint Aborted = 0x80004004; + internal const uint AddressInUse = 0x80072740; + internal const uint ConnectionTimeout = 0x800704CF; + internal const uint ConnectionIdle = 0x800704D4; + internal const uint InternalError = 0x80004005; + internal const uint ServerBusy = 0x800704C9; + internal const uint ProtocolError = 0x800704CD; + internal const uint HostUnreachable = 0x800704D0; + internal const uint VerNegError = 0x80410001; + + // TODO return better error messages here. + public static string GetError(uint status) + { + return status switch + { + Success => "SUCCESS", + Pending => "PENDING", + Continue => "CONTINUE", + OutOfMemory => "OUT_OF_MEMORY", + InvalidParameter => "INVALID_PARAMETER", + InvalidState => "INVALID_STATE", + NotSupported => "NOT_SUPPORTED", + NotFound => "NOT_FOUND", + BufferTooSmall => "BUFFER_TOO_SMALL", + HandshakeFailure => "HANDSHAKE_FAILURE", + Aborted => "ABORTED", + AddressInUse => "ADDRESS_IN_USE", + ConnectionTimeout => "CONNECTION_TIMEOUT", + ConnectionIdle => "CONNECTION_IDLE", + InternalError => "INTERNAL_ERROR", + ServerBusy => "SERVER_BUSY", + ProtocolError => "PROTOCOL_ERROR", + VerNegError => "VER_NEG_ERROR", + _ => status.ToString() + }; + } + } + + private static class Linux + { + internal const uint Success = 0; + internal const uint Pending = unchecked((uint)-2); + internal const uint Continue = unchecked((uint)-1); + internal const uint OutOfMemory = 12; + internal const uint InvalidParameter = 22; + internal const uint InvalidState = 200000002; + internal const uint NotSupported = 95; + internal const uint NotFound = 2; + internal const uint BufferTooSmall = 75; + internal const uint HandshakeFailure = 200000009; + internal const uint Aborted = 200000008; + internal const uint AddressInUse = 98; + internal const uint ConnectionTimeout = 110; + internal const uint ConnectionIdle = 200000011; + internal const uint InternalError = 200000012; + internal const uint ServerBusy = 200000007; + internal const uint ProtocolError = 200000013; + internal const uint VerNegError = 200000014; + + // TODO return better error messages here. + public static string GetError(uint status) + { + return status switch + { + Success => "SUCCESS", + Pending => "PENDING", + Continue => "CONTINUE", + OutOfMemory => "OUT_OF_MEMORY", + InvalidParameter => "INVALID_PARAMETER", + InvalidState => "INVALID_STATE", + NotSupported => "NOT_SUPPORTED", + NotFound => "NOT_FOUND", + BufferTooSmall => "BUFFER_TOO_SMALL", + HandshakeFailure => "HANDSHAKE_FAILURE", + Aborted => "ABORTED", + AddressInUse => "ADDRESS_IN_USE", + ConnectionTimeout => "CONNECTION_TIMEOUT", + ConnectionIdle => "CONNECTION_IDLE", + InternalError => "INTERNAL_ERROR", + ServerBusy => "SERVER_BUSY", + ProtocolError => "PROTOCOL_ERROR", + VerNegError => "VER_NEG_ERROR", + _ => status.ToString() + }; + } + } + } +} diff --git a/src/libraries/System.Net.Quic/src/Interop/Linux/MsQuicStatusHelper.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs similarity index 50% rename from src/libraries/System.Net.Quic/src/Interop/Linux/MsQuicStatusHelper.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs index 7c49a8f..f08eb86 100644 --- a/src/libraries/System.Net.Quic/src/Interop/Linux/MsQuicStatusHelper.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/Interop/MsQuicStatusHelper.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. @@ -10,7 +10,17 @@ namespace System.Net.Quic.Implementations.MsQuic.Internal { internal static bool SuccessfulStatusCode(uint status) { - return (int)status <= 0; + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + { + return status < 0x80000000; + } + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + return (int)status <= 0; + } + + return false; } } } diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/NetEventSource.Quic.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/NetEventSource.Quic.cs similarity index 100% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/NetEventSource.Quic.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/NetEventSource.Quic.cs diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs similarity index 97% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs index 17270a4..a9a9b0e 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicClientConnectionOptions.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicClientConnectionOptions.cs @@ -9,7 +9,7 @@ namespace System.Net.Quic /// /// Options to provide to the when connecting to a Listener. /// - public class QuicClientConnectionOptions + internal class QuicClientConnectionOptions { /// /// Client authentication options to use when establishing a . diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs similarity index 98% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs index 20a63b2..877421a 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnection.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnection.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace System.Net.Quic { - public sealed class QuicConnection : IDisposable + internal sealed class QuicConnection : IDisposable { private readonly QuicConnectionProvider _provider; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnectionAbortedException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs similarity index 90% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnectionAbortedException.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs index b974881..41f4b32 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicConnectionAbortedException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicConnectionAbortedException.cs @@ -4,7 +4,7 @@ namespace System.Net.Quic { - public class QuicConnectionAbortedException : QuicException + internal class QuicConnectionAbortedException : QuicException { internal QuicConnectionAbortedException(long errorCode) : this(SR.Format(SR.net_quic_connectionaborted, errorCode), errorCode) diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs similarity index 88% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicException.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs index b84bc1b..843c2f7 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicException.cs @@ -4,7 +4,7 @@ namespace System.Net.Quic { - public class QuicException : Exception + internal class QuicException : Exception { public QuicException(string message) : base (message) diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicImplementationProviders.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs similarity index 91% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicImplementationProviders.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs index e3490d2..66a7e0d 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicImplementationProviders.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicImplementationProviders.cs @@ -4,7 +4,7 @@ namespace System.Net.Quic { - public static class QuicImplementationProviders + internal static class QuicImplementationProviders { public static Implementations.QuicImplementationProvider Mock { get; } = new Implementations.Mock.MockImplementationProvider(); public static Implementations.QuicImplementationProvider MsQuic { get; } = new Implementations.MsQuic.MsQuicImplementationProvider(); diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs similarity index 97% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs index b642b9d..8fb0c1e 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListener.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListener.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace System.Net.Quic { - public sealed class QuicListener : IDisposable + internal sealed class QuicListener : IDisposable { private readonly QuicListenerProvider _provider; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListenerOptions.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs similarity index 98% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListenerOptions.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs index f315945..f9eae30 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListenerOptions.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicListenerOptions.cs @@ -9,7 +9,7 @@ namespace System.Net.Quic /// /// Options to provide to the . /// - public class QuicListenerOptions + internal class QuicListenerOptions { /// /// Server Ssl options to use for ALPN, SNI, etc. diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicOperationAbortedException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs similarity index 87% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicOperationAbortedException.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs index 1dbdd17..25cd145 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicOperationAbortedException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicOperationAbortedException.cs @@ -4,7 +4,7 @@ namespace System.Net.Quic { - public class QuicOperationAbortedException : QuicException + internal class QuicOperationAbortedException : QuicException { internal QuicOperationAbortedException() : base(SR.net_quic_operationaborted) diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs similarity index 99% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs index 5524784..6e52bb0 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStream.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStream.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace System.Net.Quic { - public sealed class QuicStream : Stream + internal sealed class QuicStream : Stream { private readonly QuicStreamProvider _provider; diff --git a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStreamAbortedException.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs similarity index 90% rename from src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStreamAbortedException.cs rename to src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs index 7df6662..6e25335 100644 --- a/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicStreamAbortedException.cs +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/Quic/QuicStreamAbortedException.cs @@ -4,7 +4,7 @@ namespace System.Net.Quic { - public class QuicStreamAbortedException : QuicException + internal class QuicStreamAbortedException : QuicException { internal QuicStreamAbortedException(long errorCode) : this(SR.Format(SR.net_quic_streamaborted, errorCode), errorCode) diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.Quic.cs b/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.Quic.cs new file mode 100644 index 0000000..6a756f9 --- /dev/null +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.Quic.cs @@ -0,0 +1,20 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +namespace System.Net.Quic +{ + internal static partial class SR + { + // The resource generator used in AspNetCore does not create this method. This file fills in that functional gap + // so we don't have to modify the shared source. + internal static string Format(string resourceFormat, params object[] args) + { + if (args != null) + { + return string.Format(resourceFormat, args); + } + + return resourceFormat; + } + } +} diff --git a/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.resx b/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.resx index bcd721a..c6c8b9b 100644 --- a/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.resx +++ b/src/libraries/Common/src/System/Net/Http/aspnetcore/SR.resx @@ -156,4 +156,16 @@ Request headers must contain only ASCII characters. + + Connection aborted by peer ({0}). + + + QUIC is not supported on this platform. See http://aka.ms/dotnetquic + + + Operation aborted. + + + Stream aborted by peer ({0}). + \ No newline at end of file diff --git a/src/libraries/Common/tests/Common.Tests.csproj b/src/libraries/Common/tests/Common.Tests.csproj index 2d09401..85bcb69 100644 --- a/src/libraries/Common/tests/Common.Tests.csproj +++ b/src/libraries/Common/tests/Common.Tests.csproj @@ -1,9 +1,9 @@ - + true false true - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix + $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX @@ -93,6 +93,111 @@ Common\System\Net\Http\aspnetcore\Http2\Hpack\StatusCodes.cs + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicAddressHelpers.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicApi.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicParameterHelpers.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicSecurityConfig.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicSession.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\QuicExceptionHelpers.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\ResettableCompletionSource.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicConnection.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicImplementationProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicListener.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicStream.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicImplementationProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicListenerProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicConnectionProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicStreamProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockImplementationProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockListener.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockConnection.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockStream.cs + + + Common\System\Net\Http\aspnetcore\Quic\NetEventSource.Quic.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicClientConnectionOptions.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicImplementationProviders.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicConnection.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicListener.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicListenerOptions.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicOperationAbortedException.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicStream.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicException.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicConnectionAbortedException.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicStreamAbortedException.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\Interop.MsQuic.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicEnums.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicNativeMethods.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicStatusCodes.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicStatusHelper.cs + Common\System\Text\ReusableTextReader.cs @@ -139,6 +244,9 @@ + + Common\System\Net\Logging\NetEventSource.Common.cs + Common\System\Threading\Tasks\TaskToApm.cs @@ -183,6 +291,18 @@ System\PasteArguments.Unix.cs + + + + Common\Interop\Linux\Interop.Libraries.cs + + + + + + Common\Interop\OSX\Interop.Libraries.cs + + diff --git a/src/libraries/Common/tests/Resources/Strings.resx b/src/libraries/Common/tests/Resources/Strings.resx index 0b40605..06f6019 100644 --- a/src/libraries/Common/tests/Resources/Strings.resx +++ b/src/libraries/Common/tests/Resources/Strings.resx @@ -195,4 +195,16 @@ Request headers must contain only ASCII characters. + + Connection aborted by peer ({0}). + + + QUIC is not supported on this platform. See http://aka.ms/dotnetquic + + + Operation aborted. + + + Stream aborted by peer ({0}). + \ No newline at end of file diff --git a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs index ac2e434..ca8b78d 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackConnection.cs @@ -12,7 +12,7 @@ using System.Linq; namespace System.Net.Test.Common { - public sealed class Http3LoopbackConnection : GenericLoopbackConnection + internal sealed class Http3LoopbackConnection : GenericLoopbackConnection { public const long H3_NO_ERROR = 0x100; public const long H3_GENERAL_PROTOCOL_ERROR = 0x101; diff --git a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs index ad6ded1..e9cc448 100644 --- a/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs +++ b/src/libraries/Common/tests/System/Net/Http/Http3LoopbackStream.cs @@ -13,7 +13,7 @@ using System.Threading.Tasks; namespace System.Net.Test.Common { - public sealed class Http3LoopbackStream : IDisposable + internal sealed class Http3LoopbackStream : IDisposable { private const int MaximumVarIntBytes = 8; private const long VarIntMax = (1L << 62) - 1; diff --git a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs index 49b2076..8330874 100644 --- a/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs +++ b/src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTestBase.cs @@ -52,7 +52,9 @@ namespace System.Net.Http.Functional.Tests return useVersion.Major switch { #if NETCOREAPP +#if HTTP3 3 => Http3LoopbackServerFactory.Singleton, +#endif 2 => Http2LoopbackServerFactory.Singleton, #endif _ => Http11LoopbackServerFactory.Singleton diff --git a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj index e31bec6..82e2835 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/tests/FunctionalTests/System.Net.Http.WinHttpHandler.Functional.Tests.csproj @@ -91,15 +91,6 @@ Common\System\Net\Http\QPackTestEncoder.cs - - Common\System\Net\Http\Http3LoopbackServer.cs - - - Common\System\Net\Http\Http3LoopbackConnection.cs - - - Common\System\Net\Http\Http3LoopbackStream.cs - Common\System\Net\Http\HuffmanDecoder.cs diff --git a/src/libraries/System.Net.Quic/src/PInvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Net.Http/src/PInvokeAnalyzerExceptionList.analyzerdata similarity index 100% rename from src/libraries/System.Net.Quic/src/PInvokeAnalyzerExceptionList.analyzerdata rename to src/libraries/System.Net.Http/src/PInvokeAnalyzerExceptionList.analyzerdata diff --git a/src/libraries/System.Net.Quic/src/Resources/Strings.resx b/src/libraries/System.Net.Http/src/Resources/SR.resx similarity index 73% rename from src/libraries/System.Net.Quic/src/Resources/Strings.resx rename to src/libraries/System.Net.Http/src/Resources/SR.resx index fbcfaf6..bcd721a 100644 --- a/src/libraries/System.Net.Quic/src/Resources/Strings.resx +++ b/src/libraries/System.Net.Http/src/Resources/SR.resx @@ -1,4 +1,4 @@ - + + + + Common\Interop\Linux\Interop.Libraries.cs + + @@ -730,10 +838,10 @@ - + @@ -743,6 +851,7 @@ + @@ -754,4 +863,21 @@ + + + PreserveNewest + PreserveNewest + + + PreserveNewest + PreserveNewest + + + PreserveNewest + PreserveNewest + + + + + diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTestBase.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/MsQuicTestBase.cs similarity index 84% rename from src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTestBase.cs rename to src/libraries/System.Net.Http/tests/FunctionalTests/MsQuicTestBase.cs index f2f6bf1..373db5c 100644 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTestBase.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/MsQuicTestBase.cs @@ -22,24 +22,24 @@ namespace System.Net.Quic.Tests }; } - public QuicConnection CreateQuicConnection(IPEndPoint endpoint) + internal QuicConnection CreateQuicConnection(IPEndPoint endpoint) { return new QuicConnection(QuicImplementationProviders.MsQuic, endpoint, GetSslClientAuthenticationOptions()); } - public QuicListener CreateQuicListener() + internal QuicListener CreateQuicListener() { return CreateQuicListener(new IPEndPoint(IPAddress.Loopback, 0)); } - public QuicListener CreateQuicListener(IPEndPoint endpoint) + internal QuicListener CreateQuicListener(IPEndPoint endpoint) { QuicListener listener = new QuicListener(QuicImplementationProviders.MsQuic, endpoint, GetSslServerAuthenticationOptions()); listener.Start(); return listener; } - public async Task RunClientServer(Func clientFunction, Func serverFunction, int millisecondsTimeout = 10_000) + internal async Task RunClientServer(Func clientFunction, Func serverFunction, int millisecondsTimeout = 10_000) { using QuicListener listener = CreateQuicListener(); diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/MsQuicTests.cs similarity index 100% rename from src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicTests.cs rename to src/libraries/System.Net.Http/tests/FunctionalTests/MsQuicTests.cs diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/QuicConnectionTests.cs similarity index 100% rename from src/libraries/System.Net.Quic/tests/FunctionalTests/QuicConnectionTests.cs rename to src/libraries/System.Net.Http/tests/FunctionalTests/QuicConnectionTests.cs diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/QuicListenerTests.cs similarity index 100% rename from src/libraries/System.Net.Quic/tests/FunctionalTests/QuicListenerTests.cs rename to src/libraries/System.Net.Http/tests/FunctionalTests/QuicListenerTests.cs diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/QuicStreamTests.cs similarity index 100% rename from src/libraries/System.Net.Quic/tests/FunctionalTests/QuicStreamTests.cs rename to src/libraries/System.Net.Http/tests/FunctionalTests/QuicStreamTests.cs diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj index 8cb7a61..6aa7ae5 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/System.Net.Http.Functional.Tests.csproj @@ -1,15 +1,127 @@ - + + ../../src/Resources/Strings.resx $(DefineConstants);TargetsWindows - $(DefineConstants);SYSNETHTTP_NO_OPENSSL + $(DefineConstants);SYSNETHTTP_NO_OPENSSL;HTTP3 true true - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix + $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX Common\Interop\Unix\Interop.Libraries.cs + + Common\System\Net\Http\aspnetcore\NetEventSource.Common.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicAddressHelpers.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicApi.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicParameterHelpers.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicSecurityConfig.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\MsQuicSession.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\QuicExceptionHelpers.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\Internal\ResettableCompletionSource.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicConnection.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicImplementationProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicListener.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\MsQuic\MsQuicStream.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicImplementationProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicListenerProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicConnectionProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\QuicStreamProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockImplementationProvider.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockListener.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockConnection.cs + + + Common\System\Net\Http\aspnetcore\Quic\Implementations\Mock\MockStream.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicStatusCodes.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicStatusHelper.cs + + + Common\System\Net\Http\aspnetcore\Quic\NetEventSource.Quic.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicClientConnectionOptions.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicImplementationProviders.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicConnection.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicListener.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicListenerOptions.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicOperationAbortedException.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicStream.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicException.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicConnectionAbortedException.cs + + + Common\System\Net\Http\aspnetcore\Quic\QuicStreamAbortedException.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\Interop.MsQuic.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicEnums.cs + + + Common\System\Net\Http\aspnetcore\Quic\Interop\MsQuicNativeMethods.cs + + + System\System\Threading\Tasks\TaskToApm.cs + Common\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.IsNtlmInstalled.cs @@ -177,12 +289,17 @@ + + Common\System\Net\Http\PostScenarioTest.cs + + + Common\System\Net\Http\RepeatedFlushContent.cs @@ -203,6 +320,24 @@ + + + + Common\Interop\Windows\Interop.Libraries.cs + + + + + + Common\Interop\Linux\Interop.Libraries.cs + + + + + + Common\Interop\OSX\Interop.Libraries.cs + + diff --git a/src/libraries/System.Net.Quic/Directory.Build.props b/src/libraries/System.Net.Quic/Directory.Build.props deleted file mode 100644 index 23ff074..0000000 --- a/src/libraries/System.Net.Quic/Directory.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - 4.2.1.0 - Microsoft - true - - true - false - - diff --git a/src/libraries/System.Net.Quic/System.Net.Quic.sln b/src/libraries/System.Net.Quic/System.Net.Quic.sln deleted file mode 100644 index 7b503d9..0000000 --- a/src/libraries/System.Net.Quic/System.Net.Quic.sln +++ /dev/null @@ -1,53 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27213.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Quic.Tests", "tests\FunctionalTests\System.Net.Quic.Tests.csproj", "{8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}" - ProjectSection(ProjectDependencies) = postProject - {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Quic", "src\System.Net.Quic.csproj", "{43311AFB-D7C4-4E5A-B1DE-855407F90D1B}" - ProjectSection(ProjectDependencies) = postProject - {834E3534-6A11-4A8D-923F-35C1E71CCEC3} = {834E3534-6A11-4A8D-923F-35C1E71CCEC3} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Quic", "ref\System.Net.Quic.csproj", "{834E3534-6A11-4A8D-923F-35C1E71CCEC3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1A2F9F4A-A032-433E-B914-ADD5992BB178}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E107E9C1-E893-4E87-987E-04EF0DCEAEFD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{2E666815-2EDB-464B-9DF6-380BF4789AD4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6}.Release|Any CPU.Build.0 = Release|Any CPU - {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {43311AFB-D7C4-4E5A-B1DE-855407F90D1B}.Release|Any CPU.Build.0 = Release|Any CPU - {834E3534-6A11-4A8D-923F-35C1E71CCEC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {834E3534-6A11-4A8D-923F-35C1E71CCEC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {834E3534-6A11-4A8D-923F-35C1E71CCEC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {834E3534-6A11-4A8D-923F-35C1E71CCEC3}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {8CBA022C-635F-4C8D-9D29-CD8AAC68C8E6} = {1A2F9F4A-A032-433E-B914-ADD5992BB178} - {43311AFB-D7C4-4E5A-B1DE-855407F90D1B} = {E107E9C1-E893-4E87-987E-04EF0DCEAEFD} - {834E3534-6A11-4A8D-923F-35C1E71CCEC3} = {2E666815-2EDB-464B-9DF6-380BF4789AD4} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {6E33D5E2-B9BF-49D1-99FA-3C9AC3412636} - EndGlobalSection -EndGlobal diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.Temporary.cs b/src/libraries/System.Net.Quic/ref/System.Net.Quic.Temporary.cs deleted file mode 100644 index 3080f84..0000000 --- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.Temporary.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the https://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - -using System.Threading; - -namespace System.Net.Quic -{ - public sealed partial class QuicConnection : System.IDisposable - { - public QuicConnection(System.Net.Quic.Implementations.QuicImplementationProvider implementationProvider, IPEndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions, IPEndPoint localEndPoint = null) { } - public QuicConnection(System.Net.Quic.Implementations.QuicImplementationProvider implementationProvider, QuicClientConnectionOptions options) { } - } - public sealed partial class QuicListener : IDisposable - { - public QuicListener(System.Net.Quic.Implementations.QuicImplementationProvider implementationProvider, IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { } - public QuicListener(System.Net.Quic.Implementations.QuicImplementationProvider implementationProvider, QuicListenerOptions option) { } - } - public static class QuicImplementationProviders - { - public static System.Net.Quic.Implementations.QuicImplementationProvider Mock { get { throw null; } } - public static System.Net.Quic.Implementations.QuicImplementationProvider MsQuic { get { throw null; } } - public static System.Net.Quic.Implementations.QuicImplementationProvider Default { get { throw null; } } - } -} -namespace System.Net.Quic.Implementations -{ - public abstract class QuicImplementationProvider - { - internal QuicImplementationProvider() { } - } -} diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs b/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs deleted file mode 100644 index 80fbd28..0000000 --- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the https://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - -using System.Buffers; -using System.Net.Security; -using System.Threading; -using System.Threading.Tasks; - -namespace System.Net.Quic -{ - public sealed partial class QuicConnection : System.IDisposable - { - public QuicConnection(IPEndPoint remoteEndPoint, System.Net.Security.SslClientAuthenticationOptions sslClientAuthenticationOptions, IPEndPoint localEndPoint = null) { } - public System.Threading.Tasks.ValueTask ConnectAsync(System.Threading.CancellationToken cancellationToken = default) { throw null; } - public bool Connected => throw null; - public IPEndPoint LocalEndPoint => throw null; - public IPEndPoint RemoteEndPoint => throw null; - public QuicStream OpenUnidirectionalStream() => throw null; - public QuicStream OpenBidirectionalStream() => throw null; - public long GetRemoteAvailableUnidirectionalStreamCount() => throw null; - public long GetRemoteAvailableBidirectionalStreamCount() => throw null; - public System.Threading.Tasks.ValueTask AcceptStreamAsync(System.Threading.CancellationToken cancellationToken = default) => throw null; - public System.Net.Security.SslApplicationProtocol NegotiatedApplicationProtocol => throw null; - public ValueTask CloseAsync(long errorCode, System.Threading.CancellationToken cancellationToken = default) => throw null; - public void Dispose() => throw null; - public static bool IsQuicSupported => throw null; - } - public sealed partial class QuicListener : IDisposable - { - public QuicListener(IPEndPoint listenEndPoint, System.Net.Security.SslServerAuthenticationOptions sslServerAuthenticationOptions) { } - public IPEndPoint ListenEndPoint => throw null; - public System.Threading.Tasks.ValueTask AcceptConnectionAsync(System.Threading.CancellationToken cancellationToken = default) => throw null; - public void Start() => throw null; - public void Close() => throw null; - public void Dispose() => throw null; - } - public sealed class QuicStream : System.IO.Stream - { - internal QuicStream() { } - public override bool CanSeek => throw null; - public override long Length => throw null; - public override long Seek(long offset, System.IO.SeekOrigin origin) => throw null; - public override void SetLength(long value) => throw null; - public override long Position { get => throw null; set => throw null; } - public override bool CanRead => throw null; - public override bool CanWrite => throw null; - public override void Flush() => throw null; - public override int Read(byte[] buffer, int offset, int count) => throw null; - public override void Write(byte[] buffer, int offset, int count) => throw null; - public long StreamId => throw null; - public void AbortRead(long errorCode) => throw null; - public void AbortWrite(long errorCode) => throw null; - public ValueTask WriteAsync(ReadOnlyMemory data, bool endStream, System.Threading.CancellationToken cancellationToken = default) => throw null; - public ValueTask WriteAsync(ReadOnlySequence data, System.Threading.CancellationToken cancellationToken = default) => throw null; - public ValueTask WriteAsync(ReadOnlySequence data, bool endStream, System.Threading.CancellationToken cancellationToken = default) => throw null; - public ValueTask WriteAsync(ReadOnlyMemory> data, System.Threading.CancellationToken cancellationToken = default) => throw null; - public ValueTask WriteAsync(ReadOnlyMemory> data, bool endStream, System.Threading.CancellationToken cancellationToken = default) => throw null; - public ValueTask ShutdownWriteCompleted(System.Threading.CancellationToken cancellationToken = default) => throw null; - public void Shutdown() => throw null; - } - public class QuicClientConnectionOptions - { - public SslClientAuthenticationOptions ClientAuthenticationOptions { get => throw null; set => throw null; } - public IPEndPoint LocalEndPoint { get => throw null; set => throw null; } - public IPEndPoint RemoteEndPoint { get => throw null; set => throw null; } - public long MaxBidirectionalStreams { get => throw null; set => throw null; } - public long MaxUnidirectionalStreams { get => throw null; set => throw null; } - public TimeSpan IdleTimeout { get => throw null; set => throw null; } - } - public class QuicListenerOptions - { - public SslServerAuthenticationOptions ServerAuthenticationOptions { get => throw null; set => throw null; } - public string CertificateFilePath { get => throw null; set => throw null; } - public string PrivateKeyFilePath { get => throw null; set => throw null; } - public IPEndPoint ListenEndPoint { get => throw null; set => throw null; } - public int ListenBacklog { get => throw null; set => throw null; } - public long MaxBidirectionalStreams { get => throw null; set => throw null; } - public long MaxUnidirectionalStreams { get => throw null; set => throw null; } - public TimeSpan IdleTimeout { get => throw null; set => throw null; } - } - public class QuicException : Exception - { - public QuicException(string message) : base(message) { } - } - public class QuicConnectionAbortedException : QuicException - { - public QuicConnectionAbortedException(string message, long errorCode) : base(message) { } - public long ErrorCode { get; } - - } - public class QuicStreamAbortedException : QuicException - { - public QuicStreamAbortedException(string message, long errorCode) : base(message) { } - public long ErrorCode { get; } - } - public class QuicOperationAbortedException : QuicException - { - public QuicOperationAbortedException(string message) : base(message) { } - } -} diff --git a/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj deleted file mode 100644 index ae388ea..0000000 --- a/src/libraries/System.Net.Quic/ref/System.Net.Quic.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - $(NetCoreAppCurrent) - - - - - - - - - - - - - diff --git a/src/libraries/System.Net.Quic/src/Interop/Linux/MsQuicStatusCodes.cs b/src/libraries/System.Net.Quic/src/Interop/Linux/MsQuicStatusCodes.cs deleted file mode 100644 index 4152fde..0000000 --- a/src/libraries/System.Net.Quic/src/Interop/Linux/MsQuicStatusCodes.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -namespace System.Net.Quic.Implementations.MsQuic.Internal -{ - internal static class MsQuicStatusCodes - { - internal const uint Success = 0; - internal const uint Pending = unchecked((uint)-2); - internal const uint Continue = unchecked((uint)-1); - internal const uint OutOfMemory = 12; - internal const uint InvalidParameter = 22; - internal const uint InvalidState = 200000002; - internal const uint NotSupported = 95; - internal const uint NotFound = 2; - internal const uint BufferTooSmall = 75; - internal const uint HandshakeFailure = 200000009; - internal const uint Aborted = 200000008; - internal const uint AddressInUse = 98; - internal const uint ConnectionTimeout = 110; - internal const uint ConnectionIdle = 200000011; - internal const uint InternalError = 200000012; - internal const uint ServerBusy = 200000007; - internal const uint ProtocolError = 200000013; - internal const uint VerNegError = 200000014; - - public static string GetError(uint status) - { - return status switch - { - Success => "SUCCESS", - Pending => "PENDING", - Continue => "CONTINUE", - OutOfMemory => "OUT_OF_MEMORY", - InvalidParameter => "INVALID_PARAMETER", - InvalidState => "INVALID_STATE", - NotSupported => "NOT_SUPPORTED", - NotFound => "NOT_FOUND", - BufferTooSmall => "BUFFER_TOO_SMALL", - HandshakeFailure => "HANDSHAKE_FAILURE", - Aborted => "ABORTED", - AddressInUse => "ADDRESS_IN_USE", - ConnectionTimeout => "CONNECTION_TIMEOUT", - ConnectionIdle => "CONNECTION_IDLE", - InternalError => "INTERNAL_ERROR", - ServerBusy => "SERVER_BUSY", - ProtocolError => "PROTOCOL_ERROR", - VerNegError => "VER_NEG_ERROR", - _ => status.ToString() - }; - } - } -} diff --git a/src/libraries/System.Net.Quic/src/Interop/OSX/MsQuicStatusCodes.cs b/src/libraries/System.Net.Quic/src/Interop/OSX/MsQuicStatusCodes.cs deleted file mode 100644 index 60c1bec..0000000 --- a/src/libraries/System.Net.Quic/src/Interop/OSX/MsQuicStatusCodes.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -namespace System.Net.Quic.Implementations.MsQuic.Internal -{ - internal static class MsQuicStatusCodes - { - internal const uint Success = 0; - internal const uint Pending = unchecked((uint)-2); - internal const uint Continue = unchecked((uint)-1); - internal const uint OutOfMemory = 12; - internal const uint InvalidParameter = 22; - internal const uint InvalidState = 200000002; - internal const uint NotSupported = 95; - internal const uint NotFound = 2; - internal const uint BufferTooSmall = 75; - internal const uint HandshakeFailure = 200000009; - internal const uint Aborted = 200000008; - internal const uint AddressInUse = 98; - internal const uint ConnectionTimeout = 110; - internal const uint ConnectionIdle = 200000011; - internal const uint InternalError = 200000012; - internal const uint ServerBusy = 200000007; - internal const uint ProtocolError = 200000013; - internal const uint VerNegError = 200000014; - - public static string GetError(uint status) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/libraries/System.Net.Quic/src/Interop/OSX/MsQuicStatusHelper.cs b/src/libraries/System.Net.Quic/src/Interop/OSX/MsQuicStatusHelper.cs deleted file mode 100644 index cae5db4..0000000 --- a/src/libraries/System.Net.Quic/src/Interop/OSX/MsQuicStatusHelper.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -namespace System.Net.Quic.Implementations.MsQuic.Internal -{ - internal static class MsQuicStatusHelper - { - internal static bool SuccessfulStatusCode(uint status) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/libraries/System.Net.Quic/src/Interop/Windows/MsQuicStatusCodes.cs b/src/libraries/System.Net.Quic/src/Interop/Windows/MsQuicStatusCodes.cs deleted file mode 100644 index 1d0513e..0000000 --- a/src/libraries/System.Net.Quic/src/Interop/Windows/MsQuicStatusCodes.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -namespace System.Net.Quic.Implementations.MsQuic.Internal -{ - internal static class MsQuicStatusCodes - { - internal const uint Success = 0; - internal const uint Pending = 0x703E5; - internal const uint Continue = 0x704DE; - internal const uint OutOfMemory = 0x8007000E; - internal const uint InvalidParameter = 0x80070057; - internal const uint InvalidState = 0x8007139F; - internal const uint NotSupported = 0x80004002; - internal const uint NotFound = 0x80070490; - internal const uint BufferTooSmall = 0x8007007A; - internal const uint HandshakeFailure = 0x80410000; - internal const uint Aborted = 0x80004004; - internal const uint AddressInUse = 0x80072740; - internal const uint ConnectionTimeout = 0x800704CF; - internal const uint ConnectionIdle = 0x800704D4; - internal const uint InternalError = 0x80004005; - internal const uint ServerBusy = 0x800704C9; - internal const uint ProtocolError = 0x800704CD; - internal const uint HostUnreachable = 0x800704D0; - internal const uint VerNegError = 0x80410001; - - // TODO return better error messages here. - public static string GetError(uint status) - { - return status switch - { - Success => "SUCCESS", - Pending => "PENDING", - Continue => "CONTINUE", - OutOfMemory => "OUT_OF_MEMORY", - InvalidParameter => "INVALID_PARAMETER", - InvalidState => "INVALID_STATE", - NotSupported => "NOT_SUPPORTED", - NotFound => "NOT_FOUND", - BufferTooSmall => "BUFFER_TOO_SMALL", - HandshakeFailure => "HANDSHAKE_FAILURE", - Aborted => "ABORTED", - AddressInUse => "ADDRESS_IN_USE", - ConnectionTimeout => "CONNECTION_TIMEOUT", - ConnectionIdle => "CONNECTION_IDLE", - InternalError => "INTERNAL_ERROR", - ServerBusy => "SERVER_BUSY", - ProtocolError => "PROTOCOL_ERROR", - VerNegError => "VER_NEG_ERROR", - _ => status.ToString() - }; - } - } -} diff --git a/src/libraries/System.Net.Quic/src/Interop/Windows/MsQuicStatusHelper.cs b/src/libraries/System.Net.Quic/src/Interop/Windows/MsQuicStatusHelper.cs deleted file mode 100644 index 8491873..0000000 --- a/src/libraries/System.Net.Quic/src/Interop/Windows/MsQuicStatusHelper.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Runtime.InteropServices; - -namespace System.Net.Quic.Implementations.MsQuic.Internal -{ - internal static class MsQuicStatusHelper - { - internal static bool SuccessfulStatusCode(uint status) - { - return status < 0x80000000; - } - } -} diff --git a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj b/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj deleted file mode 100644 index 729c019..0000000 --- a/src/libraries/System.Net.Quic/src/System.Net.Quic.csproj +++ /dev/null @@ -1,107 +0,0 @@ - - - System.Net.Quic - true - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-OSX - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Common\System\Threading\Tasks\TaskToApm.cs - - - Common\System\Net\Logging\NetEventSource.Common.cs - - - - - - Common\Interop\Windows\Interop.Libraries.cs - - - - - - - - Common\Interop\Linux\Interop.Libraries.cs - - - - - - - - Common\Interop\OSX\Interop.Libraries.cs - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - PreserveNewest - - - PreserveNewest - PreserveNewest - - - PreserveNewest - PreserveNewest - - - diff --git a/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj b/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj deleted file mode 100644 index aa9c1be..0000000 --- a/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Tests.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - true - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix - - - - - - - Common\System\Diagnostics\Tracing\ConsoleEventListener.cs - - - Common\System\Threading\Tasks\TaskTimeoutExtensions.cs - - - - - \ No newline at end of file