PluginData.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

protected void RunOnPrimaryThread (
    AnonymousDelegate handler
)
'Declaration
Protected 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

PluginData Class
PluginData Members
Microsoft.RemoteToolSdk.PluginComponents Namespace