示例#1
0
 public MovieManager(IManageCollection <Movie> movieCollection,
                     IManageCollection <Genre> genreCollection, IGenreManager genreManager)
 {
     _movieCollection = movieCollection;
     _genreCollection = genreCollection;
     _genreManager    = genreManager;
 }
示例#2
0
 public GameController(IGameManager gameManager, IGenreManager genreManager, IPlatformManager platformTypeManager, IPublisherManager publisherManager)
 {
     _gameManager      = gameManager;
     _genreManager     = genreManager;
     _platformManager  = platformTypeManager;
     _publisherManager = publisherManager;
 }
示例#3
0
 public GenresController(IGenreManager genreManager, IVideoManager videoManager, UserManager <User> userManager,
                         IMapper mapper)
 {
     _videoManager = videoManager;
     _mapper       = mapper;
     _userManager  = userManager;
     _genreManager = genreManager;
 }
示例#4
0
 public VideosController(IVideoManager videoManager, IAuthorManager authorManager,
                         IGenreManager genreManager, UserManager <User> userManager, IMapper mapper)
 {
     _genreManager  = genreManager;
     _authorManager = authorManager;
     _videoManager  = videoManager;
     _mapper        = mapper;
     _userManager   = userManager;
 }
示例#5
0
        public static ID3v1Tag FromV2Tag(TagBase tag, IGenreManager genreManager)
        {
            if (tag == null)
            {
                throw new ArgumentNullException("tag", "Argument 'tag' can not be null.");
            }

            ID3v1Tag information = new ID3v1Tag();

            Frames.AlbumTextFrame           album       = tag.SearchForFrame(typeof(Frames.AlbumTextFrame)) as Frames.AlbumTextFrame;
            Frames.ArtistTextFrame          artist      = tag.SearchForFrame(typeof(Frames.ArtistTextFrame)) as Frames.ArtistTextFrame;
            Frames.CommentExtendedTextFrame comment     = tag.SearchForFrame(typeof(Frames.CommentExtendedTextFrame)) as Frames.CommentExtendedTextFrame;
            Frames.GenreTextFrame           genre       = tag.SearchForFrame(typeof(Frames.GenreTextFrame)) as Frames.GenreTextFrame;
            Frames.ReleaseTimeTextFrame     releaseTime = tag.SearchForFrame(typeof(Frames.ReleaseTimeTextFrame)) as Frames.ReleaseTimeTextFrame;
            Frames.TitleTextFrame           title       = tag.SearchForFrame(typeof(Frames.TitleTextFrame)) as Frames.TitleTextFrame;
            Frames.TrackTextFrame           track       = tag.SearchForFrame(typeof(Frames.TrackTextFrame)) as Frames.TrackTextFrame;
            Frames.YearTextFrame            year        = tag.SearchForFrame(typeof(Frames.YearTextFrame)) as Frames.YearTextFrame;

            if (album != null)
            {
                information.Album = album.Text;
            }
            if (artist != null)
            {
                information.Artist = album.Text;
            }
            if (comment != null)
            {
                information.Comment = album.Text;
            }
            if (genre != null)
            {
                information.GenreCode = genreManager.GetGenreCode(genre.Text);
            }
            if (releaseTime != null)
            {
                information.Year = releaseTime.Text.Substring(0, 4);
            }
            else if (year != null)
            {
                information.Year = year.Text;
            }
            if (track != null)
            {
                information.TrackNumber = (byte)track.TrackNumber;
            }
            if (title != null)
            {
                information.Title = title.Text;
            }

            return(information);
        }
示例#6
0
 public IdentityUnitOfWork(string connectionString)
 {
     db                   = new ApplicationContext();
     userManager          = new ApplicationUserManager(new UserStore <User>(db));
     roleManager          = new ApplicationRoleManager(new RoleStore <Role>(db));
     clientManager        = new ClientManager(db);
     genreManager         = new GenreManager(db);
     singerManager        = new SingerManager(db);
     musicManager         = new MusicManager(db);
     playlistManager      = new PlaylistManager(db);
     playlistMusicManager = new PlaylistMusicManager(db);
 }
