From 9466c777be1aac835aaab82dc98b3f30eb9fc761 Mon Sep 17 00:00:00 2001 From: Sung Yoon Whang Date: Thu, 18 Apr 2019 15:50:48 -0700 Subject: [PATCH] disable exposing new counter types on ProjectN until they are propagated through the targetingpack Commit migrated from https://github.com/dotnet/corefx/commit/33724212beccbdca43d020f595dce88e38eaab31 --- .../System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs index 944bc38..7637836 100644 --- a/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs +++ b/src/libraries/System.Diagnostics.Tracing/ref/System.Diagnostics.Tracing.cs @@ -53,6 +53,7 @@ namespace System.Diagnostics.Tracing public bool DisableEvent(int eventId) { throw null; } public bool EnableEvent(int eventId) { throw null; } } +#if !PROJECTN public abstract partial class DiagnosticCounter : System.IDisposable { public DiagnosticCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) { } @@ -62,13 +63,14 @@ namespace System.Diagnostics.Tracing public string Name { get { throw null; } } public System.Diagnostics.Tracing.EventSource EventSource { get { throw null; } } } - +#endif public partial class EventCounter : System.Diagnostics.Tracing.DiagnosticCounter { public EventCounter(string name, System.Diagnostics.Tracing.EventSource eventSource) : base(name, eventSource) { } public void WriteMetric(float value) { } public void WriteMetric(double value) { } } +#if !PROJECTN public partial class PollingCounter : System.Diagnostics.Tracing.DiagnosticCounter { public PollingCounter(string name, System.Diagnostics.Tracing.EventSource eventSource, Func metricProvider) : base(name, eventSource) { } @@ -84,6 +86,7 @@ namespace System.Diagnostics.Tracing public IncrementingPollingCounter(string name, System.Diagnostics.Tracing.EventSource eventSource, Func totalValueProvider) : base(name, eventSource) { } public TimeSpan DisplayRateTimeScale { get { throw null; } set { } } } +#endif [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Struct, Inherited=false)] public partial class EventDataAttribute : System.Attribute { -- 2.7.4