/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/VisualStudio/Core/Test/ClassView/MockNavigationTool.vb
55 строк
2 KB
Jonathon Marolf
update headers
23 янв 2020, 04:01
Не верифицирован
23 янв 2020, 04:01
91571a3
Код
Авторство
О чём код?
' 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 Microsoft.VisualStudio.LanguageServices.UnitTests.Utilities.VsNavInfo Imports Microsoft.VisualStudio.Shell.Interop Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ClassView Friend Class MockNavigationTool Implements IVsNavigationTool Private ReadOnly _canonicalNodes As NodeVerifier() Private ReadOnly _presentationNodes As NodeVerifier() Private _navInfo As IVsNavInfo Public Sub New(canonicalNodes As NodeVerifier(), presentationNodes As NodeVerifier()) _canonicalNodes = canonicalNodes _presentationNodes = presentationNodes End Sub Public Function GetSelectedSymbols(ByRef ppIVsSelectedSymbols As IVsSelectedSymbols) As Integer Implements IVsNavigationTool.GetSelectedSymbols Throw New NotImplementedException() End Function Public Function NavigateToNavInfo(pNavInfo As IVsNavInfo) As Integer Implements IVsNavigationTool.NavigateToNavInfo Assert.Null(_navInfo) _navInfo = pNavInfo Return VSConstants.S_OK End Function Public Function NavigateToSymbol(ByRef guidLib As Guid, rgSymbolNodes() As SYMBOL_DESCRIPTION_NODE, ulcNodes As UInteger) As Integer Implements IVsNavigationTool.NavigateToSymbol Throw New NotImplementedException() End Function Public Sub VerifyNavInfo() Assert.NotNull(_navInfo) If _canonicalNodes IsNot Nothing Then Dim enumerator As IVsEnumNavInfoNodes = Nothing IsOK(_navInfo.EnumCanonicalNodes(enumerator)) VerifyNodes(enumerator, _canonicalNodes) End If If _presentationNodes IsNot Nothing Then Dim enumerator As IVsEnumNavInfoNodes = Nothing IsOK(_navInfo.EnumPresentationNodes(CUInt(_LIB_LISTFLAGS.LLF_NONE), enumerator)) VerifyNodes(enumerator, _presentationNodes) End If End Sub End Class End Namespace