Example #1
0
        private static void RunInReleaseMode()
        {
            IConfigurationSource configurationSource = ConfigurationSourceFactory.Create();

            LogWriterFactory logWriterFactory = new LogWriterFactory(configurationSource);

            Microsoft.Practices.EnterpriseLibrary.Logging.Logger.SetLogWriter(logWriterFactory.Create());

            ExceptionPolicyFactory exceptionFactory = new ExceptionPolicyFactory(configurationSource);
            ExceptionManager       manager          = exceptionFactory.CreateManager();

            ExceptionPolicy.SetExceptionManager(manager);

            TaskScheduler.UnobservedTaskException      += TaskScheduler_UnobservedTaskException;
            Current.DispatcherUnhandledException       += CurrentOnDispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
            try
            {
                CloudDriveShellBootstrapper bootstrapper = new CloudDriveShellBootstrapper();
                bootstrapper.Run();
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
        }
Example #2
0
        private static void RunInDebugMode()
        {
            Microsoft.Practices.EnterpriseLibrary.Logging.Logger.SetLogWriter(new LogWriter(new LoggingConfiguration()));
            CloudDriveShellBootstrapper bootstrapper = new CloudDriveShellBootstrapper();

            bootstrapper.Run();
        }