SnapInBase.BeginInvoke Method (Delegate, Object[])
Executes the specified delegate with its specified arguments on the main thread that the snap-in was created on.
Namespace: Microsoft.ManagementConsole
Assembly: Microsoft.ManagementConsole (in Microsoft.ManagementConsole.dll)
Syntax
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true,
ExternalThreading = true)]
public IAsyncResult BeginInvoke(
Delegate method,
object[] args
)
public:
[HostProtectionAttribute(SecurityAction::LinkDemand, Synchronization = true,
ExternalThreading = true)]
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
<HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization := True,
ExternalThreading := True)>
Public Function BeginInvoke (
method As Delegate,
args As Object()
) As IAsyncResult
Parameters
method
Type: System.DelegateA Delegate to a method that uses parameters of the number and type that are specified in the args parameter.
args
Type: System.Object[]An array of objects to pass as arguments to the given method. This array can be null if no arguments are needed.
Return Value
Type: System.IAsyncResult
Represents the asynchronous operation that was started by calling this method.
Implements
ISynchronizeInvoke.BeginInvoke(Delegate, Object[])
Remarks
This method is used when a snap-in component or other code that is related to a snap-in needs to be called on the same thread that the snap-in was created on. The delegate is called asynchronously. This method then returns immediately. It can be called from any thread, including the thread that the snap-in was created on.
See Also
BeginInvoke Overload
SnapInBase Class
Microsoft.ManagementConsole Namespace
Return to top