C# Class Microsoft.Silverlight.Testing.Harness.GlobalExceptionHandler

Provides a property that will attach and detach a known event handler delegate when the bit is flipped.
Datei anzeigen Open project: garyjohnson/wpnest Class Usage Examples

Public Methods

Method Description
ChangeExceptionBubbling ( EventArgs e, bool exceptionHandled ) : void

Mark the Handled property in the event args as True to stop any event bubbling.

GetExceptionObject ( EventArgs e ) : Exception

Return the Exception property from the EventArgs.

This method is compatible with the full desktop framework as well as Silverlight.

GlobalExceptionHandler ( EventHandler eventHandler ) : System.Windows

Creates a new exception handler "manager" with the provided EventHandler.

Private Methods

Method Description
AttachHandler ( ) : void

Attach the handler globally.

DetachHandler ( ) : void

Detach the handler globally.

OnGlobalException ( object sender, System.Windows.ApplicationUnhandledExceptionEventArgs e ) : void

Internal event that is hooked up to the global exception handler.

_eventHandler ( sender e ) : System.Windows

Method Details

ChangeExceptionBubbling() public static method

Mark the Handled property in the event args as True to stop any event bubbling.
public static ChangeExceptionBubbling ( EventArgs e, bool exceptionHandled ) : void
e System.EventArgs Event arguments.
exceptionHandled bool /// Value indicating whether the Exception should be marked as handled. ///
return void

GetExceptionObject() public static method

Return the Exception property from the EventArgs.
This method is compatible with the full desktop framework as well as Silverlight.
public static GetExceptionObject ( EventArgs e ) : Exception
e System.EventArgs Event arguments.
return System.Exception

GlobalExceptionHandler() public method

Creates a new exception handler "manager" with the provided EventHandler.
public GlobalExceptionHandler ( EventHandler eventHandler ) : System.Windows
eventHandler EventHandler The event handler to manage.
return System.Windows