Пример #1
0
 //# __________ PROTOCOL :: PUBLIC __________ #//
 public VmLocationToDestinationMappingResult GetLocationByDispatchDestination(VmTag tag)
 {
     if( tag.IsUpu() )
     {
         VmS9TagParser s9 = new VmS9TagParser(tag.Value);
         return UpuDispatchDestinationMapping.GetMappedLocationCode(
             s9.GetDestinationCountryCode(),
             s9.GetDestinationLocationCode(),
             s9.GetDestinationOfficeOfExchangeQualifier());
     }
     else if( tag.IsJourneyId() )
     {
         VmJourneyIdParser journeyId = new VmJourneyIdParser(tag.Value);
         return UpuDispatchDestinationMapping.GetMappedLocationCode(
             null,
             journeyId.GetDestinationAirportCode(),
             null);
     }
     else if( tag.IsUsDomestic() )
     {
         String locationCode = (VmProperties.Default.ShouldUsePlannedRouteTransferAirportAsDestination() )
             ? tag.TransferLocation
             : tag.DestinationAirportCode;
         return new VmLocationToDestinationMappingResult(locationCode);
     }
     else
     {
         return new VmLocationToDestinationMappingResult(tag.DestinationAirportCode);
     }
 }