コード例 #1
0
        async Task <DistributionOperatorResponse> GetDBOAsync()
        {
            var result = new DistributionOperatorResponse {
                Success = true, Operators = GetDistributionOperators()
            };
            await _logServiceClient.PostAsync(new LogRequest { Message = "Got the Distribution Operators" });

            return(result);
        }
コード例 #2
0
        async Task <DistributionOperatorResponse> GetDBOByAreaIdAsync(DistributionOperatorRequest request)
        {
            var validationResult = this.Validate(request);

            if (!validationResult.IsValid)
            {
                await _logServiceClient.PostAsync(new LogRequest { Message = $"Failed to get Profile Data for {request.AreaId}" });

                return(new DistributionOperatorResponse {
                    Success = false, Errors = validationResult.FormattedErrors
                });
            }

            var result = new DistributionOperatorResponse {
                Success = true, Operators = GetByAreaId(request.AreaId)
            };
            await _logServiceClient.PostAsync(new LogRequest { Message = $"Retrieved Profile Data for {request.AreaId}: {result.Operators}" });

            return(result);
        }