BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailureOptions Enumeration

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Provides a set of values that describes how the dispatcher responds to failures that are encountered while requesting processing.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

public enum HandleDispatcherRequestProcessingFailureOptions

Member nameDescription
Continue

Continue after the failure.

This is the default value. It defines the behavior of the Windows Presentation Foundation dispatcher prior to the .NET Framework 4.7.1. The dispatcher may become unresponsive when this option is selected.

Reset

Reset the dispatcher's state to try another request the next time one is needed.

While this option can sometimes "repair" unresponsiveness, it cannot honor the usual timing of processing, which can be crucial. Selecting this option can lead to unexpected behavior.

Throw

Throw an exception.

This option immediately brings the problem to the application developer's attention.

The Windows Presentation Foundation dispatcher reacts to failures that it encounters when requesting processing by setting a timer or posting messages to itself. These operations can fail if the underlying operating system resources are exhausted, which causes the dispatcher to become unresponsive. A BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailureOptions enumeration value can be assigned to the BaseCompatibilityPreferences.HandleDispatcherRequestProcessingFailure property to aid in diagnosing the cause of this unresponsiveness.

.NET Framework
Available since 4.7.1
Return to top
Show: