未验证 提交 1667bc61 编写于 作者: T Tomáš Matoušek 提交者: GitHub

Add VSTypeScriptAsynchronousTaggerProvider (#57310)

上级 145752d0
// 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.
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Editor.Tagging;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.VisualStudio.Text.Tagging;
namespace Microsoft.CodeAnalysis.ExternalAccess.VSTypeScript.Api
{
internal abstract class VSTypeScriptAsynchronousTaggerProvider<TTag> : AsynchronousViewTaggerProvider<TTag>
where TTag : ITag
{
protected VSTypeScriptAsynchronousTaggerProvider(
IThreadingContext threadingContext,
IAsynchronousOperationListenerProvider asyncListenerProvider,
#pragma warning disable IDE0060 // TODO: use global options
VSTypeScriptGlobalOptions globalOptions)
#pragma warning restore IDE0060
: base(threadingContext, asyncListenerProvider.GetListener(FeatureAttribute.Classification))
{
}
}
}
// 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.
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Editor;
namespace Microsoft.CodeAnalysis.ExternalAccess.VSTypeScript.Api
{
internal abstract class VSTypeScriptBraceMatcher : IBraceMatcher
{
Task<BraceMatchingResult?> IBraceMatcher.FindBracesAsync(Document document, int position, CancellationToken cancellationToken)
=> FindBracesAsync(document, position, cancellationToken);
protected abstract Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, CancellationToken cancellationToken);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册