public static void Register(this ExceptionlessClient client, bool showDialog = true)
        {
            client.Startup();
            client.RegisterApplicationThreadExceptionHandler();

            if (!showDialog)
            {
                return;
            }

            client.SubmittingEvent -= OnSubmittingEvent;
            client.SubmittingEvent += OnSubmittingEvent;
        }
예제 #2
0
        /// <summary>
        /// Reads configuration settings, configures various plugins and wires up to platform specific exception handlers.
        /// </summary>
        /// <param name="client">The ExceptionlessClient.</param>
        /// <param name="showDialog">Controls whether a dialog is shown when an unhandled exception occurs.</param>
        public static void Register(this ExceptionlessClient client, bool showDialog = true)
        {
            client.Startup();
            client.RegisterApplicationThreadExceptionHandler();

            // make sure that queued events are sent when the app exits
            client.RegisterOnProcessExitHandler();

            if (!showDialog)
            {
                return;
            }

            client.SubmittingEvent -= OnSubmittingEvent;
            client.SubmittingEvent += OnSubmittingEvent;
        }
        /// <summary>
        /// Reads configuration settings, configures various plugins and wires up to platform specific exception handlers.
        /// </summary>
        /// <param name="client">The ExceptionlessClient.</param>
        /// <param name="showDialog">Controls whether a dialog is shown when an unhandled exception occurs.</param>
        public static void Register(this ExceptionlessClient client, bool showDialog = true)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            client.Configuration.AddPlugin <SetEnvironmentUserPlugin>();
            client.Startup();

            client.RegisterApplicationThreadExceptionHandler();

            if (!showDialog)
            {
                return;
            }

            client.SubmittingEvent -= OnSubmittingEvent;
            client.SubmittingEvent += OnSubmittingEvent;
        }
예제 #4
0
        /// <summary>
        /// Reads configuration settings, configures various plugins and wires up to platform specific exception handlers.
        /// </summary>
        /// <param name="client">The ExceptionlessClient.</param>
        /// <param name="showDialog">Controls whether a dialog is shown when an unhandled exception occurs.</param>
        public static void Register(this ExceptionlessClient client, bool showDialog = true)
        {
            client.Configuration.AddPlugin <SetEnvironmentUserPlugin>();
            client.Startup();

            if (client.Configuration.SessionsEnabled)
            {
                client.SubmitSessionStart();
            }

            client.RegisterApplicationThreadExceptionHandler();

            // make sure that queued events are sent when the app exits
            client.RegisterOnProcessExitHandler();

            if (!showDialog)
            {
                return;
            }

            client.SubmittingEvent -= OnSubmittingEvent;
            client.SubmittingEvent += OnSubmittingEvent;
        }