/// <summary>
        /// Unregisters platform specific exception handlers.
        /// </summary>
        /// <param name="client">The ExceptionlessClient.</param>
        public static void Shutdown(this ExceptionlessClient client)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            client.UnregisterAppDomainUnhandledExceptionHandler();
            client.UnregisterOnProcessExitHandler();
            client.UnregisterTaskSchedulerUnobservedTaskExceptionHandler();

            client.ProcessQueue();
            if (client.Configuration.SessionsEnabled)
            {
                client.SubmitSessionEnd();
            }
        }
 /// <summary>
 /// Unregisters platform specific exception handlers.
 /// </summary>
 /// <param name="client">The ExceptionlessClient.</param>
 /// <param name="appDomain">The AppDomain to unregister any exception handlers from.</param>
 public static void Shutdown(this ExceptionlessClient client, AppDomain appDomain = null)
 {
     client.UnregisterAppDomainUnhandledExceptionHandler(appDomain);
     client.UnregisterTaskSchedulerUnobservedTaskExceptionHandler();
 }