コード例 #1
0
        public async Task <WeatherForecastResponse> GetWithServiceUnavailable()
        {
            return(await ValidateAndProcessRequestWithGuardAsync(new object(),
                                                                 async req =>
            {
                _logger.LogInformation($"Call to {nameof(GetWithServiceUnavailable)}");

                WeatherForecastResponse weatherForecastResponse = new WeatherForecastResponse()
                {
                    WeatherForecast = await _weatherForecastApiService.GetWithServiceUnavailable(),
                    ErrorCode = ResponseErrorCode.None,
                    Message = MessageConstants.Ok,
                    Status = true,
                    CorrelationId = Guid.NewGuid()
                };

                return weatherForecastResponse;
            }));
        }