From 38a301f4875b0149cb118ea93a8d2bf5065da7b7 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Thu, 29 Jun 2023 10:06:16 +1000 Subject: [PATCH] Setup default experimental diagnostic URL --- Directory.Build.targets | 2 ++ eng/MSBuild/Shared.props | 4 ++++ eng/packages/General.props | 2 +- .../Logging/LoggingOptions.cs | 4 ++-- .../RequestHeadersLogEnricherOptions.cs | 2 +- .../Tracing/HttpTracingExtensions.cs | 4 ++-- .../Tracing/HttpTracingOptions.cs | 2 +- .../IAsyncLocalContext.cs | 2 +- ...ealthChecksExtensions.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 +- .../FaultInjection/ContextExtensions.cs | 2 +- .../HttpClientFaultInjectionExtensions.cs | 4 ++-- .../StandardHedgingHandlerBuilderExtensions.cs | 2 +- ...andardResilienceBuilderBuilderExtensions.cs | 2 +- .../RoutingStrategyBuilderExtensions.cs | 4 ++-- .../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 +- .../FaultInjection/FaultInjectionExtensions.cs | 2 +- .../FaultInjectionOptionsBuilder.cs | 2 +- .../FaultInjection/IChaosPolicyFactory.cs | 2 +- .../Options/ChaosPolicyOptionsGroup.cs | 2 +- .../Options/CustomResultPolicyOptions.cs | 4 ++-- .../FaultPolicyWeightAssignmentsOptions.cs | 2 +- .../Http/TelemetryConstants.cs | 4 ++-- .../Logging/LogMethodAttribute.cs | 2 +- .../Metering/MeterT.cs | 4 ++-- .../Metering/MeteringExtensions.cs | 2 +- .../Metering/CollectedMeasurement.cs | 2 +- .../Metering/MeasurementExtensions.cs | 2 +- .../Metering/MetricCollector.cs | 2 +- .../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 | 14 +++++++------- .../Model/DatabaseOptions.cs | 8 +++----- src/Shared/Shared.csproj | 5 +++++ src/Shared/WarningDefinitions.cs | 11 +++++++++++ .../ApiLifecycle/ApiLifecycleAnalyzerTest.cs | 18 +++++++++--------- 72 files changed, 124 insertions(+), 104 deletions(-) create mode 100644 src/Shared/WarningDefinitions.cs diff --git a/Directory.Build.targets b/Directory.Build.targets index 28ea582b1e2..162b97c77c2 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -78,6 +78,8 @@ <_Parameter1>TBD + <_Parameter2>UrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}" + <_Parameter2_IsLiteral>true diff --git a/eng/MSBuild/Shared.props b/eng/MSBuild/Shared.props index faa7aa2bbcc..688497594f3 100644 --- a/eng/MSBuild/Shared.props +++ b/eng/MSBuild/Shared.props @@ -1,4 +1,8 @@ + + + + diff --git a/eng/packages/General.props b/eng/packages/General.props index 9bd8f934fa7..f2428abd8d4 100644 --- a/eng/packages/General.props +++ b/eng/packages/General.props @@ -69,7 +69,7 @@ - + diff --git a/src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs b/src/Libraries/Microsoft.AspNetCore.Telemetry.Middleware/Logging/LoggingOptions.cs index 5085a820bad..1b8d4484e75 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public HttpRouteParameterRedactionMode RequestPathParameterRedactionMode { get; set; } = DefaultPathParameterRedactionMode; /// @@ -208,7 +208,7 @@ public class LoggingOptions /// }; /// /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 eaf16a28132..48a9c455637 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] #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 24f72a1ef9b..479800527cf 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 1b4f1d8a5a6..795304f4961 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 be5e9025591..84f8113f0e4 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 9034b7b9884..09fccdd8fd7 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 d2b1155551a..e8d358c322a 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class TelemetryHealthCheckPublisherOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringOptions.cs b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/ResourceMonitoringOptions.cs index 97f2b805ff1..8e2c81b3eb8 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 1678918817c..143038d129b 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class WindowsCountersOptions { internal const int MinimumCachingInterval = 100; @@ -33,7 +33,7 @@ public class WindowsCountersOptions /// /// The default value is 5 seconds. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 1718e85d9e9..24b2181c9c2 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 9d61e191b86..dd7f30caa0d 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 43f66cda85e..991d8dc86c7 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 56bdd54dae6..fcf66278270 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 a194a4c2d1c..5fa83d55f6d 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class AutoClientHttpError { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientOptions.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/AutoClientOptions.cs index 11df36f248c..9d2396b9d9f 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class AutoClientOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/BodyAttribute.cs index 697c8806ee8..e42f95bc907 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 4a4617cdc0b..f0db4db2d67 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public enum BodyContentType { /// diff --git a/src/Libraries/Microsoft.Extensions.Http.AutoClient/HeaderAttribute.cs b/src/Libraries/Microsoft.Extensions.Http.AutoClient/HeaderAttribute.cs index e1af6b6240f..870ec80600a 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 ab67d7e61f8..e7121e9089d 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 29859dac58a..83d21e01cd6 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 7ede1879fc4..57f24addaec 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 11659f78b06..9d000a6dd98 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 489259c9c28..d3388371ca2 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 52385dc5873..c88d022a988 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 9342d15fca2..db4e5c3eecb 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 306ad18839d..b41741594e7 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 48cefbdc1e9..36334e48012 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 5c44944c918..3414c852343 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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/ContextExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/ContextExtensions.cs index 72f6fc491b8..a2d6fce2463 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/ContextExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/ContextExtensions.cs @@ -11,7 +11,7 @@ namespace Microsoft.Extensions.Http.Resilience.FaultInjection; /// /// Provides extension methods for . /// -[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static class ContextExtensions { private const string CallingRequestMessage = "CallingRequestMessage"; diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/HttpClientFaultInjectionExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/FaultInjection/HttpClientFaultInjectionExtensions.cs index 289b9aed156..79384677e04 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [DynamicDependency( DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicParameterlessConstructor, typeof(FaultPolicyWeightAssignmentsOptions))] diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs index 5630e7420ea..482134c966e 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/Hedging/StandardHedgingHandlerBuilderExtensions.cs @@ -61,7 +61,7 @@ public static IStandardHedgingHandlerBuilder Configure(this IStandardHedgingHand /// The strategy builder. /// The configure method. /// The same builder instance. - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static IStandardHedgingHandlerBuilder Configure(this IStandardHedgingHandlerBuilder builder, Action configure) { _ = Throw.IfNull(builder); diff --git a/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResilienceBuilderBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResilienceBuilderBuilderExtensions.cs index 0b0fef0d0cc..cea0f55d811 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResilienceBuilderBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/Resilience/HttpStandardResilienceBuilderBuilderExtensions.cs @@ -62,7 +62,7 @@ public static IHttpStandardResilienceStrategyBuilder 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static IHttpStandardResilienceStrategyBuilder Configure(this IHttpStandardResilienceStrategyBuilder 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/Routing/RoutingStrategyBuilderExtensions.cs b/src/Libraries/Microsoft.Extensions.Http.Resilience/Routing/RoutingStrategyBuilderExtensions.cs index f1ef1667a4a..b61d352be8f 100644 --- a/src/Libraries/Microsoft.Extensions.Http.Resilience/Routing/RoutingStrategyBuilderExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Http.Resilience/Routing/RoutingStrategyBuilderExtensions.cs @@ -67,7 +67,7 @@ public static IRoutingStrategyBuilder ConfigureOrderedGroups(this IRoutingStrate /// /// The same routing builder instance. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static IRoutingStrategyBuilder ConfigureOrderedGroups(this IRoutingStrategyBuilder builder, Action configure) { _ = Throw.IfNull(builder); @@ -121,7 +121,7 @@ public static IRoutingStrategyBuilder ConfigureWeightedGroups(this IRoutingStrat /// /// The same routing builder instance. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static IRoutingStrategyBuilder ConfigureWeightedGroups(this IRoutingStrategyBuilder builder, Action configure) { _ = Throw.IfNull(builder); diff --git a/src/Libraries/Microsoft.Extensions.Http.Telemetry/Logging/LoggingOptions.cs b/src/Libraries/Microsoft.Extensions.Http.Telemetry/Logging/LoggingOptions.cs index aa05eb08e3f..dde659ecf0e 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 5a96349c2ba..5bfe9a45cb5 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 309ed468fc2..c91c0ea162a 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 a24204404d5..c93429ec899 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 85fff0062b3..5d0a2a297b0 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 a1b678643a9..8833ee5cb55 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 307325ab00f..dde431b28ff 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 1ec02d6758f..42beec0a000 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public interface IHttpPathRedactor { /// diff --git a/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/DependencyInjectionPoolOptions.cs b/src/Libraries/Microsoft.Extensions.ObjectPool.DependencyInjection/DependencyInjectionPoolOptions.cs index f5002f122ca..2569ccb4ba3 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 29ea71e2995..0fb5894b606 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static class ObjectPoolServiceCollectionExtensions { /// diff --git a/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionExtensions.cs b/src/Libraries/Microsoft.Extensions.Resilience/FaultInjection/FaultInjectionExtensions.cs index f57611abe36..2aaa9a43773 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 93d68bd3c86..c839db73056 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 32906ec0217..da707ba38ef 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 ee261e4c747..15f734e1d93 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 8fd856fbe58..58e9d7c2527 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class CustomResultPolicyOptions : ChaosPolicyOptionsBase { /// @@ -20,7 +20,7 @@ public class CustomResultPolicyOptions : ChaosPolicyOptionsBase /// from . /// Default is set to . /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 53daba3e416..e83c75d9eea 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class FaultPolicyWeightAssignmentsOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Http/TelemetryConstants.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Abstractions/Http/TelemetryConstants.cs index e942a25099d..9905266f05b 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public const string ClientApplicationNameHeader = "X-ClientApplication"; /// /// Header for server application name, sent on a http request. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 8e7659d3cc2..19ad568e435 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 3f2f6a034ab..8326cb378ca 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class Meter : Meter { /// /// Initializes a new instance of the class. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 a4f6354dabc..b4a44b1048a 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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/CollectedMeasurement.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/CollectedMeasurement.cs index 687a62b44d7..36d486d4d39 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/CollectedMeasurement.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/CollectedMeasurement.cs @@ -14,7 +14,7 @@ namespace Microsoft.Extensions.Telemetry.Testing.Metering; /// Represents a single measurement performed by an instrument. /// /// The type of metric measurement value. -[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [DebuggerDisplay("{DebuggerToString(),nq}")] public sealed class CollectedMeasurement where T : struct diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MeasurementExtensions.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MeasurementExtensions.cs index ee8bed03241..1178dd4899a 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MeasurementExtensions.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MeasurementExtensions.cs @@ -11,7 +11,7 @@ namespace Microsoft.Extensions.Telemetry.Testing.Metering; /// /// Extensions to simplify working with lists of measurements. /// -[Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static class MeasurementExtensions { /// diff --git a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs index d234babe126..012653476c4 100644 --- a/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs +++ b/src/Libraries/Microsoft.Extensions.Telemetry.Testing/Metering/MetricCollector.cs @@ -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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 7a724330783..54d44e9f1c6 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 8cdc35b2251..d717b176710 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] [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 d9be1869744..ab6504d4738 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 141a982c8f4..2853844ced7 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class MeteringOptions { /// diff --git a/src/Libraries/Microsoft.Extensions.Telemetry/Metering/OTelMeteringExtensions.cs b/src/Libraries/Microsoft.Extensions.Telemetry/Metering/OTelMeteringExtensions.cs index 3fccb6ef825..7ffafd48ffc 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(diagnosticId: "TBD", UrlFormat = "TBD")] +[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static class OTelMeteringExtensions { /// @@ -22,7 +22,7 @@ public static class OTelMeteringExtensions /// /// instance. /// Returns for chaining. - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static MeterProviderBuilder AddMetering( this MeterProviderBuilder builder) { @@ -35,7 +35,7 @@ public static MeterProviderBuilder AddMetering( /// instance. /// Configuration section that contains . /// Returns for chaining. - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 258e30afd33..4ceaaf9ee54 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 911759ca8d1..c825c6397bc 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 76854f58e0d..aeca5ff9f39 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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 b45f50d29f8..07819603cad 100644 --- a/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/FakeTimeProvider.cs +++ b/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/FakeTimeProvider.cs @@ -30,7 +30,7 @@ public class FakeTimeProvider : TimeProvider /// This creates a provider whose time is initially set to midnight January 1st 2000. /// The provider is set to not automatically advance time each time it is read. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public FakeTimeProvider() { Start = _now; @@ -43,7 +43,7 @@ public FakeTimeProvider() /// /// The provider is set to not automatically advance time each time it is read. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public FakeTimeProvider(DateTimeOffset startDateTime) { _ = Throw.IfLessThan(startDateTime.Ticks, 0); @@ -55,7 +55,7 @@ public FakeTimeProvider(DateTimeOffset startDateTime) /// /// Gets the starting date and time for this provider. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public DateTimeOffset Start { get; } /// @@ -64,7 +64,7 @@ public FakeTimeProvider(DateTimeOffset startDateTime) /// /// This defaults to . /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public TimeSpan AutoAdvanceAmount { get => _autoAdvanceAmount; @@ -94,7 +94,7 @@ public override DateTimeOffset GetUtcNow() /// Sets the date and time in the UTC time zone. /// /// The date and time in the UTC time zone. - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public void SetUtcNow(DateTimeOffset value) { lock (Waiters) @@ -120,7 +120,7 @@ public void SetUtcNow(DateTimeOffset value) /// marches forward automatically in hardware, for the fake time provider the application is responsible for /// doing this explicitly by calling this method. /// - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public void Advance(TimeSpan delta) { _ = Throw.IfLessThan(delta.Ticks, 0); @@ -155,7 +155,7 @@ public override long GetTimestamp() /// Sets the local time zone. /// /// The local time zone. - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public void SetLocalTimeZone(TimeZoneInfo localTimeZone) => _localTimeZone = localTimeZone; /// diff --git a/src/Libraries/System.Cloud.DocumentDb.Abstractions/Model/DatabaseOptions.cs b/src/Libraries/System.Cloud.DocumentDb.Abstractions/Model/DatabaseOptions.cs index 251919cb4d8..39bb7f959d3 100644 --- a/src/Libraries/System.Cloud.DocumentDb.Abstractions/Model/DatabaseOptions.cs +++ b/src/Libraries/System.Cloud.DocumentDb.Abstractions/Model/DatabaseOptions.cs @@ -97,7 +97,7 @@ public class DatabaseOptions /// When enabled, System.Text.Json based serialization will be configured with /// settings defined in . /// - [Experimental("New feature.")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public bool OverrideSerialization { get; set; } = true; /// @@ -106,8 +106,7 @@ public class DatabaseOptions /// /// The default value is empty . /// - [SuppressMessage("Usage", "CA2227:Collection properties should be read only", - Justification = "Options pattern.")] + [SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Options pattern.")] public IList FailoverRegions { get; set; } = new List(); @@ -117,8 +116,7 @@ public class DatabaseOptions /// /// The default value is empty . /// - [SuppressMessage("Usage", "CA2227:Collection properties should be read only", - Justification = "Options pattern.")] + [SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Options pattern.")] public IDictionary RegionalDatabaseOptions { get; set; } = new Dictionary(); } diff --git a/src/Shared/Shared.csproj b/src/Shared/Shared.csproj index 1d8c3d2a6f8..5418ee99e8e 100644 --- a/src/Shared/Shared.csproj +++ b/src/Shared/Shared.csproj @@ -39,4 +39,9 @@ + + + + + diff --git a/src/Shared/WarningDefinitions.cs b/src/Shared/WarningDefinitions.cs new file mode 100644 index 00000000000..e91963c3e8f --- /dev/null +++ b/src/Shared/WarningDefinitions.cs @@ -0,0 +1,11 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace System.Diagnostics.CodeAnalysis; + +#pragma warning disable S1075 // URIs should not be hardcoded +internal static class WarningDefinitions +{ + internal const string SharedUrlFormat = "https://aka.ms/dotnet-extensions-warnings/{0}"; +} +#pragma warning restore S1075 // URIs should not be hardcoded diff --git a/test/Analyzers/Microsoft.Extensions.LocalAnalyzers/ApiLifecycle/ApiLifecycleAnalyzerTest.cs b/test/Analyzers/Microsoft.Extensions.LocalAnalyzers/ApiLifecycle/ApiLifecycleAnalyzerTest.cs index 379a0fe65df..6239d25dd8b 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class AdditionalContext2 { protected IReadOnlyDictionary Features { get; } = new Dictionary(); @@ -347,7 +347,7 @@ public sealed class BufferWriter2 : IBufferWriter private T[] _buffer = Array.Empty(); - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public BufferWriter2() { } public ReadOnlyMemory WrittenMemory => _buffer.AsMemory(0, WrittenCount); @@ -474,7 +474,7 @@ public interface IClassifiedData public DataClass DataClass { get; } } - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public enum DataClass { @@ -562,10 +562,10 @@ namespace SomePackage; using System.Diagnostics.CodeAnalysis; - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static class Test { - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public static void Load() { // Intentionally left empty. @@ -707,7 +707,7 @@ namespace Microsoft.Extensions.Diagnostics; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class WindowsCountersOptions2 { [Required] @@ -728,7 +728,7 @@ namespace Test; using System.Diagnostics.CodeAnalysis; - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] 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(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class BaseType { public virtual int P => 1; @@ -774,7 +774,7 @@ namespace Nested; using System.Diagnostics.CodeAnalysis; - [Experimental(diagnosticId: "TBD", UrlFormat = "TBD")] + [Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)] public class OuterType { public int ReadValue(string s) => new InnerType().P;