/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/VisualBasic/Portable/Syntax/BeginOfBlockSyntaxReference.vb
23 строки
958 B
Jonathon Marolf
Pass CancellationToken in compilers layer
31 мар 2021, 04:08
Не верифицирован
31 мар 2021, 04:08
92b6499
Код
Авторство
О чём код?
' 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. Imports System.Threading Imports Microsoft.CodeAnalysis.Syntax Namespace Microsoft.CodeAnalysis.VisualBasic ''' <summary> ''' This is a SyntaxReference implementation that lazily finds the beginning of the block (if any) of the original syntax reference ''' </summary> Friend Class BeginOfBlockSyntaxReference Inherits TranslationSyntaxReference Public Sub New(reference As SyntaxReference) MyBase.New(reference) End Sub Protected Overrides Function Translate(reference As SyntaxReference, cancellationToken As CancellationToken) As SyntaxNode Return SyntaxFacts.BeginOfBlockStatementIfAny(reference.GetSyntax(cancellationToken)) End Function End Class End Namespace