コード例 #1
0
        private ArtistAlias ReadArtistAlias(JObject source)
        {
            ArtistAlias artistAlias = new ArtistAlias();

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

                switch (item.Key)
                {
                case "id":
                    artistAlias.Id = v.Value <int>();
                    break;

                case "name":
                    artistAlias.Name = v.Value <string>();
                    break;

                case "resource_url":
                    break;

                default:
                    this.ThrowIfStrict("Unknown key: " + item.Key);
                    break;
                }
            }
            return(artistAlias);
        }
コード例 #2
0
ファイル: DataReader3.cs プロジェクト: MediaPortal/MPTagThat
        private ArtistAlias ReadArtistAlias(JObject source)
        {
            ArtistAlias artistAlias = new ArtistAlias();
            foreach (var item in source)
            {
                var v = item.Value;

                switch (item.Key)
                {
                    case "id":
                        artistAlias.Id = v.Value<int>();
                        break;
                    case "name":
                        artistAlias.Name = v.Value<string>();
                        break;
                    case "resource_url":
                        break;
                    default:
                        this.ThrowIfStrict("Unknown key: " + item.Key);
                        break;
                }
            }
            return artistAlias;
        }