Esempio n. 1
0
        /// <summary>
        /// Initializes the usage reporter library
        /// </summary>
        public static void Initialize()
        {
            if (_eventChannel == null || _eventChannel.IsRetiredAsync.Result)
            {
                if (IsDisabled)
                {
                    return;
                }

                var rsu = ReportSetUploader.Run();
                var ep  = EventProcessor.Run(rsu.Item2);
                _eventChannel = ep.Item2;

                ShutdownTask = Task.WhenAll(ep.Item1, rsu.Item1);

                // TODO: Disable on debug builds
                AppDomain.CurrentDomain.UnhandledException += HandleUncaughtException;
                //AppDomain.CurrentDomain.UnhandledException += HandleUncaughtException;
                //AppDomain.CurrentDomain.ProcessExit

                Report("Started");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes the usage reporter library
        /// </summary>
        public static void Initialize()
        {
            if (_eventChannel == null || _eventChannel.IsRetired)
            {
                if (IsDisabled)
                {
                    return;
                }

                var rsu = new ReportSetUploader();
                var ep  = new EventProcessor(rsu.Channel);
                _eventChannel = ep.Channel;

                ShutdownTask = Task.WhenAll(ep.Terminated, rsu.Terminated);

                // TODO: Disable on debug builds
                AppDomain.CurrentDomain.UnhandledException += HandleUncaughtException;
                //AppDomain.CurrentDomain.UnhandledException += HandleUncaughtException;
                //AppDomain.CurrentDomain.ProcessExit

                Report("Started");
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes the usage reporter library
        /// </summary>
        public static void Initialize()
        {
            if (_eventChannel == null || _eventChannel.IsRetired)
            {
                if (IsDisabled)
                    return;

                var rsu = new ReportSetUploader();
                var ep = new EventProcessor(rsu.Channel);
                _eventChannel = ep.Channel;

                ShutdownTask = Task.WhenAll(ep.Terminated, rsu.Terminated);

                // TODO: Disable on debug builds
                AppDomain.CurrentDomain.UnhandledException += HandleUncaughtException;
                //AppDomain.CurrentDomain.UnhandledException += HandleUncaughtException;
                //AppDomain.CurrentDomain.ProcessExit

                Report("Started");
            }
        }