From dc8d57a97265524efe282b9984c82d27bd490050 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Mon, 19 Jun 2023 13:55:34 +1000 Subject: [PATCH] Update local copy of ExperimentalAttribute per https://github.com/dotnet/runtime/pull/85444 --- Directory.Build.targets | 4 +- docs/list-of-diagnostics.md | 9 +++++ .../ExperimentalAttribute.cs | 39 ++++++++++--------- .../Logging/LoggingOptions.cs | 4 +- .../RequestHeadersLogEnricherOptions.cs | 2 +- .../Tracing/HttpTracingExtensions.cs | 4 +- .../Tracing/HttpTracingOptions.cs | 2 +- .../IAsyncLocalContext.cs | 2 +- ...althChecksExtensions.TelemetryPublisher.cs | 4 +- .../TelemetryHealthCheckPublisherOptions.cs | 2 +- .../ResourceMonitoringOptions.cs | 2 +- .../Windows/WindowsCountersOptions.cs | 4 +- .../Windows/WindowsUtilizationExtensions.cs | 6 +-- .../HostingFakesExtensions.cs | 2 +- .../AutoClientAttribute.cs | 2 +- .../AutoClientException.cs | 2 +- .../AutoClientHttpError.cs | 2 +- .../AutoClientOptions.cs | 2 +- .../BodyAttribute.cs | 2 +- .../BodyContentType.cs | 2 +- .../HeaderAttribute.cs | 2 +- .../Methods/DeleteAttribute.cs | 2 +- .../Methods/GetAttribute.cs | 2 +- .../Methods/HeadAttribute.cs | 2 +- .../Methods/OptionsAttribute.cs | 2 +- .../Methods/PatchAttribute.cs | 2 +- .../Methods/PostAttribute.cs | 2 +- .../Methods/PutAttribute.cs | 2 +- .../QueryAttribute.cs | 2 +- .../RequestNameAttribute.cs | 2 +- .../StaticHeaderAttribute.cs | 2 +- .../HttpClientFaultInjectionExtensions.cs | 4 +- .../FaultInjection/PolicyContextExtensions.cs | 2 +- .../RoutingStrategyBuilderExtensions.cs | 4 +- ...StandardHedgingHandlerBuilderExtensions.cs | 2 +- ...dardResiliencePipelineBuilderExtensions.cs | 2 +- .../Logging/LoggingOptions.cs | 2 +- .../Metering/HttpClientMeteringExtensions.cs | 2 +- .../Metering/HttpMeteringHandler.cs | 2 +- .../Metering/HttpRequestResultType.cs | 2 +- .../Tracing/HttpClientTracingExtensions.cs | 4 +- .../Tracing/HttpClientTracingOptions.cs | 2 +- .../Tracing/IHttpClientTraceEnricher.netfx.cs | 2 +- .../Tracing/IHttpPathRedactor.cs | 2 +- .../DependencyInjectionPoolOptions.cs | 2 +- .../ObjectPoolServiceCollectionExtensions.cs | 2 +- .../ValidateEnumeratedItemsAttribute.cs | 2 +- .../FaultInjectionExtensions.cs | 2 +- .../FaultInjectionOptionsBuilder.cs | 2 +- .../FaultInjection/IChaosPolicyFactory.cs | 2 +- .../Options/ChaosPolicyOptionsGroup.cs | 2 +- .../Options/CustomResultPolicyOptions.cs | 4 +- .../FaultPolicyWeightAssignmentsOptions.cs | 2 +- .../Polly/Internals/PipelineId.cs | 6 +-- .../Polly/ResilienceDimensions.cs | 24 ++++++------ .../Internal/OptionsBuilderExtensions.cs | 2 +- .../ResiliencePipelineBuilderExtensions.cs | 2 +- .../Http/TelemetryConstants.cs | 4 +- .../Logging/LogMethodAttribute.cs | 2 +- .../Metering/MeterT.cs | 4 +- .../Metering/MeteringExtensions.cs | 2 +- .../Metering/MetricCollector.cs | 4 +- .../Logging/LoggerProvider.cs | 2 +- .../Logging/LoggingOptions.cs | 2 +- .../EventCountersCollectorOptions.cs | 2 +- .../Metering/MeteringOptions.cs | 2 +- .../Metering/OTelMeteringExtensions.cs | 8 ++-- .../Telemetry.Internal/IHttpRouteFormatter.cs | 4 +- .../Telemetry/TelemetryExtensions.cs | 4 +- .../Tracing/TracingEnricherExtensions.cs | 4 +- .../FakeTimeProvider.cs | 4 +- .../UsingExperimentalApiAnalyzerTest.cs | 2 +- .../ApiLifecycle/ApiLifecycleAnalyzerTest.cs | 18 ++++----- 73 files changed, 144 insertions(+), 130 deletions(-) create mode 100644 docs/list-of-diagnostics.md diff --git a/Directory.Build.targets b/Directory.Build.targets index c96d110b2dd..cad53b2ad54 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -66,7 +66,9 @@ - + + <_Parameter1> + diff --git a/docs/list-of-diagnostics.md b/docs/list-of-diagnostics.md new file mode 100644 index 00000000000..68ed551693a --- /dev/null +++ b/docs/list-of-diagnostics.md @@ -0,0 +1,9 @@ +# List of Diagnostics Produced by .NET Extensions Libraries APIs + +## Analyzer Warnings + +### NETEXT (`NETEXT0001`) + +| Diagnostic ID | Description | +| :---------------- | :---------- | +| __`NETEXT0001`__ | Experimental API | diff --git a/src/LegacySupport/ExperimentalAttribute/ExperimentalAttribute.cs b/src/LegacySupport/ExperimentalAttribute/ExperimentalAttribute.cs index 6d7d44a95f8..af31c0f8151 100644 --- a/src/LegacySupport/ExperimentalAttribute/ExperimentalAttribute.cs +++ b/src/LegacySupport/ExperimentalAttribute/ExperimentalAttribute.cs @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#if !NET8_0_OR_GREATER + namespace System.Diagnostics.CodeAnalysis; /// @@ -24,30 +26,31 @@ internal sealed class ExperimentalAttribute : Attribute /// /// Initializes a new instance of the class. /// - public ExperimentalAttribute() + /// Human readable explanation for marking experimental API. + public ExperimentalAttribute(string diagnosticId) { - // Intentionally left empty. + DiagnosticId = diagnosticId; } /// - /// Initializes a new instance of the class. + /// Gets the ID that the compiler will use when reporting a use of the API the attribute applies to. /// - /// Human readable explanation for marking experimental API. - public ExperimentalAttribute(string message) - { -#pragma warning disable R9A014 // Use the 'Microsoft.Extensions.Diagnostics.Throws' class instead of explicitly throwing exception for improved performance -#pragma warning disable R9A039 // Remove superfluous null check when compiling in a nullable context -#pragma warning disable R9A060 // Consider removing unnecessary null coalescing (??) since the left-hand value is statically known not to be null -#pragma warning disable SA1101 // Prefix local calls with this - Message = message ?? throw new ArgumentNullException(nameof(message)); -#pragma warning restore SA1101 // Prefix local calls with this -#pragma warning restore R9A060 // Consider removing unnecessary null coalescing (??) since the left-hand value is statically known not to be null -#pragma warning restore R9A039 // Remove superfluous null check when compiling in a nullable context -#pragma warning restore R9A014 // Use the 'Microsoft.Extensions.Diagnostics.Throws' class instead of explicitly throwing exception for improved performance - } + /// The unique diagnostic ID. + /// + /// The diagnostic ID is shown in build output for warnings and errors. + /// This property represents the unique ID that can be used to suppress the warnings or errors, if needed. + /// + public string DiagnosticId { get; } /// - /// Gets a human readable explanation for marking API as experimental. + /// Gets or sets the URL for corresponding documentation. + /// The API accepts a format string instead of an actual URL, creating a generic URL that includes the diagnostic ID. /// - public string? Message { get; } + /// The format string that represents a URL to corresponding documentation. + /// An example format string is https://contoso.com/obsoletion-warnings/{0}. +#pragma warning disable S3996 // URI properties should not be strings + public string? UrlFormat { get; set; } +#pragma warning restore S3996 // URI properties should not be strings } + +#endif diff --git a/src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs b/src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs index 9eb5339d5c9..672d89c4a07 100644 --- a/src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs +++ b/src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs @@ -67,7 +67,7 @@ public class LoggingOptions /// /// The default value is . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode; /// @@ -208,7 +208,7 @@ public class LoggingOptions /// }; /// /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [Required] [SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Options pattern.")] diff --git a/src/Libraries/Microsoft.AspNetCore.Telemetry/Enrichment.RequestHeaders/RequestHeadersLogEnricherOptions.cs b/src/Libraries/Microsoft.AspNetCore.Telemetry/Enrichment.RequestHeaders/RequestHeadersLogEnricherOptions.cs index 1f46f1d898a..2c81b11807f 100644 --- a/src/Libraries/Microsoft.AspNetCore.Telemetry/Enrichment.RequestHeaders/RequestHeadersLogEnricherOptions.cs +++ b/src/Libraries/Microsoft.AspNetCore.Telemetry/Enrichment.RequestHeaders/RequestHeadersLogEnricherOptions.cs @@ -20,7 +20,7 @@ public class RequestHeadersLogEnricherOptions /// Default value is an empty dictionary. /// [Required] - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] #pragma warning disable CA2227 // Collection properties should be read only public IDictionary HeadersDataClasses { get; set; } = new Dictionary(); #pragma warning restore CA2227 // Collection properties should be read only diff --git a/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingExtensions.cs b/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingExtensions.cs index 0a2eaef5181..88cbde733ec 100644 --- a/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingExtensions.cs +++ b/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingExtensions.cs @@ -116,7 +116,7 @@ public static TracerProviderBuilder AddHttpTraceEnricher(this TracerProviderBuil /// The to add this enricher. /// for chaining. /// The argument is . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddHttpTraceEnricher(this IServiceCollection services) where T : class, IHttpTraceEnricher { @@ -132,7 +132,7 @@ public static IServiceCollection AddHttpTraceEnricher(this IServiceCollection /// Enricher to be added. /// for chaining. /// The argument or is . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddHttpTraceEnricher(this IServiceCollection services, IHttpTraceEnricher enricher) { _ = Throw.IfNull(services); diff --git a/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingOptions.cs b/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingOptions.cs index baf648ebaf6..1ab57a3cbf3 100644 --- a/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingOptions.cs +++ b/src/Libraries/Microsoft.AspNetCore.Telemetry/Tracing/HttpTracingOptions.cs @@ -51,7 +51,7 @@ public class HttpTracingOptions /// /// This property is applicable when the option is enabled. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode; /// diff --git a/src/Libraries/Microsoft.Extensions.AsyncState/IAsyncLocalContext.cs b/src/Libraries/Microsoft.Extensions.AsyncState/IAsyncLocalContext.cs index a180eb275fb..cdbbb0b2049 100644 --- a/src/Libraries/Microsoft.Extensions.AsyncState/IAsyncLocalContext.cs +++ b/src/Libraries/Microsoft.Extensions.AsyncState/IAsyncLocalContext.cs @@ -11,7 +11,7 @@ namespace Microsoft.Extensions.AsyncState; /// /// The type of the asynchronous state. /// This type is intended for internal use. Use instead. -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] #pragma warning disable S4023 // Interfaces should not be empty public interface IAsyncLocalContext : IAsyncContext diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/CommonHealthChecksExtensions.TelemetryPublisher.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/CommonHealthChecksExtensions.TelemetryPublisher.cs index ac7cbf8edee..a1dded3e8c7 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/CommonHealthChecksExtensions.TelemetryPublisher.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/CommonHealthChecksExtensions.TelemetryPublisher.cs @@ -30,7 +30,7 @@ public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceC /// Configuration for . /// The value of . /// or are . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceCollection services, IConfigurationSection section) => Throw.IfNull(services) .Configure(Throw.IfNull(section)) @@ -44,7 +44,7 @@ public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceC /// Configuration for . /// The value of . /// or are . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceCollection services, Action configure) => Throw.IfNull(services) .Configure(Throw.IfNull(configure)) diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/TelemetryHealthCheckPublisherOptions.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/TelemetryHealthCheckPublisherOptions.cs index bf5d07c5dce..fc7b77b5bca 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/TelemetryHealthCheckPublisherOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.HealthChecks.Common/TelemetryHealthCheckPublisherOptions.cs @@ -8,7 +8,7 @@ namespace Microsoft.Extensions.Diagnostics.HealthChecks; /// /// Options for the telemetry health check publisher. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class TelemetryHealthCheckPublisherOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringOptions.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringOptions.cs index d6b55d14820..974ea173ec9 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringOptions.cs @@ -50,7 +50,7 @@ public class ResourceMonitoringOptions /// The value needs to be less than or equal to the . /// Most importantly, this period is used to calculate instances pushed to publishers. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [TimeSpan(MinimumSamplingWindow, MaximumSamplingWindow)] public TimeSpan CalculationPeriod { get; set; } = DefaultCollectionWindow; } diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsCountersOptions.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsCountersOptions.cs index 5d90106ce54..d9a06649ee9 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsCountersOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsCountersOptions.cs @@ -12,7 +12,7 @@ namespace Microsoft.Extensions.Diagnostics.ResourceMonitoring; /// /// Options for WindowsCounters. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class WindowsCountersOptions { internal const int MinimumCachingInterval = 100; @@ -33,7 +33,7 @@ public class WindowsCountersOptions /// /// The default value is 5 seconds. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [TimeSpan(MinimumCachingInterval, MaximumCachingInterval)] public TimeSpan CachingInterval { get; set; } = DefaultCachingInterval; } diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsUtilizationExtensions.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsUtilizationExtensions.cs index 211f6976e5e..8f1bd73049f 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsUtilizationExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/Windows/WindowsUtilizationExtensions.cs @@ -65,7 +65,7 @@ public static IResourceMonitorBuilder AddWindowsPerfCounterPublisher(this IResou /// The value of . /// is . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IResourceMonitorBuilder AddWindowsCounters(this IResourceMonitorBuilder builder) { _ = Throw.IfNull(builder); @@ -93,7 +93,7 @@ public static IResourceMonitorBuilder AddWindowsCounters(this IResourceMonitorBu /// The value of . /// is . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IResourceMonitorBuilder AddWindowsCounters(this IResourceMonitorBuilder builder, IConfigurationSection section) { _ = Throw.IfNull(builder); @@ -123,7 +123,7 @@ public static IResourceMonitorBuilder AddWindowsCounters(this IResourceMonitorBu /// The value of . /// is . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IResourceMonitorBuilder AddWindowsCounters(this IResourceMonitorBuilder builder, Action configure) { _ = Throw.IfNull(builder); diff --git a/src/Libraries/Microsoft.Extensions.Hosting.Testing/HostingFakesExtensions.cs b/src/Libraries/Microsoft.Extensions.Hosting.Testing/HostingFakesExtensions.cs index 57234351d7c..a18e36760c0 100644 --- a/src/Libraries/Microsoft.Extensions.Hosting.Testing/HostingFakesExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Hosting.Testing/HostingFakesExtensions.cs @@ -19,7 +19,7 @@ namespace Microsoft.Extensions.Hosting.Testing; /// /// Extension methods supporting host unit testing scenarios. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static class HostingFakesExtensions { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientAttribute.cs index 0c3323cde5f..6d141dec1ff 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientAttribute.cs @@ -27,7 +27,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Interface)] [Conditional("CODE_GENERATION_ATTRIBUTES")] public sealed class AutoClientAttribute : Attribute diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientException.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientException.cs index e244ea0691d..c99a4da2702 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientException.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientException.cs @@ -27,7 +27,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// /// [SuppressMessage("Design", "CA1032:Implement standard exception constructors", Justification = "Not applicable to this exception")] -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class AutoClientException : Exception { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientHttpError.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientHttpError.cs index 05b9b713973..fd56500c6d2 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientHttpError.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientHttpError.cs @@ -19,7 +19,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// When a REST API client fails, it will throw a . /// This exception contains a instance that holds details like content, headers and status code. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class AutoClientHttpError { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientOptions.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientOptions.cs index 63a961dcde7..4b4674b73b9 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientOptions.cs @@ -21,7 +21,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// }); /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class AutoClientOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyAttribute.cs index d6b3d8bf8d4..2323d094c3a 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyAttribute.cs @@ -24,7 +24,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Parameter)] [Conditional("CODE_GENERATION_ATTRIBUTES")] public sealed class BodyAttribute : Attribute diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyContentType.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyContentType.cs index 93baae2b791..c3b6b5d4e6f 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyContentType.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyContentType.cs @@ -8,7 +8,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// /// Defines the types of encoding possible for request bodies. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public enum BodyContentType { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/HeaderAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/HeaderAttribute.cs index 48a3d45a679..833cf6d7b36 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/HeaderAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/HeaderAttribute.cs @@ -23,7 +23,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Parameter)] [Conditional("CODE_GENERATION_ATTRIBUTES")] public sealed class HeaderAttribute : Attribute diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/DeleteAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/DeleteAttribute.cs index 8b2a2fd473f..7e29adbed60 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/DeleteAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/DeleteAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class DeleteAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/GetAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/GetAttribute.cs index 577a82321e2..40ada2a6132 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/GetAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/GetAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class GetAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/HeadAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/HeadAttribute.cs index e9121a281b4..fa325daf024 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/HeadAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/HeadAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class HeadAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/OptionsAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/OptionsAttribute.cs index de23fa8d0f9..788e2f17e81 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/OptionsAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/OptionsAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class OptionsAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PatchAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PatchAttribute.cs index 04e5803ab8d..ff37907bb3d 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PatchAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PatchAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class PatchAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PostAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PostAttribute.cs index a42a3f6bb16..977de5e0498 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PostAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PostAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class PostAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PutAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PutAttribute.cs index c7de67fa335..238cee1ba1b 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PutAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/Methods/PutAttribute.cs @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] public sealed class PutAttribute : Attribute { diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/QueryAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/QueryAttribute.cs index 0b9b9da47d1..a16015eec66 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/QueryAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/QueryAttribute.cs @@ -23,7 +23,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Parameter)] [Conditional("CODE_GENERATION_ATTRIBUTES")] public sealed class QueryAttribute : Attribute diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/RequestNameAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/RequestNameAttribute.cs index e3fbc2a2e8b..b1d77529302 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/RequestNameAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/RequestNameAttribute.cs @@ -26,7 +26,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Method)] [Conditional("CODE_GENERATION_ATTRIBUTES")] public sealed class RequestNameAttribute : Attribute diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/StaticHeaderAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/StaticHeaderAttribute.cs index 774d9716267..c3792904370 100644 --- a/src/Libraries/Microsoft.Extensions.Http.AutoClient/StaticHeaderAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Http.AutoClient/StaticHeaderAttribute.cs @@ -27,7 +27,7 @@ namespace Microsoft.Extensions.Http.AutoClient; /// } /// /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method, AllowMultiple = true)] [Conditional("CODE_GENERATION_ATTRIBUTES")] public sealed class StaticHeaderAttribute : Attribute diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/HttpClientFaultInjectionExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/HttpClientFaultInjectionExtensions.cs index 86764f8e973..f43470847e1 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/HttpClientFaultInjectionExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/HttpClientFaultInjectionExtensions.cs @@ -147,7 +147,7 @@ public static IHttpClientBuilder AddFaultInjectionPolicyHandler(this IHttpClient /// /// The so that additional calls can be chained. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IHttpClientBuilder AddWeightedFaultInjectionPolicyHandlers(this IHttpClientBuilder httpClientBuilder, Action weightAssignmentsConfig) { @@ -176,7 +176,7 @@ public static IHttpClientBuilder AddWeightedFaultInjectionPolicyHandlers(this IH /// /// The so that additional calls can be chained. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [DynamicDependency( DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicParameterlessConstructor, typeof(FaultPolicyWeightAssignmentsOptions))] diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/PolicyContextExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/PolicyContextExtensions.cs index 325c2d85a65..161a1c8c9d8 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/PolicyContextExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/PolicyContextExtensions.cs @@ -11,7 +11,7 @@ namespace Microsoft.Extensions.Http.Resilience.FaultInjection; /// /// Provides extension methods for . /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static class PolicyContextExtensions { private const string CallingRequestMessage = "CallingRequestMessage"; diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/Routing/RoutingStrategyBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/Routing/RoutingStrategyBuilderExtensions.cs index eb2eb812f7a..0182dba58db 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/Routing/RoutingStrategyBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/Routing/RoutingStrategyBuilderExtensions.cs @@ -65,7 +65,7 @@ public static IRoutingStrategyBuilder ConfigureOrderedGroups(this IRoutingStrate /// /// The same routing builder instance. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IRoutingStrategyBuilder ConfigureOrderedGroups(this IRoutingStrategyBuilder builder, Action configure) { _ = Throw.IfNull(builder); @@ -119,7 +119,7 @@ public static IRoutingStrategyBuilder ConfigureWeightedGroups(this IRoutingStrat /// /// The same routing builder instance. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IRoutingStrategyBuilder ConfigureWeightedGroups(this IRoutingStrategyBuilder builder, Action configure) { _ = Throw.IfNull(builder); diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs index 101d40b1449..9b1eb57b3e7 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs @@ -64,7 +64,7 @@ public static IStandardHedgingHandlerBuilder Configure(this IStandardHedgingHand /// The configure method. /// The same builder instance. #pragma warning disable S3872 // Parameter names should not duplicate the names of their methods - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IStandardHedgingHandlerBuilder Configure(this IStandardHedgingHandlerBuilder builder, Action configure) #pragma warning restore S3872 // Parameter names should not duplicate the names of their methods { diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResiliencePipelineBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResiliencePipelineBuilderExtensions.cs index 25e15a6dd27..c2f0cd7a9a4 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResiliencePipelineBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResiliencePipelineBuilderExtensions.cs @@ -64,7 +64,7 @@ public static IHttpStandardResiliencePipelineBuilder Configure(this IHttpStandar /// The configure method. /// The same builder instance. #pragma warning disable S3872 // Parameter names should not duplicate the names of their methods - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IHttpStandardResiliencePipelineBuilder Configure(this IHttpStandardResiliencePipelineBuilder builder, Action configure) #pragma warning restore S3872 // Parameter names should not duplicate the names of their methods { diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Logging/LoggingOptions.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Logging/LoggingOptions.cs index 0d44db5149a..e3d6ca6776d 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Logging/LoggingOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Logging/LoggingOptions.cs @@ -134,7 +134,7 @@ public class LoggingOptions /// /// The default value is . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode; /// diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpClientMeteringExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpClientMeteringExtensions.cs index 7927428efaf..77cc93fb1d0 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpClientMeteringExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpClientMeteringExtensions.cs @@ -34,7 +34,7 @@ public static class HttpClientMeteringExtensions /// /// instance for chaining. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddHttpClientMeteringForAllHttpClients(this IServiceCollection services) { _ = Throw.IfNull(services); diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpMeteringHandler.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpMeteringHandler.cs index ba946b7198b..1373b3cd402 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpMeteringHandler.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpMeteringHandler.cs @@ -49,7 +49,7 @@ public class HttpMeteringHandler : DelegatingHandler /// /// The meter. /// Enumerable of outgoing request metric enrichers. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public HttpMeteringHandler( Meter meter, IEnumerable enrichers) diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpRequestResultType.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpRequestResultType.cs index d6c33a18376..d308832b646 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpRequestResultType.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Metering/HttpRequestResultType.cs @@ -9,7 +9,7 @@ namespace Microsoft.Extensions.Http.Telemetry.Metering; /// /// Statuses for classifying http request result. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EnumStrings] public enum HttpRequestResultType { diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingExtensions.cs index 5901f2668f3..5adbb89300c 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingExtensions.cs @@ -82,7 +82,7 @@ public static TracerProviderBuilder AddHttpClientTracing(this TracerProviderBuil /// The to add this enricher to. /// for chaining. /// The argument is . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddHttpClientTraceEnricher(this IServiceCollection services) where T : class, IHttpClientTraceEnricher { @@ -98,7 +98,7 @@ public static IServiceCollection AddHttpClientTraceEnricher(this IServiceColl /// Enricher to be added. /// for chaining. /// The argument or is . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddHttpClientTraceEnricher(this IServiceCollection services, IHttpClientTraceEnricher enricher) { _ = Throw.IfNull(services); diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingOptions.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingOptions.cs index ac0e56ff31c..ada972accdc 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/HttpClientTracingOptions.cs @@ -23,7 +23,7 @@ public class HttpClientTracingOptions /// /// The default value is . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode; /// diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpClientTraceEnricher.netfx.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpClientTraceEnricher.netfx.cs index e557eb5ac59..e2347562e6e 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpClientTraceEnricher.netfx.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpClientTraceEnricher.netfx.cs @@ -23,7 +23,7 @@ public interface IHttpClientTraceEnricher /// /// If your enricher fetches some information from or to enrich HTTP traces, then make sure to check it for . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] void Enrich(Activity activity, HttpWebRequest? webRequest, HttpWebResponse? webResponse); } diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpPathRedactor.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpPathRedactor.cs index f15a5465e66..b03f56c6f46 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpPathRedactor.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Tracing/IHttpPathRedactor.cs @@ -10,7 +10,7 @@ namespace Microsoft.Extensions.Http.Telemetry.Tracing; /// /// Interface for implementing a redaction mechanism for outgoing HTTP request paths. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public interface IHttpPathRedactor { /// diff --git a/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/DependencyInjectionPoolOptions.cs b/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/DependencyInjectionPoolOptions.cs index cbb398634ee..34bf3cffea4 100644 --- a/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/DependencyInjectionPoolOptions.cs +++ b/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/DependencyInjectionPoolOptions.cs @@ -8,7 +8,7 @@ namespace Microsoft.Extensions.ObjectPool; /// /// Contains configuration for pools. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public sealed class DependencyInjectionPoolOptions { internal const int DefaultCapacity = 1024; diff --git a/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/ObjectPoolServiceCollectionExtensions.cs b/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/ObjectPoolServiceCollectionExtensions.cs index 2622a9d9958..0c27154bd1c 100644 --- a/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/ObjectPoolServiceCollectionExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/ObjectPoolServiceCollectionExtensions.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.ObjectPool; /// /// Extension methods for adding to DI container. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static class ObjectPoolServiceCollectionExtensions { /// diff --git a/src/Libraries/Microsoft.Extensions.Options.Validation/ValidateEnumeratedItemsAttribute.cs b/src/Libraries/Microsoft.Extensions.Options.Validation/ValidateEnumeratedItemsAttribute.cs index 11ccd1c22fd..d44caada3d8 100644 --- a/src/Libraries/Microsoft.Extensions.Options.Validation/ValidateEnumeratedItemsAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Options.Validation/ValidateEnumeratedItemsAttribute.cs @@ -11,7 +11,7 @@ namespace Microsoft.Extensions.Options.Validation; /// Marks a field or property to be enumerated, and each enumerated object to be validated. /// [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public sealed class ValidateEnumeratedItemsAttribute : Attribute { /// diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionExtensions.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionExtensions.cs index 315decc55e3..d1b7fae70ff 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionExtensions.cs @@ -125,7 +125,7 @@ public static Context WithFaultInjection(this Context context, string groupName) /// /// Any of the parameters are . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static Context WithFaultInjection(this Context context, FaultPolicyWeightAssignmentsOptions weightAssignments) { _ = Throw.IfNull(context); diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionOptionsBuilder.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionOptionsBuilder.cs index eb126f6615f..b77322e30db 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionOptionsBuilder.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionOptionsBuilder.cs @@ -126,7 +126,7 @@ public FaultInjectionOptionsBuilder AddException(string key, Exception exception /// /// is an empty string or . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public FaultInjectionOptionsBuilder AddCustomResult(string key, object customResult) { _ = Throw.IfNull(customResult); diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/IChaosPolicyFactory.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/IChaosPolicyFactory.cs index f89120b5073..76278347cc4 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/IChaosPolicyFactory.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/IChaosPolicyFactory.cs @@ -40,6 +40,6 @@ public interface IChaosPolicyFactory /// /// The type of value policies created by this method will inject. /// A custom result policy, an instance of . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public AsyncInjectOutcomePolicy CreateCustomResultPolicy(); } diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/ChaosPolicyOptionsGroup.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/ChaosPolicyOptionsGroup.cs index 13473760cc1..26ce4b71993 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/ChaosPolicyOptionsGroup.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/ChaosPolicyOptionsGroup.cs @@ -42,6 +42,6 @@ public class ChaosPolicyOptionsGroup /// Gets or sets the custom result policy options of the chaos policy options group. /// [ValidateObjectMembers] - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public CustomResultPolicyOptions? CustomResultPolicyOptions { get; set; } } diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/CustomResultPolicyOptions.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/CustomResultPolicyOptions.cs index 92cea07fe31..6b45fb98a84 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/CustomResultPolicyOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/CustomResultPolicyOptions.cs @@ -9,7 +9,7 @@ namespace Microsoft.Extensions.Resilience.FaultInjection; /// /// Custom Result chaos policy options definition. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class CustomResultPolicyOptions : ChaosPolicyOptionsBase { /// @@ -20,7 +20,7 @@ public class CustomResultPolicyOptions : ChaosPolicyOptionsBase /// from . /// Default is set to . /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [Required] public string CustomResultKey { get; set; } = string.Empty; } diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/FaultPolicyWeightAssignmentsOptions.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/FaultPolicyWeightAssignmentsOptions.cs index 05254afa450..b6142862456 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/FaultPolicyWeightAssignmentsOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/Options/FaultPolicyWeightAssignmentsOptions.cs @@ -9,7 +9,7 @@ namespace Microsoft.Extensions.Resilience.FaultInjection; /// /// Class to contain fault-injection policy weight assignments. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class FaultPolicyWeightAssignmentsOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Resilience/Polly/Internals/PipelineId.cs b/src/Libraries/Microsoft.Extensions.Resilience/Polly/Internals/PipelineId.cs index 94afb13edd6..a13130116a6 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/Polly/Internals/PipelineId.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/Polly/Internals/PipelineId.cs @@ -9,7 +9,7 @@ namespace Microsoft.Extensions.Resilience.Internal; /// /// Composite key for the pipeline. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] internal sealed record PipelineId(string PipelineName, string PipelineKey, string? ResultType, string PolicyPipelineKey) { /// @@ -19,7 +19,7 @@ internal sealed record PipelineId(string PipelineName, string PipelineKey, strin /// The pipeline name. /// The pipeline key. /// The pipeline id instance. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static PipelineId Create(string pipelineName, string pipelineKey) { var policyPipelineKey = string.IsNullOrEmpty(pipelineKey) ? $"{typeof(T).Name}-{pipelineName}" : $"{typeof(T).Name}-{pipelineName}-{pipelineKey}"; @@ -33,7 +33,7 @@ public static PipelineId Create(string pipelineName, string pipelineKey) /// The pipeline name. /// The pipeline key. /// The pipeline id instance. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static PipelineId Create(string pipelineName, string pipelineKey) { var policyPipelineKey = string.IsNullOrEmpty(pipelineKey) ? pipelineName : $"{pipelineName}-{pipelineKey}"; diff --git a/src/Libraries/Microsoft.Extensions.Resilience/Polly/ResilienceDimensions.cs b/src/Libraries/Microsoft.Extensions.Resilience/Polly/ResilienceDimensions.cs index 52705a74e0a..e78cf553adc 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/Polly/ResilienceDimensions.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/Polly/ResilienceDimensions.cs @@ -15,77 +15,77 @@ namespace Microsoft.Extensions.Resilience; /// Constants are standardized in MS Common Schema. /// // Avoid changing const values in this class by all means. Such a breaking change would break customer's monitoring. -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public static class ResilienceDimensions { /// /// Pipeline name. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string PipelineName = "pipeline_name"; /// /// Pipeline key. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string PipelineKey = "pipeline_key"; /// /// Result type. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string ResultType = "result_type"; /// /// Policy name. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string PolicyName = "policy_name"; /// /// Event name. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string EventName = "event_name"; /// /// Failure source. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string FailureSource = "failure_source"; /// /// Failure reason. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string FailureReason = "failure_reason"; /// /// Failure summary. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string FailureSummary = "failure_summary"; /// /// Dependency name. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string DependencyName = "dep_name"; /// /// Request name. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public const string RequestName = "req_name"; @@ -93,7 +93,7 @@ public static class ResilienceDimensions /// Gets a list of all dimension names. /// /// A read-only of all dimension names. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [EditorBrowsable(EditorBrowsableState.Never)] public static IReadOnlyList DimensionNames { get; } = Array.AsReadOnly(new[] diff --git a/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/OptionsBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/OptionsBuilderExtensions.cs index 0bff0195411..5ce26de350b 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/OptionsBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/OptionsBuilderExtensions.cs @@ -13,7 +13,7 @@ namespace Microsoft.Extensions.Resilience.Internal; /// /// Extensions for . /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] internal static class OptionsBuilderExtensions { /// diff --git a/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/ResiliencePipelineBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/ResiliencePipelineBuilderExtensions.cs index bc3e5c58506..8598bca1eb9 100644 --- a/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/ResiliencePipelineBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Resilience/Resilience/Internal/ResiliencePipelineBuilderExtensions.cs @@ -15,7 +15,7 @@ namespace Microsoft.Extensions.Resilience.Internal; /// Pub-internal extension methods for the . /// /// Do not use this class directly, it's reserved for internal use and can change at any time. -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] internal static class ResiliencePipelineBuilderExtensions { /// diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Http/TelemetryConstants.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Http/TelemetryConstants.cs index 7ccb595318c..2c7c0026b13 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Http/TelemetryConstants.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Http/TelemetryConstants.cs @@ -28,12 +28,12 @@ public static class TelemetryConstants /// /// Header for client application name, sent on an outgoing http call. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public const string ClientApplicationNameHeader = "X-ClientApplication"; /// /// Header for server application name, sent on a http request. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public const string ServerApplicationNameHeader = "X-ServerApplication"; } diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Logging/LogMethodAttribute.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Logging/LogMethodAttribute.cs index 5942a141091..49942a3b003 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Logging/LogMethodAttribute.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Logging/LogMethodAttribute.cs @@ -266,7 +266,7 @@ public LogMethodAttribute(int eventId) /// } /// /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public LogMethodAttribute() { EventId = 0; diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeterT.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeterT.cs index 6726b6cd6d2..96fd1ad9341 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeterT.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeterT.cs @@ -12,13 +12,13 @@ namespace Microsoft.Extensions.Telemetry.Metering; /// A meter class where the meter name is derived from the specified type name. /// /// The type whose name is used as the meter name. -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class Meter : Meter { /// /// Initializes a new instance of the class. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public Meter() : base(typeof(TMeterName).FullName!) { diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeteringExtensions.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeteringExtensions.cs index e69dbb13093..83881dcf4b2 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeteringExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Metering/MeteringExtensions.cs @@ -17,7 +17,7 @@ public static class MeteringExtensions /// /// The dependency injection container to register metering into. /// The value of . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection RegisterMetering(this IServiceCollection services) { services.TryAdd(ServiceDescriptor.Singleton(typeof(Meter<>), typeof(Meter<>))); diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs index df8239a77a3..14e79c8e93f 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.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. using System; @@ -17,7 +17,7 @@ namespace Microsoft.Extensions.Telemetry.Testing.Metering; /// Collects the measurements published from an or . /// /// The type of metric data being recorded. -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [DebuggerDisplay("{_measurements.Count} measurements")] public sealed class MetricCollector : IDisposable where T : struct diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggerProvider.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggerProvider.cs index b913abc9027..1002a6b79a7 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggerProvider.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggerProvider.cs @@ -19,7 +19,7 @@ namespace Microsoft.Extensions.Telemetry.Logging; /// OpenTelemetry Logger provider class. /// [ProviderAlias("R9")] -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public sealed class LoggerProvider : BaseProvider, ILoggerProvider, ISupportExternalScope { private const int ProcessorShutdownGracePeriodInMs = 5000; diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggingOptions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggingOptions.cs index 1188d2f7e11..b2ad6443181 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggingOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Logging/LoggingOptions.cs @@ -59,7 +59,7 @@ public class LoggingOptions /// /// When set to a value less than 2 KB or greater than 32 KB, an exception will be thrown. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] [Range(MinDefinedStackTraceLength, MaxDefinedStackTraceLength, ErrorMessage = "Maximum stack trace length should be between 2kb and 32kb")] public int MaxStackTraceLength { get; set; } = DefaultStackTraceLength; } diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Metering.Collectors.EventCounters/EventCountersCollectorOptions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Metering.Collectors.EventCounters/EventCountersCollectorOptions.cs index 2bb199698a3..a15e6738d2b 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Metering.Collectors.EventCounters/EventCountersCollectorOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Metering.Collectors.EventCounters/EventCountersCollectorOptions.cs @@ -69,7 +69,7 @@ public class EventCountersCollectorOptions /// EventSource: "Microsoft-AspNetCore-Server-Kestrel", Counters: /// - "connection-queue-length", "request-queue-length". /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public bool IncludeRecommendedDefault { get; set; } #if NET5_0_OR_GREATER diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Metering/MeteringOptions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Metering/MeteringOptions.cs index 76b4234fd6f..df882267a74 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Metering/MeteringOptions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Metering/MeteringOptions.cs @@ -9,7 +9,7 @@ namespace Microsoft.Extensions.Telemetry.Metering; /// /// Options for configuring metering. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class MeteringOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Metering/OTelMeteringExtensions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Metering/OTelMeteringExtensions.cs index 688762886bc..545cc9f6941 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Metering/OTelMeteringExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Metering/OTelMeteringExtensions.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.Telemetry.Metering; /// /// Metering extensions for OpenTelemetry based metrics. /// -[Experimental] +[Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static class OTelMeteringExtensions { /// @@ -22,7 +22,7 @@ public static class OTelMeteringExtensions /// /// instance. /// Returns for chaining. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static MeterProviderBuilder AddMetering( this MeterProviderBuilder builder) { @@ -35,7 +35,7 @@ public static MeterProviderBuilder AddMetering( /// instance. /// Configuration section that contains . /// Returns for chaining. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static MeterProviderBuilder AddMetering( this MeterProviderBuilder builder, IConfigurationSection configurationSection) @@ -52,7 +52,7 @@ public static MeterProviderBuilder AddMetering( /// instance. /// The configuration delegate. /// Returns for chaining. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static MeterProviderBuilder AddMetering( this MeterProviderBuilder builder, Action configure) diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry.Internal/IHttpRouteFormatter.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry.Internal/IHttpRouteFormatter.cs index f109271773f..a801b340410 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry.Internal/IHttpRouteFormatter.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry.Internal/IHttpRouteFormatter.cs @@ -21,7 +21,7 @@ internal interface IHttpRouteFormatter /// Strategy to decide how parameters are redacted. /// Dictionary of parameters with their data classification that needs to be redacted. /// Returns formatted path with sensitive parameter values redacted. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] string Format(string httpRoute, string httpPath, HttpRouteParameterRedactionMode redactionMode, IReadOnlyDictionary parametersToRedact); /// @@ -32,6 +32,6 @@ internal interface IHttpRouteFormatter /// Strategy to decide how parameters are redacted. /// Dictionary of parameters with their data classification that needs to be redacted. /// Returns formatted path with sensitive parameter values redacted. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] string Format(in ParsedRouteSegments routeSegments, string httpPath, HttpRouteParameterRedactionMode redactionMode, IReadOnlyDictionary parametersToRedact); } diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry/TelemetryExtensions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry/TelemetryExtensions.cs index 1d106201a91..163bae52211 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry/TelemetryExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Telemetry/TelemetryExtensions.cs @@ -25,7 +25,7 @@ public static class TelemetryExtensions /// /// object. /// Metadata for the request. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static void SetRequestMetadata(this HttpWebRequest request, RequestMetadata metadata) { _ = Throw.IfNull(request); @@ -58,7 +58,7 @@ public static void SetRequestMetadata(this HttpRequestMessage request, RequestMe /// /// object. /// Request metadata. - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static RequestMetadata? GetRequestMetadata(this HttpWebRequest request) { _ = Throw.IfNull(request); diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Tracing/TracingEnricherExtensions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Tracing/TracingEnricherExtensions.cs index 36cc62c5b47..e0799efc76d 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry/Tracing/TracingEnricherExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry/Tracing/TracingEnricherExtensions.cs @@ -53,7 +53,7 @@ public static TracerProviderBuilder AddTraceEnricher(this TracerProviderBuilder /// The to add this enricher to. /// The so that additional calls can be chained. /// The argument is . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddTraceEnricher(this IServiceCollection services) where T : class, ITraceEnricher { @@ -71,7 +71,7 @@ public static IServiceCollection AddTraceEnricher(this IServiceCollection ser /// Enricher to be added. /// The so that additional calls can be chained. /// The argument or is . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static IServiceCollection AddTraceEnricher(this IServiceCollection services, ITraceEnricher enricher) { _ = Throw.IfNull(services); diff --git a/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/FakeTimeProvider.cs b/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/FakeTimeProvider.cs index 7c392f7fcb4..a2cda3e1cac 100644 --- a/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/FakeTimeProvider.cs +++ b/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/FakeTimeProvider.cs @@ -29,7 +29,7 @@ public class FakeTimeProvider : TimeProvider /// which takes the epoch argument. If the default constructor is used, /// the clock's start time defaults to midnight January 1st 2000. /// - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public DateTimeOffset Epoch { get; } = new DateTimeOffset(2000, 1, 1, 0, 0, 0, 0, TimeSpan.Zero); /// @@ -49,7 +49,7 @@ public FakeTimeProvider() /// Initializes a new instance of the class. /// /// The starting point for the clock used by this . - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public FakeTimeProvider(DateTimeOffset epoch) : this() { diff --git a/test/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/UsingExperimentalApiAnalyzerTest.cs b/test/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/UsingExperimentalApiAnalyzerTest.cs index 972b29df052..4b7850240dc 100644 --- a/test/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/UsingExperimentalApiAnalyzerTest.cs +++ b/test/Analyzers/Microsoft.Extensions.ExtraAnalyzers/Common/UsingExperimentalApiAnalyzerTest.cs @@ -67,7 +67,7 @@ public void Test() } } - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class ExpClass { } diff --git a/test/Analyzers/Microsoft.Extensions.LocalAnalyzers/ApiLifecycle/ApiLifecycleAnalyzerTest.cs b/test/Analyzers/Microsoft.Extensions.LocalAnalyzers/ApiLifecycle/ApiLifecycleAnalyzerTest.cs index 4f81b21e6fd..db8821ab709 100644 --- a/test/Analyzers/Microsoft.Extensions.LocalAnalyzers/ApiLifecycle/ApiLifecycleAnalyzerTest.cs +++ b/test/Analyzers/Microsoft.Extensions.LocalAnalyzers/ApiLifecycle/ApiLifecycleAnalyzerTest.cs @@ -228,7 +228,7 @@ namespace Microsoft.Extensions.Security.Identity; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class AdditionalContext2 { protected IReadOnlyDictionary Features { get; } = new Dictionary(); @@ -347,7 +347,7 @@ public sealed class BufferWriter2 : IBufferWriter private T[] _buffer = Array.Empty(); - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public BufferWriter2() { } public ReadOnlyMemory WrittenMemory => _buffer.AsMemory(0, WrittenCount); @@ -474,7 +474,7 @@ public interface IClassifiedData public DataClass DataClass { get; } } - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public enum DataClass { @@ -562,10 +562,10 @@ namespace SomePackage; using System.Diagnostics.CodeAnalysis; - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static class Test { - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public static void Load() { // Intentionally left empty. @@ -707,7 +707,7 @@ namespace Microsoft.Extensions.Diagnostics; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class WindowsCountersOptions2 { [Required] @@ -728,7 +728,7 @@ namespace Test; using System.Diagnostics.CodeAnalysis; - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public sealed class BufferWriter { internal const int MaxArrayLength = 0X7FEF_FFFF; // Copy of the internal Array.MaxArrayLength const @@ -751,7 +751,7 @@ namespace Inheritance; using System.Diagnostics.CodeAnalysis; - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class BaseType { public virtual int P => 1; @@ -774,7 +774,7 @@ namespace Nested; using System.Diagnostics.CodeAnalysis; - [Experimental] + [Experimental(diagnosticId: "NETEXT0001", UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}")] public class OuterType { public int ReadValue(string s) => new InnerType().P;