/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/VisualStudio/TestUtilities2/ProjectSystemShim/VisualBasicHelpers/MockCompilerHost.vb
53 строки
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 System.IO Imports System.Runtime.InteropServices Imports Microsoft.VisualStudio.LanguageServices.VisualBasic.ProjectSystemShim.Interop Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.ProjectSystemShim.VisualBasicHelpers Friend Class MockCompilerHost Implements IVbCompilerHost Private ReadOnly _sdkPath As String Public Sub New(sdkPath As String) _sdkPath = sdkPath End Sub Public Shared ReadOnly Property FullFrameworkCompilerHost As MockCompilerHost Get Return New MockCompilerHost("Z:\FullFramework") End Get End Property Public Shared ReadOnly Property NoSdkCompilerHost As MockCompilerHost Get Return New MockCompilerHost("") End Get End Property Public Function GetWellKnownDllName(fileName As String) As String Return Path.Combine(_sdkPath, fileName) End Function Public Sub OutputString(<MarshalAs(UnmanagedType.LPWStr)> [string] As String) Implements IVbCompilerHost.OutputString Throw New NotImplementedException() End Sub Public Function GetSdkPath(ByRef sdkPath As String) As Integer Implements IVbCompilerHost.GetSdkPath sdkPath = _sdkPath If String.IsNullOrEmpty(sdkPath) Then Return VSConstants.E_NOTIMPL Else Return VSConstants.S_OK End If End Function Public Function GetTargetLibraryType() As VBTargetLibraryType Implements IVbCompilerHost.GetTargetLibraryType Throw New NotImplementedException() End Function End Class End Namespace