/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/Forwarder/CallbackHttpClientFactory.cs
25 строк
875 B
Kahbazi
File Scoped Namespaces (#1352)
12 ноя 2021, 21:53
Не верифицирован
12 ноя 2021, 21:53
44f13d9
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using System.Net.Http; using Microsoft.Extensions.Logging; namespace Yarp.ReverseProxy.Forwarder; internal sealed class CallbackHttpClientFactory : ForwarderHttpClientFactory { private readonly Action<ForwarderHttpClientContext, SocketsHttpHandler> _configureClient; internal CallbackHttpClientFactory(ILogger<ForwarderHttpClientFactory> logger, Action<ForwarderHttpClientContext, SocketsHttpHandler> configureClient) : base(logger) { _configureClient = configureClient ?? throw new ArgumentNullException(nameof(configureClient)); } protected override void ConfigureHandler(ForwarderHttpClientContext context, SocketsHttpHandler handler) { base.ConfigureHandler(context, handler); _configureClient(context, handler); } }