-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
121 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Compilers/Test/Core/Platform/Desktop/AppDomainTestOutputHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// 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. | ||
|
||
#if NET472 | ||
using System; | ||
using System.IO; | ||
using System.Reflection; | ||
using Xunit.Abstractions; | ||
|
||
namespace Roslyn.Test.Utilities.Desktop; | ||
|
||
/// <summary> | ||
/// Allows using an <see cref="ITestOutputHelper"/> across <see cref="AppDomain"/> | ||
/// instances | ||
/// </summary> | ||
public sealed class AppDomainTestOutputHelper : MarshalByRefObject, ITestOutputHelper | ||
{ | ||
public ITestOutputHelper TestOutputHelper { get; } | ||
|
||
public AppDomainTestOutputHelper(ITestOutputHelper testOutputHelper) | ||
{ | ||
TestOutputHelper = testOutputHelper; | ||
} | ||
|
||
public void WriteLine(string message) => | ||
TestOutputHelper.WriteLine(message); | ||
|
||
public void WriteLine(string format, params object[] args) => | ||
TestOutputHelper.WriteLine(format, args); | ||
} | ||
|
||
#endif |