forked from dotnet/roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add VSTypeScriptAsynchronousTaggerProvider (dotnet#57310)
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...orFeatures/Core/ExternalAccess/VSTypeScript/Api/VSTypeScriptAsynchronousTaggerProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// 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)) | ||
{ | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/EditorFeatures/Core/ExternalAccess/VSTypeScript/Api/VSTypeScriptBraceMatcher.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// 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); | ||
} | ||
} |