Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete UnitTesting external access APIs #45553

Merged
merged 1 commit into from
Jul 2, 2020
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

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,8 @@ internal readonly struct UnitTestingInvocationReasonsWrapper
internal UnitTestingInvocationReasonsWrapper(InvocationReasons underlyingObject)
=> UnderlyingObject = underlyingObject;

public UnitTestingInvocationReasonsWrapper(string reason) : this(new InvocationReasons(reason)) { }

[Obsolete]
public bool Contains(string reason)
=> UnderlyingObject.Contains(reason);

[Obsolete]
public UnitTestingInvocationReasonsWrapper With(string reason)
=> new UnitTestingInvocationReasonsWrapper(UnderlyingObject.With(reason));
public UnitTestingInvocationReasonsWrapper(string reason)
: this(new InvocationReasons(reason)) { }

public UnitTestingInvocationReasonsWrapper With(UnitTestingInvocationReasonsWrapper reason)
=> new UnitTestingInvocationReasonsWrapper(reason.UnderlyingObject.With(UnderlyingObject));
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,6 @@ public async Task<Optional<T>> TryRunRemoteAsync<T>(UnitTestingServiceHubService
public async Task<UnitTestingRemoteServiceConnectionWrapper> CreateConnectionAsync(UnitTestingServiceHubService service, object? callbackTarget, CancellationToken cancellationToken)
=> new UnitTestingRemoteServiceConnectionWrapper(await UnderlyingObject!.CreateConnectionAsync((WellKnownServiceHubService)service, callbackTarget, cancellationToken).ConfigureAwait(false));

[Obsolete]
public async Task<UnitTestingKeepAliveSessionWrapper> TryCreateUnitTestingKeepAliveSessionWrapperAsync(string serviceName, CancellationToken cancellationToken)
{
var connection = await UnderlyingObject!.CreateConnectionAsync(new RemoteServiceName(serviceName), callbackTarget: null, cancellationToken).ConfigureAwait(false);
return new UnitTestingKeepAliveSessionWrapper(connection);
}

[Obsolete]
public async Task<UnitTestingSessionWithSolutionWrapper> TryCreateUnitingSessionWithSolutionWrapperAsync(string serviceName, Solution solution, CancellationToken cancellationToken)
{
var connection = await UnderlyingObject!.CreateConnectionAsync(new RemoteServiceName(serviceName), callbackTarget: null, cancellationToken).ConfigureAwait(false);

SessionWithSolution? session = null;
try
{
// transfer ownership of the connection to the session object:
session = await SessionWithSolution.CreateAsync(connection, solution, cancellationToken).ConfigureAwait(false);
}
finally
{
if (session == null)
{
connection.Dispose();
}
}

return new UnitTestingSessionWithSolutionWrapper(session);
}

[Obsolete]
public event EventHandler<bool> StatusChanged
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,5 @@ public static int GetWorkspaceVersion(this Solution solution)

public static async Task<UnitTestingChecksumWrapper> GetChecksumAsync(this Solution solution, CancellationToken cancellationToken)
=> new UnitTestingChecksumWrapper(await solution.State.GetChecksumAsync(cancellationToken).ConfigureAwait(false));

[Obsolete("Use GetChecksumAsync instead")]
public static UnitTestingSolutionStateWrapper GetState(this Solution solution)
=> new UnitTestingSolutionStateWrapper(solution.State);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.UnitTesting.Api
{
internal static class UnitTestingSymbolExtensions
{
[Obsolete("Use GetSymbolKeyString instead")]
public static UnitTestingSymbolKeyWrapper GetSymbolKey(this ISymbol symbol, CancellationToken cancellationToken)
=> new UnitTestingSymbolKeyWrapper(SymbolKeyExtensions.GetSymbolKey(symbol, cancellationToken));

public static string GetSymbolKeyString(this ISymbol symbol, CancellationToken cancellationToken)
=> SymbolKey.Create(symbol, cancellationToken).ToString();

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading