public EarthProfileResponseDto Execute(EarthProfileRequestDto request) { var response = new EarthProfileResponseDto(); var processElevation = setElevationEarth.Execute(request); if (processElevation.Failure) { return(new EarthProfileResponseDto(processElevation.ErrorList)); } var earthProfileList = processElevation.Result; earthProfileList = new CalculateProfileEarth().Execute(earthProfileList, request); response.Distance = request.Distance; response.EarthProfileList = earthProfileList; return(CalculateGoodLink(response)); }
private EarthProfileResponseDto CalculateGoodLink(EarthProfileResponseDto response) { response.IsGoodLink = response.EarthProfileList.Any(x => x.Ht > x.Zf) ? false : true; return(response); }