Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ namespace Microsoft.Testing.Platform.Builder;
/// Represents a test application.
/// </summary>
public sealed class TestApplication : ITestApplication
#if NETCOREAPP
#pragma warning disable SA1001 // Commas should be spaced correctly
, IAsyncDisposable
#pragma warning restore SA1001 // Commas should be spaced correctly
#endif
{
private readonly IHost _host;
private static UnhandledExceptionHandler? s_unhandledExceptionHandler;
Expand All @@ -41,6 +36,7 @@ static TestApplication() =>
/// <param name="args">The command line arguments.</param>
/// <param name="testApplicationOptions">The test application options.</param>
/// <returns>The task representing the asynchronous operation.</returns>
[Obsolete("This method is obsolete. Use CreateBuilderAsync instead.")]
public static Task<ITestApplicationBuilder> CreateServerModeBuilderAsync(string[] args, TestApplicationOptions? testApplicationOptions = null)
{
if (args.Contains($"--{PlatformCommandLineProvider.ServerOptionKey}") || args.Contains($"-{PlatformCommandLineProvider.ServerOptionKey}"))
Expand Down Expand Up @@ -214,14 +210,6 @@ async Task LogVariableAsync(string key)
public void Dispose()
=> (_host as IDisposable)?.Dispose();

#if NETCOREAPP
/// <inheritdoc />
public ValueTask DisposeAsync()
=> _host is IAsyncDisposable asyncDisposable
? asyncDisposable.DisposeAsync()
: ValueTask.CompletedTask;
#endif

/// <inheritdoc />
public async Task<int> RunAsync()
=> await _host.RunAsync().ConfigureAwait(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#nullable enable
*REMOVED*Microsoft.Testing.Platform.Builder.TestApplication.DisposeAsync() -> System.Threading.Tasks.ValueTask