Share via


Source.BeginParse Method

Begins a full parsing operation either in the foreground or the background.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Declaration
Public Overridable Sub BeginParse
public virtual void BeginParse()
public:
virtual void BeginParse()
abstract BeginParse : unit -> unit 
override BeginParse : unit -> unit 
public function BeginParse()

Remarks

This method is typically called from the OnIdle method, and calls the ParseSource method. The base method starts the parse with the ParseReason value of Check.

Note that the OnIdle method will not begin parsing after the source file is first loaded unless the LastParseTime property has been set to 0. To do so, override CreateSource and make sure that the resulting Source object has its LastParseTime property set to 0.

A complete parse operation is performed over the entire file. It collects information about the file including methods, members, variables, and braces. Because this parsing can take quite a bit of time, the parsing is typically done on a background thread.

.NET Framework Security

See Also

Reference

Source Class

BeginParse Overload

Microsoft.VisualStudio.Package Namespace