예제 #1
0
 public SearchController(
     ITagEntity pTagEntity,
     ISearchMusicService pYoutubeSearch,
     ILogService pLogger) : base(pLogger)
 {
     _tagEntity     = pTagEntity;
     _youtubeSearch = pYoutubeSearch;
 }
예제 #2
0
 public TagsController(
     ITagEntity pTagEntity,
     IPlaylistEntity pPlaylistEntity,
     ILogService pLogger) : base(pLogger)
 {
     _tagEntity      = pTagEntity;
     _playlistEntity = pPlaylistEntity;
 }
예제 #3
0
 public PlaylistEntity(
     IBaseSettings pSettingsConfig,
     ITagEntity pTagEntity,
     ISongsEntity pSongEntity)
     : base(pSettingsConfig, nameof(Playlist))
 {
     _tagEntity  = pTagEntity;
     _songEntity = pSongEntity;
 }
예제 #4
0
 public PlaylistsController(
     IPlaylistEntity pPlaylistEntity,
     ISearchMusicService pYoutubeSearch,
     ISongsEntity pPlaylistSongsEntity,
     ITagEntity pTagEntity,
     ILogService pLogger) : base(pLogger)
 {
     _playlistEntity      = pPlaylistEntity;
     _youtubeSearch       = pYoutubeSearch;
     _playlistSongsEntity = pPlaylistSongsEntity;
     _tagEntity           = pTagEntity;
 }
예제 #5
0
 public PlaylistsPopularController(
     IPlaylistEntity pPlaylistEntity,
     ISearchMusicService pYoutubeSearch,
     ISongsEntity pSongManager,
     ITagEntity pTagEntity,
     ILogService pLogger
     ) : base(pLogger)
 {
     _playlistEntity = pPlaylistEntity;
     _youtubeSearch  = pYoutubeSearch;
     _songManager    = pSongManager;
     _tagEntity      = pTagEntity;
 }
예제 #6
0
        public Tag Convert(ITagEntity tagEntity, OnObjectCreation onObjectCreation)
        {
            //compose Tag
            List <Product> products = new List <Product>();

            Tag tag = domainFactory.CreateTag(tagEntity.Id
                                              , tagEntity.Name
                                              , products);

            // handle instantiated tags. Needed by repository to prevent looping.
            onObjectCreation(tag, tagEntity);

            // gather child objects: products
            foreach (ProductTagEntity productTagEntity in tagEntity.ProductTagEntities)
            {
                Product product = repositoryFactory.ProductsRepository.Get(productTagEntity.ProductId);
                products.Add(product);
            }
            return(tag);
        }
예제 #7
0
 // Handle cacheing of object on instantiation
 private void OnObjectCreation(Tag tag, ITagEntity tagEntity)
 {
     tagCache.Add(tag, tagEntity);
 }