/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/Server/VBCSCompilerTests/XunitCompilerServerLogger.cs
34 строки
1 KB
Copilot
Treat more recoverable pipe failures as non-fatal (#84076)
23 июн 2026, 13:34
Не верифицирован
23 июн 2026, 13:34
7dc3790
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using Microsoft.CodeAnalysis.CommandLine; using Xunit.Abstractions; namespace Microsoft.CodeAnalysis.CompilerServer.UnitTests { internal sealed class XunitCompilerServerLogger : ICompilerServerLogger { private readonly object _messagesGate = new object(); public ITestOutputHelper TestOutputHelper { get; } public List<string> Messages { get; } = new List<string>(); public bool IsLogging => true; public XunitCompilerServerLogger(ITestOutputHelper testOutputHelper) { TestOutputHelper = testOutputHelper; } public void Log(string message) { lock (_messagesGate) { Messages.Add(message); } TestOutputHelper.WriteLine(message); } } }