public GetMetricResponseDto GetMetric(GetMetricRequestDto request)
        {
            var coreRequest = GetCoreRequest <Zidium.Core.Api.GetMetricRequest>(request);

            coreRequest.Data = AdapterDataConverter.ConvertToCore(request.Data);

            var coreResponse = Dispatcher.GetMetric(coreRequest);

            var response = GetApiResponse <GetMetricResponseDto>(coreResponse);

            response.Data = AdapterDataConverter.ConvertToApi(coreResponse.InternalData);
            return(response);
        }
Esempio n. 2
0
        public GetMetricResponse GetMetric(Guid componentId, string metricName)
        {
            var dataDto = new GetMetricRequestDtoData()
            {
                ComponentId = componentId,
                Name        = metricName
            };
            var request = new GetMetricRequestDto()
            {
                Data  = dataDto,
                Token = GetAccessTokenDto()
            };
            var responseDto = DtoService.GetMetric(request);
            var response    = CreateResponse <GetMetricResponse>(responseDto);

            response.InternalData = DataConverter.GetMetricInfo(responseDto.Data);
            return(response);
        }
Esempio n. 3
0
 public GetMetricResponseDto GetMetric(GetMetricRequestDto request)
 {
     return(ExecuteAction <GetMetricResponseDto>("GetMetric", request));
 }