public static IEnumerable <string> ParseName(DoubanArtist json) { if (!String.IsNullOrWhiteSpace(json.Name)) { yield return(json.Name); } if (!String.IsNullOrWhiteSpace(json.OriginName)) { yield return(json.OriginName); } if (json.OtherNames != null) { foreach (var name in json.OtherNames.Where(z => !String.IsNullOrWhiteSpace(z))) { yield return(name); } } if (json.OtherOriginNames != null) { foreach (var name in json.OtherOriginNames.Where(z => !String.IsNullOrWhiteSpace(z))) { yield return(name); } } }
public static IEnumerable<string> ParseName(DoubanArtist json) { if (!String.IsNullOrWhiteSpace(json.Name)) yield return json.Name; if (!String.IsNullOrWhiteSpace(json.OriginName)) yield return json.OriginName; if (json.OtherNames != null) { foreach (var name in json.OtherNames.Where(z => !String.IsNullOrWhiteSpace(z))) { yield return name; } } if (json.OtherOriginNames != null) { foreach (var name in json.OtherOriginNames.Where(z => !String.IsNullOrWhiteSpace(z))) { yield return name; } } }
public static string GetLargeImageUrl(DoubanArtist json) { return json.ThrowIfNull("json").Images.Large.ThrowIfNullOrEmpty("Large"); }
public static string GetLargeImageUrl(DoubanArtist json) { return(json.ThrowIfNull("json").Images.Large.ThrowIfNullOrEmpty("Large")); }