/// <summary>
 /// Provide a custom resource manager to override standard sdk i18n strings
 /// </summary>
 /// <param name="this"></param>
 /// <param name="manager">resource manager to use</param>
 /// <returns></returns>
 public static IHockeyClientConfigurable UseCustomResourceManager(this IHockeyClientConfigurable @this, ResourceManager manager)
 {
     //TODO make LocalizedStrings.CustomResourceManager internal in next major version
     #pragma warning disable 0618
     LocalizedStrings.CustomResourceManager = manager;
     #pragma warning restore 0618
     return @this;
 }
 /// <summary>
 /// The action you set will be called after HockeyApp has written the crash-log and allows you to run custom logic like marking the exception as handled
 /// </summary>
 /// <param name="customAction">The custom action.</param>
 /// <returns></returns>
 public static IHockeyClientConfigurable RegisterCustomUnhandledExceptionLogic(this IHockeyClientConfigurable @this, Action<ApplicationUnhandledExceptionEventArgs> customAction)
 {
     UnhandledExceptionTelemetryModule.CustomUnhandledExceptionAction = customAction;
     return @this;
 }
 /// <summary>
 /// The action you set will be called after HockeyApp has written the crash-log and allows you to run custom logic like exiting the application
 /// </summary>
 /// <param name="customFunc">The custom action.</param>
 /// <returns></returns>
 public static IHockeyClientConfigurable RegisterCustomUnobserveredTaskExceptionLogic(this IHockeyClientConfigurable @this, Action<Exception> customAction)
 {
     customUnobservedTaskExceptionAction = customAction;
     return @this;
 }
 /// <summary>
 /// The func you set will be called after HockeyApp has written the crash-log and allows you to continue
 /// If the func returns false the app will not terminate but keep running
 /// </summary>
 /// <param name="this">The this.</param>
 /// <param name="customFunc">The custom function.</param>
 /// <returns></returns>
 public static IHockeyClientConfigurable RegisterCustomUnobserveredTaskExceptionLogic(this IHockeyClientConfigurable @this, Func <UnobservedTaskExceptionEventArgs, bool> customFunc)
 {
     customUnobservedTaskExceptionFunc = customFunc;
     return(@this);
 }
Beispiel #5
0
 internal static IHockeyClientInternal AsInternal(this IHockeyClientConfigurable @this)
 {
     return((IHockeyClientInternal)@this);
 }
 /// <summary>
 /// Removes the handler for UnobservedTaskExceptions
 /// </summary>
 /// <param name="this"></param>
 /// <returns></returns>
 public static IHockeyClientConfigurable UnregisterDefaultUnobservedTaskExceptionHandler(this IHockeyClientConfigurable @this)
 {
     TaskScheduler.UnobservedTaskException -= TaskScheduler_UnobservedTaskException;
     return(@this);
 }
 /// <summary>
 /// This will run after HockeyApp has written the crash-log to disk.
 /// </summary>
 /// <param name="this"></param>
 /// <param name="customAction"></param>
 /// <returns></returns>
 public static IHockeyClientConfigurable RegisterCustomUnhandledExceptionLogic(this IHockeyClientConfigurable @this, Action <UnhandledExceptionEventArgs> customAction)
 {
     customUnhandledExceptionAction = customAction;
     return(@this);
 }
 /// <summary>
 /// Provide a custom resource manager to override standard sdk i18n strings
 /// </summary>
 /// <param name="this"></param>
 /// <param name="manager">resource manager to use</param>
 /// <returns></returns>
 public static IHockeyClientConfigurable UseCustomResourceManager(this IHockeyClientConfigurable @this, ResourceManager manager)
 {
     LocalizedStrings.CustomResourceManager = manager;
     return(@this);
 }
Beispiel #9
0
 /// <summary>
 /// The func you set will be called after HockeyApp has written the crash-log and allows you to continue
 /// If the func returns false the app will not terminate but keep running
 /// </summary>
 /// <param name="this"></param>
 /// <param name="customFunc"></param>
 /// <returns></returns>
 public static IHockeyClientConfigurable RegisterCustomUnhandledExceptionLogic(this IHockeyClientConfigurable @this, Func <UnhandledExceptionEventArgs, bool> customFunc)
 {
     UnhandledExceptionTelemetryModule.CustomUnhandledExceptionFunc = customFunc;
     return(@this);
 }
 /// <summary>
 /// Set the user Id and email/contact information of the current user if known. This is sent to HockeyApp with crashes.
 /// </summary>
 /// <param name="this"></param>
 /// <param name="user"></param>
 /// <param name="email"></param>
 /// <returns></returns>
 public static IHockeyClientConfigurable SetContactInfo(this IHockeyClientConfigurable @this, string user, string email)
 {
     @this.AsInternal().UserID             = user;
     @this.AsInternal().ContactInformation = email;
     return(@this);
 }
 /// <summary>
 /// The provided func is called in case of an exception and the returned string is added as additional description of the exception.
 /// </summary>
 /// <param name="this"></param>
 /// <param name="descriptionLoader"></param>
 /// <returns></returns>
 public static IHockeyClientConfigurable SetExceptionDescriptionLoader(this IHockeyClientConfigurable @this, Func <Exception, string> descriptionLoader)
 {
     @this.AsInternal().DescriptionLoader = descriptionLoader;
     return(@this);
 }
 /// <summary>
 /// Use this if you're using an on-premise version of HockeyApp. Default is: https://rink.hockeyapp.net
 /// </summary>
 /// <param name="this"></param>
 /// <param name="hockeyApiDomain"></param>
 /// <returns></returns>
 public static IHockeyClientConfigurable SetApiDomain(this IHockeyClientConfigurable @this, string hockeyApiDomain)
 {
     @this.AsInternal().ApiDomain = hockeyApiDomain;
     return(@this);
 }