Compartir a través de


Source.OnIdle Method

Called when no other events are being handled.

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

Syntax

'Declaration
Public Overridable Sub OnIdle ( _
    periodic As Boolean _
)
public virtual void OnIdle(
    bool periodic
)
public:
virtual void OnIdle(
    bool periodic
)
abstract OnIdle : 
        periodic:bool -> unit  
override OnIdle : 
        periodic:bool -> unit
public function OnIdle(
    periodic : boolean
)

Parameters

  • periodic
    Type: Boolean

    true if this call is a result of a periodic timer; otherwise, this is a truly idle call.

Remarks

Performs various background tasks while the system is idle.

The base method starts a background parse if any of the source has been marked as dirty. The background parse is not started if a completion list or method tip tool tip is displayed or the minimum time delay (as specified by the CodeSenseDelay property) has not passed. This method is typically called from OnIdle.

See Implementing a Language Service (Managed Package Framework) for information about how a language service can implement an idle timer that calls this method.

.NET Framework Security

See Also

Reference

Source Class

Microsoft.VisualStudio.Package Namespace

Other Resources

Implementing a Language Service (Managed Package Framework)