VCLanguageManager - интерфейс
An object used to validate various code elements of a C++ source file.
Пространство имен: Microsoft.VisualStudio.VCCodeModel
Сборка: Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)
Синтаксис
'Декларация
<GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCLanguageManager
'Применение
Dim instance As VCLanguageManager
[GuidAttribute("DF69B065-2447-11D7-8BF6-00B0D03DAA06")]
public interface VCLanguageManager
[GuidAttribute(L"DF69B065-2447-11D7-8BF6-00B0D03DAA06")]
public interface class VCLanguageManager
public interface VCLanguageManager
Заметки
The VCLanguageManager object allows validation of various code elements in a C++ source file, such as variable names, qualified names, C++ source file names, and so on.
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
Примеры
This example validates the name of a possible C++ source file. This sample assumes that a file, MyFile.cpp, exists in the current solution directory.
Sub ValidateFileName()
Dim vcCM as VCCodeModel
vcCM = DTE.Solution.Item(1).CodeModel
if(DTE.VCLanguageManager.ValidateFileName("MyFile.cpp")) Then
DTE.Solution.Item(1).ProjectItems.AddFromFile("MyFile.cpp")
End Sub