共用方式為


Source.OnIdle(Boolean) Method

Definition

Called when no other events are being handled.

public:
 virtual void OnIdle(bool periodic);
public:
 virtual void OnIdle(bool periodic);
 virtual void OnIdle(bool periodic);
public virtual void OnIdle (bool periodic);
abstract member OnIdle : bool -> unit
override this.OnIdle : bool -> unit
Public Overridable Sub OnIdle (periodic As Boolean)

Parameters

periodic
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 Legacy Language Service for information about how a language service can implement an idle timer that calls this method.

Applies to