예제 #1
0
        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);
                }
            }
        }
예제 #2
0
        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;
                }
            }
        }
예제 #3
0
 public static string GetLargeImageUrl(DoubanArtist json)
 {
     return json.ThrowIfNull("json").Images.Large.ThrowIfNullOrEmpty("Large");
 }
예제 #4
0
 public static string GetLargeImageUrl(DoubanArtist json)
 {
     return(json.ThrowIfNull("json").Images.Large.ThrowIfNullOrEmpty("Large"));
 }