Beispiel #1
0
        public ArtistReleases ReadArtistReleases(JObject source)
        {
            ArtistReleases artistReleases = new ArtistReleases();

            foreach (var item in source)
            {
                var v = item.Value;

                switch (item.Key)
                {
                case "pagination":
                    artistReleases.Pagination = this.ReadPaginationInfo(v.Value <JObject>());
                    break;

                case "releases":
                    artistReleases.Releases = v.Value <JArray>().Cast <JObject>().Select(t => this.ReadReleaseVersion(t)).ToArray();
                    break;

                case "resource_url":
                    break;

                default:
                    this.ThrowIfStrict("Unknown key: " + item.Key);
                    break;
                }
            }
            return(artistReleases);
        }
Beispiel #2
0
        public ArtistReleases ReadArtistReleases(JObject source)
        {
            ArtistReleases artistReleases = new ArtistReleases();
            foreach (var item in source)
            {
                var v = item.Value;

                switch (item.Key)
                {
                    case "pagination":
                        artistReleases.Pagination = this.ReadPaginationInfo(v.Value<JObject>());
                        break;
                    case "releases":
                        artistReleases.Releases = v.Value<JArray>().Cast<JObject>().Select(t => this.ReadReleaseVersion(t)).ToArray();
                        break;
                    case "resource_url":
                        break;
                    default:
                        this.ThrowIfStrict("Unknown key: " + item.Key);
                        break;
                }
            }
            return artistReleases;
        }