From 3afbcded0170a7b7afd9ad6f8f1a40e7e37924db Mon Sep 17 00:00:00 2001 From: Safia Abdalla Date: Wed, 19 Jan 2022 05:19:04 +0000 Subject: [PATCH] Address initial feedback from API review --- .../Http.Extensions/src/HttpJsonServiceExtensions.cs | 12 +++++++----- src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Http/Http.Extensions/src/HttpJsonServiceExtensions.cs b/src/Http/Http.Extensions/src/HttpJsonServiceExtensions.cs index ad2ae3f87a86..ad7865d06dd2 100644 --- a/src/Http/Http.Extensions/src/HttpJsonServiceExtensions.cs +++ b/src/Http/Http.Extensions/src/HttpJsonServiceExtensions.cs @@ -2,27 +2,29 @@ // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.AspNetCore.Http.Json; -using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.AspNetCore.Http; +namespace Microsoft.Extensions.DependencyInjection; /// /// Extension methods to configure JSON serialization behavior. /// -public static class HttpJsonServiceExtensions +public static class RouteHandlerJsonServiceExtensions { +#pragma warning disable CS0419 // Ambiguous reference in cref attribute /// /// Configures options used for reading and writing JSON by route handlers. /// /// /// The options configured here will only affect JSON returned and processed - /// from route handlers, not controllers. + /// from route handlers, not controllers, when using + /// and . /// /// The to configure options on. /// The to configure the /// . /// The modified . - public static IServiceCollection ConfigureHttpJsonOptions(this IServiceCollection services, Action configureOptions) +#pragma warning restore CS0419 // Ambiguous reference in cref attribute + public static IServiceCollection ConfigureRouteHandlerJsonOptions(this IServiceCollection services, Action configureOptions) { services.Configure(configureOptions); return services; diff --git a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt index 5f38df127f40..1030d0f0793e 100644 --- a/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt +++ b/src/Http/Http.Extensions/src/PublicAPI.Unshipped.txt @@ -1,3 +1,3 @@ #nullable enable -Microsoft.AspNetCore.Http.HttpJsonServiceExtensions -static Microsoft.AspNetCore.Http.HttpJsonServiceExtensions.ConfigureHttpJsonOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection! +Microsoft.Extensions.DependencyInjection.RouteHandlerJsonServiceExtensions +static Microsoft.Extensions.DependencyInjection.RouteHandlerJsonServiceExtensions.ConfigureRouteHandlerJsonOptions(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configureOptions) -> Microsoft.Extensions.DependencyInjection.IServiceCollection!