From eb5b42d6226cd30e8e20e7bfdd361ebdfd9ccc4f Mon Sep 17 00:00:00 2001 From: "Eric J. Smith" Date: Tue, 13 Feb 2024 19:56:25 -0600 Subject: [PATCH] Clear up metrics obsolete build warnings --- src/Foundatio/Metrics/DiagnosticsMetricsClient.cs | 3 +++ src/Foundatio/Metrics/IMetricsClient.cs | 6 +++++- src/Foundatio/Metrics/MetricTimer.cs | 7 ++++++- src/Foundatio/Metrics/NullMetricsClient.cs | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Foundatio/Metrics/DiagnosticsMetricsClient.cs b/src/Foundatio/Metrics/DiagnosticsMetricsClient.cs index add1ddd0..eca7c425 100644 --- a/src/Foundatio/Metrics/DiagnosticsMetricsClient.cs +++ b/src/Foundatio/Metrics/DiagnosticsMetricsClient.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Concurrent; using System.Diagnostics.Metrics; +#pragma warning disable 612, 618 namespace Foundatio.Metrics; @@ -57,3 +58,5 @@ public GaugeInfo(Meter meter, string name) public double Value { get; set; } } } + +#pragma warning restore 612, 618 diff --git a/src/Foundatio/Metrics/IMetricsClient.cs b/src/Foundatio/Metrics/IMetricsClient.cs index c36fec8b..7a192c31 100644 --- a/src/Foundatio/Metrics/IMetricsClient.cs +++ b/src/Foundatio/Metrics/IMetricsClient.cs @@ -1,4 +1,6 @@ -using System; +#pragma warning disable 612, 618 + +using System; using System.Threading.Tasks; using Foundatio.Utility; @@ -42,3 +44,5 @@ public static async Task TimeAsync(this IMetricsClient client, Func