VCFileCodeModel.Synchronize Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Synchronizes all code model objects in the solution with edits made to source files.
public:
void Synchronize();
public:
void Synchronize();
void Synchronize();
[System.Runtime.InteropServices.DispId(200)]
public void Synchronize ();
[<System.Runtime.InteropServices.DispId(200)>]
abstract member Synchronize : unit -> unit
Public Sub Synchronize ()
Implements
- Attributes
Examples
This example adds a template parameter list to the class.
Sub AddTemplateClass()
Dim vcCM As VCCodeModel
Dim vcClass As VCCodeClass
vcCM = DTE.Solution.Item(1).CodeModel
vcClass = vcCM.AddClass("MyTemplateClass", "MyTemplateClass.h")
vcClass.StartPoint().CreateEditPoint().Insert("template <class T> ")
vcCM.Synchronize()
End Sub
Remarks
On rare occasions, it may be necessary to synchronize the code model object with the file buffers. This is sometimes necessary when you directly modify the file buffer.