Example #1
0
 public void Load()
 {
     try
     {
         _infoService.Query();
         Task.WaitAll(
             _telemetry.SendTelemetry(new UserEngagementModel
         {
             DeviceId = _infoService.DeviceId,
             AppName  = "kfmaintenance",
             Event    = "app_start"
         }),
             _telemetry.SendIdentification(new DeviceIdentificationModel
         {
             DeviceId     = _infoService.DeviceId,
             CPU          = _infoService.CPU,
             RAM          = _infoService.RAM,
             OS           = _infoService.OS,
             Architecture = _infoService.Architecture
         })
             );
     }
     catch (Exception)
     {
         // ignore
     }
 }
Example #2
0
        public void Load()
        {
            try
            {
                _infoService.Query();
                LogDevice();

                _logger.Debug("Sending telemetry");
                Task.WaitAll(
                    _telemetry.SendTelemetry(new UserEngagementModel
                {
                    DeviceId = _infoService.DeviceId,
                    AppName  = "kflearning",
                    Event    = "app_start"
                }),
                    _telemetry.SendIdentification(new DeviceIdentificationModel
                {
                    DeviceId     = _infoService.DeviceId,
                    CPU          = _infoService.CPU,
                    RAM          = _infoService.RAM,
                    OS           = _infoService.OS,
                    Architecture = _infoService.Architecture
                })
                    );
            }
            catch (Exception ex)
            {
                _logger.Error("Cannot post telemetry data", ex);
            }
        }