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); }
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; }