Ejemplo n.º 1
0
        private AventusTelemetry GetTelemetryFromRest(IChannel channel)
        {
            AventusChannel channelInfo = BuildAventusChannel(channel, AccountConfig.AccountName);

            if (channelInfo != null)
            {
                string telemResult = GetTelemetryInfo(channelInfo.BaseUrl);
                if (!string.IsNullOrEmpty(telemResult))
                {
                    AventusTelemetry retVal = JsonConvert.DeserializeObject <AventusTelemetry>(telemResult);
                    retVal.ChannelName = channel.Name;
                    return(retVal);
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
        public AventusTelemetry GetTelemetryInfo(IChannel channel)
        {
            AventusTelemetry telemetry = null;

            if (AccountConfig.TelemetryStorage != null)
            {
                telemetry = GetTelemetryFromStorage(channel);
            }

            // temporary workaround for reset bug. fallback to REST.
            if (telemetry == null && Certificate != null)
            {
                telemetry = GetTelemetryFromRest(channel);
            }
            return(telemetry);
        }