提交 15faf2bb 编写于 作者: S Sam Harwell

Implement External Access APIs for Apex

上级 95e79afc
// 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);
}
}
// 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);
}
}
......@@ -24,6 +24,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj" />
<ProjectReference Include="..\..\..\Workspaces\Core\Portable\Microsoft.CodeAnalysis.Workspaces.csproj" />
</ItemGroup>
<ItemGroup>
......
......@@ -232,6 +232,7 @@
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.EditorFeatures" />
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.EditorFeatures.Text" />
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.EditorFeatures.Wpf" />
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.ExternalAccess.Apex" />
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.ExternalAccess.Debugger" />
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.ExternalAccess.UnitTesting" />
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.Features" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册