示例#1
0
        private async void OnTelemetryTimerElapsed(object sender, TelemetryTimerEventArgs e)
        {
            telemetryRepository.Data.LastUploadDate = e.SignalTime;
            telemetryRepository.Save();

            await telemetryClient.SendPayload(GetPayload(telemetryRepository.Data));
        }
示例#2
0
        private async void OnTelemetryTimerElapsed(object sender, TelemetryTimerEventArgs e)
        {
            try
            {
                telemetryRepository.Data.LastUploadDate = e.SignalTime;
                telemetryRepository.Save();

                await telemetryClient.SendPayload(GetPayload(telemetryRepository.Data));
            }
            catch (Exception ex) when(!ErrorHandler.IsCriticalException(ex))
            {
                // Suppress non-critical exceptions
                logger.WriteLine(Resources.Strings.Telemetry_ERROR_SendingTelemetry, ex.Message);
            }
        }
示例#3
0
        private async void OnTelemetryTimerElapsed(object sender, TelemetryTimerEventArgs e)
        {
            try
            {
                telemetryRepository.Data.LastUploadDate = e.SignalTime;

                await telemetryClient.SendPayloadAsync(GetPayload(telemetryRepository.Data));

                // Clear out the list of saved languages
                telemetryRepository.Data.Analyses = new System.Collections.Generic.List <Analysis>();
                telemetryRepository.Save();
            }
            catch (Exception ex) when(!Core.ErrorHandler.IsCriticalException(ex))
            {
                // Suppress non-critical exceptions
                logger.WriteLine(Resources.Strings.Telemetry_ERROR_SendingTelemetry, ex.Message);
            }
        }
        private async void OnTelemetryTimerElapsed(object sender, TelemetryTimerEventArgs e)
        {
            try
            {
                telemetryRepository.Data.LastUploadDate = e.SignalTime;

                await telemetryClient.SendPayloadAsync(GetPayload(telemetryRepository.Data));

                // Reset daily data
                telemetryRepository.Data.Analyses             = new System.Collections.Generic.List <Analysis>();
                telemetryRepository.Data.ShowHotspot          = new ShowHotspot();
                telemetryRepository.Data.TaintVulnerabilities = new TaintVulnerabilities();
                telemetryRepository.Save();
            }
            catch (Exception ex) when(!ErrorHandler.IsCriticalException(ex))
            {
                // Suppress non-critical exceptions
                logger.WriteLine(Resources.Strings.Telemetry_ERROR_SendingTelemetry, ex.Message);
            }
        }