C# Class CK.AppRecovery.ApplicationRecovery

Afficher le fichier Open project: Invenietis/ck-certified

Private Properties

Свойство Type Description
CheckForRecoveryCancel void
CurrentDomain_UnhandledException void
HandleApplicationCrashByOS int
RaiseApplicationCrashedEvent void

Méthodes publiques

Méthode Description
Initialize ( ) : bool

Registers the application for notification by windows of a failure if IsOSRecoveryAvailable is true.

The AppDomain.CurrentDomain.UnhandledException event is listened and react to such unhandled exceptions int two different ways: If IsOSRecoveryAvailable is true, the exception is memorized and will be dumped out to the crash log during application recovery. If it is false, this immediately triggers the ApplicationCrashed event.

Windows forms is configured to let unhandled execptions be thrown thanks to a call to Application.SetUnhandledExceptionMode with UnhandledExceptionMode.ThrowException.

This method also initializes the CurrentCrashCount from the Environment.GetCommandLineArgs (if any).

Private Methods

Méthode Description
CheckForRecoveryCancel ( object o ) : void

Checks to see if the user has cancelled the recovery.

CurrentDomain_UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void
HandleApplicationCrashByOS ( IntPtr pvParameter ) : int

This is the callback function that is executed in the event of the application crashing.

RaiseApplicationCrashedEvent ( ) : void

Method Details

Initialize() public static méthode

Registers the application for notification by windows of a failure if IsOSRecoveryAvailable is true.

The AppDomain.CurrentDomain.UnhandledException event is listened and react to such unhandled exceptions int two different ways: If IsOSRecoveryAvailable is true, the exception is memorized and will be dumped out to the crash log during application recovery. If it is false, this immediately triggers the ApplicationCrashed event.

Windows forms is configured to let unhandled execptions be thrown thanks to a call to Application.SetUnhandledExceptionMode with UnhandledExceptionMode.ThrowException.

This method also initializes the CurrentCrashCount from the Environment.GetCommandLineArgs (if any).

public static Initialize ( ) : bool
Résultat bool