示例#7
0
 public DataMigrationService(IMovieManager movieManager
                             , IGenreManager gm
                             , ILanguageManager languageManager
                             , IPeopleManager peopleManager)
 {
     if (movieManager == null)
     {
         throw new ApplicationException("Movie Manager not initialized");
     }
     _movieManager    = movieManager;
     _genreManager    = gm;
     _languageManager = languageManager;
     _peopleManager   = peopleManager;
     Mapper.Initialize(x => x.AddProfile <DomainMapper>());
 }
示例#8
0
        public FilterViewModel(IGenreManager genreManager, IPlatformManager platformTypeManager,
                               IPublisherManager publisherManager)
        {
            _genreManager     = genreManager;
            _platformManager  = platformTypeManager;
            _publisherManager = publisherManager;

            SelectedGenres     = new List <int>();
            SelectedPlatforms  = new List <int>();
            SelectedPublishers = new List <int>();

            AllGenres = new MultiSelectList(_genreManager.GetAllGenres().OrderBy(g => g.Category), "Id", "Name",
                                            "Category");
            AllPlatforms = new MultiSelectList(_platformManager.GetAllPlatforms().OrderBy(g => g.Type), "Id", "Type");
            ;
            AllPublishers = new MultiSelectList(_publisherManager.GetAllPublishers().OrderBy(i => i.CompanyName), "Id",
                                                "CompanyName");

            ItemsPerPage = new SelectList(new List <string> {
                "2", "10", "20", "50", "100", "All"
            });
            //FilterByOptions = new SelectList();
            //WhenPublished = new SelectList();
        }
示例#9
0
文件: ID3v1Tag.cs 项目: sahands/a-id3
        public static ID3v1Tag FromV2Tag(TagBase tag, IGenreManager genreManager)
        {
            if(tag==null)
            {
                throw new ArgumentNullException("tag", "Argument 'tag' can not be null.");
            }

            ID3v1Tag information=new ID3v1Tag();
            Frames.AlbumTextFrame album=tag.SearchForFrame(typeof(Frames.AlbumTextFrame)) as Frames.AlbumTextFrame;
            Frames.ArtistTextFrame artist=tag.SearchForFrame(typeof(Frames.ArtistTextFrame)) as Frames.ArtistTextFrame;
            Frames.CommentExtendedTextFrame comment=tag.SearchForFrame(typeof(Frames.CommentExtendedTextFrame)) as Frames.CommentExtendedTextFrame;
            Frames.GenreTextFrame genre=tag.SearchForFrame(typeof(Frames.GenreTextFrame)) as Frames.GenreTextFrame;
            Frames.ReleaseTimeTextFrame releaseTime=tag.SearchForFrame(typeof(Frames.ReleaseTimeTextFrame)) as Frames.ReleaseTimeTextFrame;
            Frames.TitleTextFrame title=tag.SearchForFrame(typeof(Frames.TitleTextFrame)) as Frames.TitleTextFrame;
            Frames.TrackTextFrame track=tag.SearchForFrame(typeof(Frames.TrackTextFrame)) as Frames.TrackTextFrame;
            Frames.YearTextFrame year=tag.SearchForFrame(typeof(Frames.YearTextFrame)) as Frames.YearTextFrame;

            if(album!=null)
                information.Album=album.Text;
            if(artist!=null)
                information.Artist=album.Text;
            if(comment!=null)
                information.Comment=album.Text;
            if(genre!=null)
                information.GenreCode=genreManager.GetGenreCode(genre.Text);
            if(releaseTime!=null)
                information.Year=releaseTime.Text.Substring(0, 4);
            else if(year!=null)
                information.Year=year.Text;
            if(track!=null)
                information.TrackNumber=(byte)track.TrackNumber;
            if (title != null)
                information.Title=title.Text;

            return information;
        }
示例#10
0
 public GenresController(IGenreManager genreManager)
 {
     _genreManager = genreManager;
 }
 public GenresController(ILogger <GenresController> logger, IGenreManager genreManager)
 {
     _logger       = logger;
     _genreManager = genreManager;
 }
示例#12
0
 public GenreController(IGenreManager genreManager)
 {
     this.manager = genreManager;
 }