LanguageService.BeginInvoke Method

Invokes a method on another thread.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)

Syntax

'宣言
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True,  _
    ExternalThreading := True)> _
Public Function BeginInvoke ( _
    method As Delegate, _
    args As Object() _
) As IAsyncResult
'使用
Dim instance As LanguageService
Dim method As Delegate
Dim args As Object()
Dim returnValue As IAsyncResult

returnValue = instance.BeginInvoke(method, _
    args)
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, 
    ExternalThreading = true)]
public IAsyncResult BeginInvoke(
    Delegate method,
    Object[] args
)
[HostProtectionAttribute(SecurityAction::LinkDemand, Synchronization = true, 
    ExternalThreading = true)]
public:
virtual IAsyncResult^ BeginInvoke(
    Delegate^ method, 
    array<Object^>^ args
) sealed
public final function BeginInvoke(
    method : Delegate, 
    args : Object[]
) : IAsyncResult

Parameters

  • args
    Type: []

    [in] The possible arguments to the method being invoked.

Return Value

Type: System.IAsyncResult

If successful, returns an IAsyncResult object; otherwise, returns a null value if the invoke operation failed.

Implements

ISynchronizeInvoke.BeginInvoke(Delegate, [])

Remarks

注意

The HostProtectionAttribute attribute applied to this has the following Resources property value: Synchronization | ExternalThreading. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

This method is used to start a background parse operation.

Permissions

See Also

Reference

LanguageService Class

LanguageService Members

Microsoft.VisualStudio.Package Namespace