Workshop - Added profile uploading

Submission wizard - Final upload steps
This commit is contained in:
Robert committed 2023-08-13 21:11:05 +02:00
1 parent e52faf1c9f
commit ad4da3032d
32 files changed
+621 -93

No files matched your search

@@ -0,0 +1,18 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Http;
using StrawberryShake;
namespace Artemis.WebClient.Workshop.Extensions;
public static class ClientBuilderExtensions
{
public static IClientBuilder<T> AddHttpMessageHandler<T, THandler>(this IClientBuilder<T> builder) where THandler : DelegatingHandler where T : IStoreAccessor
{
builder.Services.Configure<HttpClientFactoryOptions>(
builder.ClientName,
options => options.HttpMessageHandlerBuilderActions.Add(b => b.AdditionalHandlers.Add(b.Services.GetRequiredService<THandler>()))
);
return builder;
}
}