public object Convert()
        {
            switch (GetUpdateType())
            {
            case UpdateType.Album:
                AlbumListAlbum albumListAlbum = new AlbumListAlbum();
                albumListAlbum.catalog = catalog;
                albumListAlbum.link    = link;
                return(albumListAlbum);

            default:
                throw new NotImplementedException();
            }
        }
Beispiel #2
0
        public object Convert()
        {
            switch (GetUpdateType())
            {
            case UpdateType.Album:
                AlbumListAlbum albumListAlbum = new AlbumListAlbum();
                albumListAlbum.album_type   = type;
                albumListAlbum.catalog      = catalog;
                albumListAlbum.link         = link;
                albumListAlbum.release_date = release_date;
                albumListAlbum.titles       = titles;
                albumListAlbum.type         = type;
                return(albumListAlbum);

            case UpdateType.Artist:
                ArtistListArtist artistListArtist = new ArtistListArtist();
                artistListArtist.link      = link;
                artistListArtist.names     = names;
                artistListArtist.name_real = names.First().Value;
                return(artistListArtist);

            case UpdateType.Product:
                ProductListProduct productListProduct = new ProductListProduct();
                productListProduct.link  = link;
                productListProduct.names = titles;
                productListProduct.type  = type;

                if (productListProduct.names == null && names != null)
                {
                    productListProduct.names = names;
                }

                return(productListProduct);

            case UpdateType.Label:
                LabelListLabel labelListLabel = new LabelListLabel();
                labelListLabel.link  = link;
                labelListLabel.names = titles;
                return(labelListLabel);

            default:
                throw new NotImplementedException();
            }
        }