WindowsFormsSynchronizationContext WindowsFormsSynchronizationContext WindowsFormsSynchronizationContext WindowsFormsSynchronizationContext Class

定义

提供 Windows 窗体应用程序模型的同步上下文。Provides a synchronization context for the Windows Forms application model.

public ref class WindowsFormsSynchronizationContext sealed : System::Threading::SynchronizationContext, IDisposable
public sealed class WindowsFormsSynchronizationContext : System.Threading.SynchronizationContext, IDisposable
type WindowsFormsSynchronizationContext = class
    inherit SynchronizationContext
    interface IDisposable
Public NotInheritable Class WindowsFormsSynchronizationContext
Inherits SynchronizationContext
Implements IDisposable
继承
WindowsFormsSynchronizationContextWindowsFormsSynchronizationContextWindowsFormsSynchronizationContextWindowsFormsSynchronizationContext
实现

构造函数

WindowsFormsSynchronizationContext() WindowsFormsSynchronizationContext() WindowsFormsSynchronizationContext() WindowsFormsSynchronizationContext()

初始化 WindowsFormsSynchronizationContext 类的新实例。Initializes a new instance of the WindowsFormsSynchronizationContext class.

属性

AutoInstall AutoInstall AutoInstall AutoInstall

获取或设置一个值,该值指示创建控件时是否安装了 WindowsFormsSynchronizationContextGets or sets a value indicating whether the WindowsFormsSynchronizationContext is installed when a control is created.

方法

CreateCopy() CreateCopy() CreateCopy() CreateCopy()

复制同步上下文。Copies the synchronization context.

Dispose() Dispose() Dispose() Dispose()

释放由 WindowsFormsSynchronizationContext 使用的所有资源。Releases all resources used by the WindowsFormsSynchronizationContext.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
IsWaitNotificationRequired() IsWaitNotificationRequired() IsWaitNotificationRequired() IsWaitNotificationRequired()

确定是否需要等待通知。Determines if wait notification is required.

(Inherited from SynchronizationContext)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
OperationCompleted() OperationCompleted() OperationCompleted() OperationCompleted()

在派生类中重写时,响应操作已完成的通知。When overridden in a derived class, responds to the notification that an operation has completed.

(Inherited from SynchronizationContext)
OperationStarted() OperationStarted() OperationStarted() OperationStarted()

在派生类中重写时,响应操作已开始的通知。When overridden in a derived class, responds to the notification that an operation has started.

(Inherited from SynchronizationContext)
Post(SendOrPostCallback, Object) Post(SendOrPostCallback, Object) Post(SendOrPostCallback, Object) Post(SendOrPostCallback, Object)

为同步上下文调度异步消息。Dispatches an asynchronous message to a synchronization context.

Send(SendOrPostCallback, Object) Send(SendOrPostCallback, Object) Send(SendOrPostCallback, Object) Send(SendOrPostCallback, Object)

为同步上下文调度同步消息。Dispatches a synchronous message to a synchronization context

SetWaitNotificationRequired() SetWaitNotificationRequired() SetWaitNotificationRequired() SetWaitNotificationRequired()

设置指示需要等待通知的通知,并准备回调方法以使其在发生等待时可以更可靠地被调用。Sets notification that wait notification is required and prepares the callback method so it can be called more reliably when a wait occurs.

(Inherited from SynchronizationContext)
ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)
Uninstall() Uninstall() Uninstall() Uninstall()

卸载当前安装的 WindowsFormsSynchronizationContext 并使用以前安装的上下文替换它。Uninstalls the currently installed WindowsFormsSynchronizationContext and replaces it with the previously installed context.

Wait(IntPtr[], Boolean, Int32) Wait(IntPtr[], Boolean, Int32) Wait(IntPtr[], Boolean, Int32) Wait(IntPtr[], Boolean, Int32)

等待指定数组中的任一元素或所有元素接收信号。Waits for any or all the elements in the specified array to receive a signal.

(Inherited from SynchronizationContext)

适用于

另请参阅