DispatcherProcessingDisabled DispatcherProcessingDisabled DispatcherProcessingDisabled DispatcherProcessingDisabled Struct

定義

無効な状態のディスパッチャーを表し、ディスパッチャーの処理を再度有効にする手段を提供します。Represents the Dispatcher when it is in a disable state and provides a means to re-enable dispatcher processing.

public value class DispatcherProcessingDisabled : IDisposable
public struct DispatcherProcessingDisabled : IDisposable
type DispatcherProcessingDisabled = struct
    interface IDisposable
Public Structure DispatcherProcessingDisabled
Implements IDisposable
継承
DispatcherProcessingDisabledDispatcherProcessingDisabledDispatcherProcessingDisabledDispatcherProcessingDisabled
実装

次の例では、ディスパッチャーの処理を無効にして、ディスパッチャーの処理を再度有効にする方法を示します。The following example shows how to disable dispatcher processing and re-enable dispatcher processing. DisableProcessing 呼び出される、を使用してステートメント。DisableProcessing is called in a using statement. DisableProcessing 返します、DispatcherProcessingDisabledするときに破棄するオブジェクトとして使用する構造体、を使用してブロックが完了するとします。DisableProcessing returns a DispatcherProcessingDisabled structure which is used as the object to be disposed when the using block finishes. 呼び出すDispose上、DispatcherProcessingDisabled構造ディスパッチャーの処理を再度有効にします。Calling Dispose on the DispatcherProcessingDisabled structure re-enables dispatcher processing.

// The Dispose() method is called at the end of the using statement.
// Calling Dispose on the DispatcherProcessingDisabled structure, 
// which is returned from the call to DisableProcessing, will
// re-enalbe Dispatcher processing.
using (Dispatcher.DisableProcessing())
{
    // Do work while the dispatcher processing is disabled.
    Thread.Sleep(2000);
}
' The Dispose() method is called at the end of the using statement.
' Calling Dispose on the DispatcherProcessingDisabled structure, 
' which is returned from the call to DisableProcessing, will
' re-enable Dispatcher processing.
Using Dispatcher.DisableProcessing()
	' Do work while the dispatcher processing is disabled.
	Thread.Sleep(2000)
End Using

注釈

DisableProcessing 返します、DispatcherProcessingDisabledオブジェクトが呼び出されるとします。DisableProcessing returns a DispatcherProcessingDisabled object when it is called.

ディスパッチャーの処理を無効にするには、関連しない再入の可能性を排除するためのものでは、高度なメソッドです。Disabling dispatcher processing is an advanced method that is intended to eliminate the chance of unrelated reentrancy.

処理の無効化の効果は次のとおりです。The effects of disabling processing are as follows:

  • CLR のロックでは、メッセージを内部的にポンプされます。CLR locks will not pump messages internally.

  • DispatcherFrame オブジェクトは、プッシュは許可されません。DispatcherFrame objects are not allowed to be pushed.

  • メッセージの処理が許可されていません。Message processing is not permitted.

呼び出すDispose上、DispatcherProcessingDisabledオブジェクトはディスパッチャーの処理を再度有効にします。Calling Dispose on the DispatcherProcessingDisabled object will re-enable dispatcher processing.

メソッド

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

ディスパッチャーの処理を再度有効にします。Re-enables dispatcher processing.

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

指定した DispatcherProcessingDisabled オブジェクトがこの DispatcherProcessingDisabled オブジェクトと等しいかどうかを判断します。Determines whether the specified DispatcherProcessingDisabled object is equal to this DispatcherProcessingDisabled object.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

このインスタンスのハッシュ コードを取得します。Gets a hash code for this instance.

演算子

Equality(DispatcherProcessingDisabled, DispatcherProcessingDisabled) Equality(DispatcherProcessingDisabled, DispatcherProcessingDisabled) Equality(DispatcherProcessingDisabled, DispatcherProcessingDisabled) Equality(DispatcherProcessingDisabled, DispatcherProcessingDisabled)

2 つの DispatcherProcessingDisabled オブジェクトが等しいかどうかを判断します。Determines whether two DispatcherProcessingDisabled objects are equal.

Inequality(DispatcherProcessingDisabled, DispatcherProcessingDisabled) Inequality(DispatcherProcessingDisabled, DispatcherProcessingDisabled) Inequality(DispatcherProcessingDisabled, DispatcherProcessingDisabled) Inequality(DispatcherProcessingDisabled, DispatcherProcessingDisabled)

2 つの DispatcherProcessingDisabled オブジェクトが等しくないかどうかを判断します。Determines whether two DispatcherProcessingDisabled objects are not equal.

適用対象

こちらもご覧ください