Partager via


LanguageService.InvokeRequired Property

Determines if a method must be invoked across a thread boundary.

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)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)

Syntax

'Declaration
Public ReadOnly Property InvokeRequired As Boolean
public bool InvokeRequired { get; }
public:
virtual property bool InvokeRequired {
    bool get () sealed;
}
abstract InvokeRequired : bool with get 
override InvokeRequired : bool with get
final function get InvokeRequired () : boolean

Property Value

Type: Boolean
Returns true if a method must be invoked across thread boundaries; otherwise, returns false.

Implements

ISynchronizeInvoke.InvokeRequired

Remarks

This property is typically not accessed unless it is by your own code.

The base property relies on a Control object created when the language service was instantiated. If that Control does not exist, an InvalidOperationException exception is thrown.

.NET Framework Security

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace