Skip to content

Commit

Permalink
Add more xmldoc
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdecock committed Aug 26, 2024
1 parent 4af5a33 commit 4504958
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions src/Duende.Bff.Blazor.Client/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ private static void SetBaseAddress(IServiceProvider sp, HttpClient client)
/// <param name="clientName">The name of that <see cref="HttpClient"/> to
/// configure. A common use case is to use the same named client in multiple
/// render contexts that are automatically switched between via interactive
/// render modes.</param>
/// render modes. In that case, ensure both the client and server project
/// define the HttpClient appropriately.</param>
/// <param name="configureClient">A configuration callback used to set up
/// the <see cref="HttpClient"/>.</param>
public static IHttpClientBuilder AddRemoteApiHttpClient(this IServiceCollection services, string clientName,
Expand All @@ -136,7 +137,8 @@ public static IHttpClientBuilder AddRemoteApiHttpClient(this IServiceCollection
/// <param name="clientName">The name of that <see cref="HttpClient"/> to
/// configure. A common use case is to use the same named client in multiple
/// render contexts that are automatically switched between via interactive
/// render modes.</param>
/// render modes. In that case, ensure both the client and server project
/// define the HttpClient appropriately.</param>
/// <param name="configureClient">A configuration callback used to set up
/// the <see cref="HttpClient"/>.</param>
public static IHttpClientBuilder AddRemoteApiHttpClient(this IServiceCollection services, string clientName,
Expand All @@ -146,7 +148,17 @@ public static IHttpClientBuilder AddRemoteApiHttpClient(this IServiceCollection
.AddHttpMessageHandler<AntiforgeryHandler>();
}

// TODO - Manually test this API.
/// <summary>
/// Adds a typed <see cref="HttpClient"/> for use when invoking remote APIs
/// proxied through Duende.Bff and configures the client with a callback.
/// </summary>
/// <param name="clientName">The name of that <see cref="HttpClient"/> to
/// configure. A common use case is to use the same named client in multiple
/// render contexts that are automatically switched between via interactive
/// render modes. In that case, ensure both the client and server project
/// define the HttpClient appropriately.</param>
/// <param name="configureClient">A configuration callback used to set up
/// the <see cref="HttpClient"/>.</param>
public static IHttpClientBuilder AddRemoteApiHttpClient<T>(this IServiceCollection services,
Action<HttpClient> configureClient)
where T : class
Expand All @@ -155,6 +167,18 @@ public static IHttpClientBuilder AddRemoteApiHttpClient<T>(this IServiceCollecti
.AddHttpMessageHandler<AntiforgeryHandler>();
}

/// <summary>
/// Adds a typed <see cref="HttpClient"/> for use when invoking remote APIs
/// proxied through Duende.Bff and configures the client with a callback
/// that has access to the underlying service provider.
/// </summary>
/// <param name="clientName">The name of that <see cref="HttpClient"/> to
/// configure. A common use case is to use the same named client in multiple
/// render contexts that are automatically switched between via interactive
/// render modes. In that case, ensure both the client and server project
/// define the HttpClient appropriately.</param>
/// <param name="configureClient">A configuration callback used to set up
/// the <see cref="HttpClient"/>.</param>
public static IHttpClientBuilder AddRemoteApiHttpClient<T>(this IServiceCollection services,
Action<IServiceProvider, HttpClient>? configureClient = null)
where T : class
Expand Down

0 comments on commit 4504958

Please sign in to comment.