public void WhatDoesRequestAbortDo()
        {
            var abortAfterMs = 500;
            var client = new AbortingHttpClient();
            client.TriggerAbort(abortAfterMs);

            Thread.Sleep(abortAfterMs * 10);
        }
        static void Main(string[] args)
        {
            var abortAfterMs = 500;
            
            Console.WriteLine("Starting...");
			new Thread(() =>
			{
                var client = new AbortingHttpClient();
                client.TriggerAbort(abortAfterMs);
			}).Start();

            Console.WriteLine("Working...");
            Thread.Sleep(abortAfterMs * 10);

            Console.WriteLine("Finished successfully.");
        }
        private static void SimulateExceptionFromBackgroundThread()
        {
            var abortAfterMs = 500;
            var client = new AbortingHttpClient();

            try
            {
                client.TriggerAbortFromBackgroundProcessingThread(abortAfterMs);

                Thread.Sleep(abortAfterMs * 10);
                Console.WriteLine("If exception was caught, should never get here");
            }
            catch (Exception backgroundException)
            {
                Console.WriteLine("Trapped exception from background thread: {0}", backgroundException);
            }

            Console.WriteLine("Successfully trapped background exception");
            Console.WriteLine("\r\nPress enter....");
            Console.ReadLine();
        }