//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ namespace System.ComponentModel { using System; using System.Security.Permissions; /// /// Provides a way to synchronously or asynchronously execute a delegate. /// public interface ISynchronizeInvoke { /// /// Gets a value indicating whether the caller must call when calling an object that implements /// this interface. /// bool InvokeRequired{get;} /// /// /// Executes the given delegate on the main thread that this object executes on. /// [HostProtection(Synchronization=true, ExternalThreading=true)] IAsyncResult BeginInvoke(Delegate method, object[] args); /// /// Waits until the process you started by /// calling completes, and then returns /// the value generated by the process. /// object EndInvoke(IAsyncResult result); /// /// /// Executes the given delegate on the main thread that this object /// executes on. /// object Invoke(Delegate method, object[] args); } }