C# Класс Bugsense.WPF.BugSense

This class is used to hook up the AppDomain.UnhandledException handler to a Bugsense error sender that immediately sends a crash report to the bugsense servers.
Показать файл Открыть проект

Открытые методы

Метод Описание
AttachHandler ( ) : void

Attaches the eventhandler from AppDomain.CurrentDomain.UnhandledException. Done Automatically by the BugSense.Init method.

DetachHandler ( ) : void

Detaches the eventhandler from AppDomain.CurrentDomain.UnhandledException. Useful if you want to send exceptions your self.

Init ( string apiKey, string version = null, string apiUrl = BugsenseApiUrl ) : void

Hooks up bugsense error sender to the unhandled exception handler. This will cause crashes to be sent to bugsense when they occur. This overload is used when customizing the crash report destination. For normal use - Use the other Init method.

SendException ( Exception exception ) : void

Sends an exception to bugsense as if a crash occured. Useful for handling the UnhandledException manually.

Приватные методы

Метод Описание
UnhandledException ( object sender, UnhandledExceptionEventArgs e ) : void

Описание методов

AttachHandler() публичный статический Метод

Attaches the eventhandler from AppDomain.CurrentDomain.UnhandledException. Done Automatically by the BugSense.Init method.
public static AttachHandler ( ) : void
Результат void

DetachHandler() публичный статический Метод

Detaches the eventhandler from AppDomain.CurrentDomain.UnhandledException. Useful if you want to send exceptions your self.
public static DetachHandler ( ) : void
Результат void

Init() публичный статический Метод

Hooks up bugsense error sender to the unhandled exception handler. This will cause crashes to be sent to bugsense when they occur. This overload is used when customizing the crash report destination. For normal use - Use the other Init method.
public static Init ( string apiKey, string version = null, string apiUrl = BugsenseApiUrl ) : void
apiKey string This is the API key for bugsense. You need to get *your own* API key from http://bugsense.com/
version string The version of this application to send in case of a crash. The default value is zero, in this case the version of the entry assebmly will be used. See Assembly.GetEntryAssembly()
apiUrl string The Url to send the crashes to, only use this if you need to customize the destination
Результат void

SendException() публичный статический Метод

Sends an exception to bugsense as if a crash occured. Useful for handling the UnhandledException manually.
Thrown if the Bugsense.Init method is not called before this method
public static SendException ( Exception exception ) : void
exception System.Exception The exception to send to BugSense
Результат void