/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Middleware/HttpLogging/test/Helpers.cs
36 строк
932 B
David Acker
W3CLogger follow-ups (#42151)
16 июн 2022, 20:16
Не верифицирован
16 июн 2022, 20:16
4ea0f60
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using Microsoft.Extensions.Hosting.Internal; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.HttpLogging; internal static class Helpers { public static void DisposeDirectory(string path) { try { if (Directory.Exists(path)) { Directory.Delete(path, true); } } catch { // ignored } } public static TestW3CLogger CreateTestW3CLogger(IOptionsMonitor<W3CLoggerOptions> options) { return new TestW3CLogger( options, new TestW3CLoggerProcessor( options, new HostingEnvironment(), NullLoggerFactory.Instance)); } }