PluginComponent.RunOnPrimaryThread Method (Compact 7)

3/12/2014

Invokes the code defined by the delegate on the primary UI thread. If the current thread already is the Primary UI Thread, then the code will be run without calling Invoke.

Namespace: Microsoft.RemoteToolSdk.PluginComponents
Assembly: Microsoft.RemoteToolSdk (in microsoft.remotetoolsdk.dll)

Syntax

public void RunOnPrimaryThread (
    AnonymousDelegate handler
)
'Declaration
Public Sub RunOnPrimaryThread ( _
    handler As AnonymousDelegate _
)

Parameters

  • handler
    An anonymous method. See the code sample.

Example

The following example shows how to call this method.

...
RunOnPrimaryThread( delegate()
    {
        (your code here)
    }
);

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

PluginComponent Class
PluginComponent Members
Microsoft.RemoteToolSdk.PluginComponents Namespace