Exemplo n.º 1
0
        protected override void DeserializePropertyElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            if (reader.NamespaceURI == Schemas.UpnpSchema)
            {
                switch (reader.LocalName)
                {
                case "artist":
                    artist_list.Add(PersonWithRole.Deserialize(reader));
                    break;

                case "genre":
                    genre_list.Add(reader.ReadString());
                    break;

                case "longDescription":
                    LongDescription = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else if (reader.NamespaceURI == Schemas.DublinCoreSchema)
            {
                switch (reader.LocalName)
                {
                case "description":
                    Description = reader.ReadString();
                    break;

                case "date":
                    Date = reader.ReadString();
                    break;

                case "language":
                    Language = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else
            {
                base.DeserializePropertyElement(reader);
            }
        }
Exemplo n.º 2
0
        protected override void DeserializePropertyElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            if (reader.NamespaceURI == Schemas.UpnpSchema)
            {
                switch (reader.LocalName)
                {
                case "artist":
                    artist_list.Add(PersonWithRole.Deserialize(reader));
                    break;

                case "album":
                    album_list.Add(reader.ReadString());
                    break;

                case "playlist":
                    playlist_list.Add(reader.ReadString());
                    break;

                case "originalTrackNumber":
                    OriginalTrackNumber = reader.ReadElementContentAsInt();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else if (reader.NamespaceURI == Schemas.DublinCoreSchema)
            {
                switch (reader.LocalName)
                {
                case "contributor":
                    contributor_list.Add(reader.ReadString());
                    break;

                case "date":
                    Date = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else
            {
                base.DeserializePropertyElement(reader);
            }
        }
Exemplo n.º 3
0
        protected override void DeserializePropertyElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            if (reader.NamespaceURI == Schemas.UpnpSchema)
            {
                switch (reader.LocalName)
                {
                case "artist":
                    artist_list.Add(PersonWithRole.Deserialize(reader));
                    break;

                case "album":
                    album_list.Add(reader.ReadString());
                    break;

                case "scheduledStartTime":
                    scheduled_start_time_list.Add(reader.ReadElementContentAsDateTime());                       // TODO is this going to work?
                    break;

                case "scheduledEndTime":
                    scheduled_end_time_list.Add(reader.ReadElementContentAsDateTime());
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else if (reader.NamespaceURI == Schemas.DublinCoreSchema)
            {
                switch (reader.LocalName)
                {
                case "contributor":
                    contributor_list.Add(reader.ReadString());
                    break;

                case "date":
                    Date = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else
            {
                base.DeserializePropertyElement(reader);
            }
        }
Exemplo n.º 4
0
        protected override void DeserializePropertyElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            if (reader.NamespaceURI == Schemas.UpnpSchema)
            {
                switch (reader.LocalName)
                {
                case "artist":
                    artist_list.Add(PersonWithRole.Deserialize(reader));
                    break;

                case "producer":
                    producer_list.Add(reader.ReadString());
                    break;

                case "genre":
                    genre_list.Add(reader.ReadString());
                    break;

                case "albumArtURI":
                    album_art_uri_list.Add(new Uri(reader.ReadString()));
                    break;

                case "toc":
                    Toc = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else
            {
                base.DeserializePropertyElement(reader);
            }
        }
Exemplo n.º 5
0
        protected override void DeserializePropertyElement(XmlReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            if (reader.NamespaceURI == Schemas.UpnpSchema)
            {
                switch (reader.LocalName)
                {
                case "author":
                    author_list.Add(PersonWithRole.Deserialize(reader));
                    break;

                case "longDescription":
                    LongDescription = reader.ReadString();
                    break;

                case "rating":
                    Rating = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else if (reader.NamespaceURI == Schemas.DublinCoreSchema)
            {
                switch (reader.LocalName)
                {
                case "publisher":
                    publisher_list.Add(reader.ReadString());
                    break;

                case "contributor":
                    contributor_list.Add(reader.ReadString());
                    break;

                case "relation":
                    relation_list.Add(new Uri(reader.ReadString()));
                    break;

                case "description":
                    Description = reader.ReadString();
                    break;

                case "rights":
                    right_list.Add(reader.ReadString());
                    break;

                case "date":
                    Date = reader.ReadString();
                    break;

                case "language":
                    Language = reader.ReadString();
                    break;

                default:
                    base.DeserializePropertyElement(reader);
                    break;
                }
            }
            else
            {
                base.DeserializePropertyElement(reader);
            }
        }