diff --git a/src/Tools/ExternalAccess/Apex/ApexAsynchronousOperationListenerProviderAccessor.cs b/src/Tools/ExternalAccess/Apex/ApexAsynchronousOperationListenerProviderAccessor.cs new file mode 100644 index 0000000000000000000000000000000000000000..7f34b78baf591ad1aef83d437c375b1c66b598ea --- /dev/null +++ b/src/Tools/ExternalAccess/Apex/ApexAsynchronousOperationListenerProviderAccessor.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Composition; +using System.Threading.Tasks; +using Microsoft.CodeAnalysis.Host.Mef; +using Microsoft.CodeAnalysis.Shared.TestHooks; + +namespace Microsoft.CodeAnalysis.ExternalAccess.Apex +{ + [Export(typeof(IApexAsynchronousOperationListenerProviderAccessor))] + [Shared] + internal sealed class ApexAsynchronousOperationListenerProviderAccessor : IApexAsynchronousOperationListenerProviderAccessor + { + private readonly AsynchronousOperationListenerProvider _implementation; + + [ImportingConstructor] + [Obsolete(MefConstruction.ImportingConstructorMessage, error: true)] + public ApexAsynchronousOperationListenerProviderAccessor(AsynchronousOperationListenerProvider implementation) + { + _implementation = implementation; + } + + public Task WaitAllAsync(string[] featureNames = null, Action eventProcessingAction = null) + => _implementation.WaitAllAsync(featureNames, eventProcessingAction); + } +} diff --git a/src/Tools/ExternalAccess/Apex/IApexAsynchronousOperationListenerProviderAccessor.cs b/src/Tools/ExternalAccess/Apex/IApexAsynchronousOperationListenerProviderAccessor.cs new file mode 100644 index 0000000000000000000000000000000000000000..f4b0196d6a76dc034ac31dda3df97cfbf5598f86 --- /dev/null +++ b/src/Tools/ExternalAccess/Apex/IApexAsynchronousOperationListenerProviderAccessor.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using System; +using System.Threading.Tasks; + +namespace Microsoft.CodeAnalysis.ExternalAccess.Apex +{ + internal interface IApexAsynchronousOperationListenerProviderAccessor + { + Task WaitAllAsync(string[] featureNames = null, Action eventProcessingAction = null); + } +} diff --git a/src/Tools/ExternalAccess/Apex/Microsoft.CodeAnalysis.ExternalAccess.Apex.csproj b/src/Tools/ExternalAccess/Apex/Microsoft.CodeAnalysis.ExternalAccess.Apex.csproj index 7e026f514c6a439834ba05b996f631a915069244..fe376f49a347fe3bc5895d38232e408e61286c48 100644 --- a/src/Tools/ExternalAccess/Apex/Microsoft.CodeAnalysis.ExternalAccess.Apex.csproj +++ b/src/Tools/ExternalAccess/Apex/Microsoft.CodeAnalysis.ExternalAccess.Apex.csproj @@ -24,6 +24,7 @@ + diff --git a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj index 81014c875cdf528509049b27f2370320ae1b7b93..04de51d5f963384f36f621688495cb10590835c1 100644 --- a/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj +++ b/src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj @@ -232,6 +232,7 @@ +