public async Task <ClientVersionOutput> GetAsync(
            [FromQuery]
            string?fromClientVersion)
        {
            _telemetryWriter.PostTelemetry(
                $"clientVersion:  {fromClientVersion}",
                Request);

            var newestVersions = await _clientVersionCacheProxy.GetNewestClientVersionsAsync(
                fromClientVersion);

            return(new ClientVersionOutput
            {
                Versions = newestVersions
            });
        }
Пример #2
0
        public async Task <ActivationOutput> PostAsync(ActivationInput input)
        {
            var newestVersions = await _clientVersionCacheProxy.GetNewestClientVersionsAsync(
                input.ClientInfo.ClientVersion);

            var sessionId = Guid.NewGuid().ToString();

            _telemetryWriter.PostTelemetry(
                new
            {
                SessionId  = sessionId,
                ClientInfo = input.ClientInfo
            },
                Request);

            return(new ActivationOutput
            {
                SessionId = sessionId,
                NewestVersions = newestVersions
            });
        }
Пример #3
0
        public ErrorOutput Post(ErrorInput input)
        {
            try
            {   //  Fixing error from version previous to 0.3.0
                Guid operationId;

                if (!Guid.TryParse(input.SessionId, out operationId))
                {
                    operationId = Guid.Empty;
                }
                _telemetryWriter.PostTelemetry(input, Request);

                return(new ErrorOutput()
                {
                    OperationID = operationId
                });
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message);

                return(new ErrorOutput());
            }
        }
Пример #4
0
        public EndSessionOutput Post(EndSessionInput input)
        {
            _telemetryWriter.PostTelemetry(input, Request);

            return(new EndSessionOutput());
        }
Пример #5
0
        public LogParameterTelemetryOutput Post(LogParameterTelemetryInput input)
        {
            _telemetryWriter.PostTelemetry(input, Request);

            return(new LogParameterTelemetryOutput());
        }