VCLanguageManager Interface
An object used to validate various code elements of a C++ source file.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Syntax
'إقرار
<GuidAttribute("F7F87245-2812-4048-B105-8D59BD6995F3")> _
Public Interface VCLanguageManager
'الاستخدام
Dim instance As VCLanguageManager
[GuidAttribute("F7F87245-2812-4048-B105-8D59BD6995F3")]
public interface VCLanguageManager
[GuidAttribute(L"F7F87245-2812-4048-B105-8D59BD6995F3")]
public interface class VCLanguageManager
[<GuidAttribute("F7F87245-2812-4048-B105-8D59BD6995F3")>]
type VCLanguageManager = interface end
public interface VCLanguageManager
Remarks
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.
Examples
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