From cf3469db1904d1dffbfd1da427460d27faf61d6c Mon Sep 17 00:00:00 2001 From: Frederik Carlier Date: Sun, 13 Dec 2015 00:50:50 +0000 Subject: [PATCH] System.Diagnostics.Tracing: Use Reference Source files where possible, add EventSourceSettings enum --- .../EventKeywords.cs | 45 ------------------- .../{EventLevel.cs => EventSourceSettings.cs} | 19 ++++---- mcs/class/corlib/corlib.dll.sources | 7 ++- 3 files changed, 14 insertions(+), 57 deletions(-) delete mode 100644 mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs rename mcs/class/corlib/System.Diagnostics.Tracing/{EventLevel.cs => EventSourceSettings.cs} (79%) diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs deleted file mode 100644 index ca2bfd77102..00000000000 --- a/mcs/class/corlib/System.Diagnostics.Tracing/EventKeywords.cs +++ /dev/null @@ -1,45 +0,0 @@ -// -// EventKeywords.cs -// -// Authors: -// Marek Safar -// -// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - - -namespace System.Diagnostics.Tracing -{ - [Flags] - public enum EventKeywords : long - { - None, - WdiContext = 0x2000000000000, - WdiDiagnostic = 0x4000000000000, - Sqm = 0x8000000000000, - AuditFailure = 0x10000000000000, - AuditSuccess = 0x20000000000000, - CorrelationHint = 0x10000000000000, - EventLogClassic = 0x80000000000000 - } -} - diff --git a/mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs b/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceSettings.cs similarity index 79% rename from mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs rename to mcs/class/corlib/System.Diagnostics.Tracing/EventSourceSettings.cs index 6d56cffbdcf..e428c128188 100644 --- a/mcs/class/corlib/System.Diagnostics.Tracing/EventLevel.cs +++ b/mcs/class/corlib/System.Diagnostics.Tracing/EventSourceSettings.cs @@ -1,10 +1,10 @@ // -// EventLevel.cs +// EventSourceSettings.cs // // Authors: -// Marek Safar +// Frederik Carlier // -// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com) +// Copyright (C) 2015 Quamotion (http://quamotion.mobi) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -29,14 +29,13 @@ namespace System.Diagnostics.Tracing { - public enum EventLevel + [Flags] + public enum EventSourceSettings { - LogAlways, - Critical, - Error, - Warning, - Informational, - Verbose + Default = 0, + EtwManifestEventFormat = 1, + EtwSelfDescribingEventFormat = 4, + ThrowOnEventWriteErrors = 8 } } diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources index 89f9fc965b4..38574bb5f74 100644 --- a/mcs/class/corlib/corlib.dll.sources +++ b/mcs/class/corlib/corlib.dll.sources @@ -164,8 +164,11 @@ System.Diagnostics/StackFrame.cs System.Diagnostics/StackTrace.cs System.Diagnostics.Tracing/EventAttribute.cs System.Diagnostics.Tracing/EventCommand.cs -System.Diagnostics.Tracing/EventKeywords.cs -System.Diagnostics.Tracing/EventLevel.cs +../../../external/referencesource/mscorlib/system/diagnostics/eventing/winmeta.cs +../../../external/referencesource/mscorlib/system/diagnostics/eventing/eventactivityoptions.cs +../../../external/referencesource/mscorlib/system/diagnostics/eventing/TraceLogging/EventSourceOptions.cs +../../../external/referencesource/mscorlib/system/diagnostics/eventing/TraceLogging/TraceLoggingEventTraits.cs +System.Diagnostics.Tracing/EventSourceSettings.cs System.Diagnostics.Tracing/EventSource.cs System.Diagnostics.Tracing/EventSourceAttribute.cs System.Diagnostics.Tracing/EventCommandEventArgs.cs -- 2.25.1