Compartilhar via


LanguageService.BeginInvoke Method

Invokes a method on another thread.

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
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True,  _
    ExternalThreading := True)> _
Public Function BeginInvoke ( _
    method As Delegate, _
    args As Object() _
) As IAsyncResult
[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
[<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, 
    ExternalThreading = true)>]
abstract BeginInvoke : 
        method:Delegate * 
        args:Object[] -> IAsyncResult 
[<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, 
    ExternalThreading = true)>]
override BeginInvoke : 
        method:Delegate * 
        args:Object[] -> IAsyncResult
public final function BeginInvoke(
    method : Delegate, 
    args : Object[]
) : IAsyncResult

Parameters

  • method
    Type: Delegate

    [in] The method to invoke.

  • args
    Type: array<Object[]

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

Return Value

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

Implements

ISynchronizeInvoke.BeginInvoke(Delegate, Object)

Remarks

This method is used to start a background parse operation.

Note

The HostProtectionAttribute attribute applied to this type or member 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.

.NET Framework Security

See Also

Reference

LanguageService Class

Microsoft.VisualStudio.Package Namespace