次の方法で共有


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

  • args
    Type: array<System.Object[]
    [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, array<Object[])

Remarks

注意

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.

This method is used to start a background parse operation.

.NET Framework Security

See Also

Reference

LanguageService Class

LanguageService Members

Microsoft.VisualStudio.Package Namespace