public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { if (values == null || values.Length < 3 || values[0] == null || values[1] == null || values[2] == null) { return(null); } return(ParseDestination.GetDestinationImage(ParseDestination.GetMainDestination(values[0].ToString()), values[1].ToString(), values[2].ToString())); }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { if (values == null || values.Length < 2 || values[0] == null) { return(""); } string mainDestination = ParseDestination.GetMainDestination(values[0].ToString(), removeUS: true, removeSplitMarkers: true); string label = values[1].ToString(); if (ParseDestination.IsMarkerPresent(label.ToUpperInvariant(), Common.LufthansaMarkers)) { mainDestination = label + ": " + mainDestination; } return(mainDestination); }