public GenreController(IGenreService genreService)
        {
            HtmlHelper.ClientValidationEnabled = true;
            HtmlHelper.UnobtrusiveJavaScriptEnabled = true;

            this._genreService = genreService;
        }
Esempio n. 2
0
 public ProductServices(BookStoreDbContext context, IGenreService genreService, ISearchService searchService, IUserServices userServices)
 {
     this.context   = context;
     _genreService  = genreService;
     _searchService = searchService;
     _userServices  = userServices;
 }
Esempio n. 3
0
 public BooksController(IBookService serv, ICommentService serv2, IGenreService serv3, IUserService serv4)
 {
     bookService    = serv;
     commentService = serv2;
     genreService   = serv3;
     userService    = serv4;
 }
Esempio n. 4
0
 public ID3V1Service(
     IGenreService genreService,
     IMapper mapper)
 {
     this.genreService = genreService;
     this.mapper       = mapper;
 }
Esempio n. 5
0
        public ChangeGenreViewModel(IMvxNavigationService navigationService, IUserDialogs userDialogs, IValidator validator, IGenreService genreService, IBottomNavigationViewModelService bottomNavigationViewModelService, ITopNavigationViewModelService topNavigationViewModelService)
        {
            _navigationService                = navigationService;
            _topNavigationViewModelService    = topNavigationViewModelService;
            _bottomNavigationViewModelService = bottomNavigationViewModelService;

            _userDialogs = userDialogs;

            _validationHelper = new ValidationHelper(validator, this, Errors.Value, (propertyName) => { FocusName.Value = propertyName; });

            _genreService = genreService;

            ValidateNameCommand = new MvxCommand(() => _validationHelper.Validate(() => Name));

            InitValidationCommand = new MvxCommand(() => {
                _validationHelper.ResetValidation();
            });

            ChangeCommand = new MvxCommand(() =>
            {
                if (!IsTaskExecutedValueConverter.Convert(ChangeTask.Value))
                {
                    ChangeTask.Value = NotifyTaskCompletion.Create(AttemptChangeAsync);
                }
            });
        }
        public GenreController(IGenreService genreService)
        {
            HtmlHelper.ClientValidationEnabled      = true;
            HtmlHelper.UnobtrusiveJavaScriptEnabled = true;

            this._genreService = genreService;
        }
Esempio n. 7
0
 /// <summary>
 /// Initialize a new instance of GenresMovieViewModel class
 /// </summary>
 /// <param name="userService">The user service</param>
 /// <param name="genreService">The genre service</param>
 public GenreViewModel(IUserService userService, IGenreService genreService)
 {
     UserService  = userService;
     GenreService = genreService;
     CancellationLoadingGenres = new CancellationTokenSource();
     RegisterMessages();
 }
 public ProductsController(IProductService productService, IGenreService genreService, IOrderService orderService, IHttpContextAccessor accessor)
 {
     _productService = productService;
     _genreService   = genreService;
     _orderService   = orderService;
     _accessor       = accessor;
 }
Esempio n. 9
0
 public GenreController(
     IGenreService genreService,
     IMapper mapper)
 {
     _genreService = genreService;
     _mapper       = mapper;
 }
Esempio n. 10
0
 public SongController(IMapper mapper, ISongService songService, IGenreService genreService, IArtistService artistService)
 {
     _mapper        = mapper;
     _songService   = songService;
     _genreService  = genreService;
     _artistService = artistService;
 }
Esempio n. 11
0
 public GenreAppService(IUnitOfWork unitOfWork, IGenreRepository genreRepository, IGenreService genreService)
 {
     _notifications   = DomainEvent.Container.GetService <IHandler <DomainNotification> >();
     _unitOfWork      = unitOfWork;
     _genreRepository = genreRepository;
     _genreService    = genreService;
 }
Esempio n. 12
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="applicationService">The application service</param>
        /// <param name="showService">The show service</param>
        /// <param name="userService">The user service</param>
        /// <param name="genreService">The genre service</param>
        public ShowPageViewModel(IApplicationService applicationService, IShowService showService,
                                 IUserService userService, IGenreService genreService)
        {
            _showService        = showService;
            _userService        = userService;
            _applicationService = applicationService;
            GenreViewModel      = new GenreViewModel(userService, genreService);
            RegisterCommands();
            RegisterMessages();

            Search = new SearchShowViewModel();

            DispatcherHelper.CheckBeginInvokeOnUI(async() =>
            {
                Tabs.Add(new PopularShowTabViewModel(_applicationService, showService, userService));
                Tabs.Add(new GreatestShowTabViewModel(_applicationService, showService, userService));
                Tabs.Add(new RecentShowTabViewModel(_applicationService, showService, userService));
                Tabs.Add(new FavoritesShowTabViewModel(_applicationService, showService, userService));
                SelectedTab = Tabs.First();
                SelectedShowsIndexMenuTab = 0;
                await GenreViewModel.LoadGenresAsync().ConfigureAwait(false);
                await Tabs.ToList().ParallelForEachAsync(async tab =>
                {
                    await tab.LoadShowsAsync().ConfigureAwait(false);
                }).ConfigureAwait(false);
            });
        }
Esempio n. 13
0
        public LibraryController(
            IAddBookService addBookService,
            INotificationService notificationService,
            IAllAddedBooksService allAddedBooksServices,
            IGiveBookService giveBookService,
            IGivenBooksService givenBooksService,
            IUserService userService,
            IGenreService genreService,
            ITakenBooksService takenBooksService,
            UserManager <ApplicationUser> userManager,
            SignInManager <ApplicationUser> signInManager,
            ILogger <LogoutModel> logger,
            IHostingEnvironment hostingEnvironment)
        {
            this.addBookService        = addBookService;
            this.notificationService   = notificationService;
            this.allAddedBooksServices = allAddedBooksServices;
            this.genreService          = genreService;
            this.giveBookService       = giveBookService;
            this.givenBooksService     = givenBooksService;

            this.userService = userService;

            this.userManager        = userManager;
            this.signInManager      = signInManager;
            this.logger             = logger;
            this.hostingEnvironment = hostingEnvironment;
        }
Esempio n. 14
0
        public AddBandPresenter(IAddBandView view, IGenreService genreService, ICountryService countryService, IBandService bandService)
            : base(view)
        {
            if (bandService == null)
            {
                throw new ArgumentNullException(nameof(bandService));
            }

            if (countryService == null)
            {
                throw new ArgumentNullException(nameof(countryService));
            }

            if (genreService == null)
            {
                throw new ArgumentNullException(nameof(genreService));
            }

            this.genreService   = genreService;
            this.countryService = countryService;
            this.bandService    = bandService;

            this.View.NeedGenres    += View_NeedGenres;
            this.View.NeedCountries += View_NeedCountries;
            this.View.RegisterBand  += View_RegisterBand;
        }
Esempio n. 15
0
        public void TestMethod1()
        {
            var container = new UnityContainer();

            DI.Startup.Configuration(container);
            IHandler <DomainNotification> notifications = DomainEvent.Container.GetService <IHandler <DomainNotification> >();

            Genre genre = new Genre()
            {
                Id          = 0,
                Description = "Axé"
            };

            container.RegisterInstance <IGenreRepository>(this.MockGenreRepository);
            IGenreService genreService = container.Resolve <IGenreService>();

            genreService.Save(genre);

            IEnumerable <Genre> genres = genreService.GetGenres();

            if (notifications.HasNotifications())
            {
            }
            else
            {
            }
        }
Esempio n. 16
0
 public StatsUserService(
     ApplicationDbContext context,
     IGenreService genreService)
 {
     this.context      = context;
     this.genreService = genreService;
 }
Esempio n. 17
0
 public GenreController(IGenreService genreService, ILoggerFactory logger, ICacheManager cacheManager,
                        UserManager <ApplicationUser> userManager, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     this.Logger       = logger.CreateLogger("RoadieApi.Controllers.GenreController");
     this.GenreService = genreService;
 }
        public AddGameValidator(IGenreService genreService, IDeveloperStudioService developerStudioService, IPublisherService publisherService)
        {
            RuleFor(p => p.DeveloperStudioId)
            .GreaterThan(0)
            .MustAsync(async(d, developerStudioId, token) =>
                       await developerStudioService.IsExistAsync(developerStudioId, token))
            .WithMessage(t => $"Developer studio with Id {t.DeveloperStudioId} doesn't exist");

            RuleFor(p => p.GenreId)
            .GreaterThan(0)
            .MustAsync(async(g, genreId, token) =>
                       await genreService.IsExistAsync(genreId, token))
            .WithMessage(t => $"Genre with Id {t.GenreId} doesn't exist");

            RuleFor(p => p.PublisherId)
            .GreaterThan(0)
            .MustAsync(async(p, publisherId, token) =>
                       await publisherService.IsExistAsync(publisherId, token))
            .WithMessage(t => $"Publisher with Id {t.PublisherId} doesn't exist");

            RuleFor(p => p.GameDetails)
            .NotNull()
            .SetValidator(new GameDetailsValidator());

            RuleForEach(p => p.Attachments)
            .SetValidator(new GameAttachmentValidator());
        }
Esempio n. 19
0
        /// <summary>
        /// Ermittelt die Liste der Genres für den Movie und fügt diejenigen hinzu, deren Name noch nicht in der
        /// übergebenen Liste enthalten ist
        /// Es werden keine Genres entfernt
        /// Typische Anwednung: Bei Selektion eines Movie von einem Provider werden Genrenamen mitgeliefert, die
        /// dann dem Film hinzugefügt werden sollen
        /// </summary>
        /// <param name="movie">Film, dessen Genres erweitert werden sollem</param>
        /// <param name="genreNames">Namen der hinzuzufügenden Genres</param>
        /// <returns>Alle MovieGenres für den Film, also alte sowie neu hinzugefügte</returns>
        public async Task <ICollection <MovieGenre> > AddMovieGenres(Movie movie, IList <string> genreNames)
        {
            List <MovieGenre> movieGenres  = new List <MovieGenre>();
            IGenreService     genreService = Resolver.Resolve <IGenreService>();

            // Bestimmen der Genres, die dem Film neu zugeordnet werden müssen
            var existingGenres     = movie.MovieGenres.Where(x => x.Movie == movie).Select(mg => mg.Genre);
            var existingGenreNames = existingGenres.Select(s => s.Name);
            var newGenreNames      = (from genre in genreNames select genre).Except(from existingGenre in existingGenreNames select existingGenre);

            foreach (string genreName in newGenreNames)
            {
                // Genres anlegen, falls es noch nicht existiert
                Genre genre = await genreService.GetOrCreateGenre(genreName);

                MovieGenre movieGenre = MovieGenre.CreateNew <MovieGenre>();
                movieGenre.Movie = movie;
                movieGenre.Genre = genre;
                movieGenres.Add(movieGenre);
            }

            // Auch die bereits vorhandenen, zugeordneten Genres zurückgeben, damit diese angezeigt werden
            movieGenres.AddRange(movie.MovieGenres);

            return(movieGenres);
        }
Esempio n. 20
0
 public MovieController(IGenreService genreService, IActorService actorService,
                        IMovieService movieService, IMapper mapper) : base(mapper)
 {
     _genreService = genreService;
     _actorService = actorService;
     _movieService = movieService;
 }
 public GenresApiController(IGenreService genreService, INewRelicTransactionManager newRelicTransactionManager,
                            ILogFactory logFactory)
 {
     _genreService = genreService;
     _newRelicTransactionManager = newRelicTransactionManager;
     _logFactory = logFactory;
 }
Esempio n. 22
0
 public GenreController(
     IGenreService genreService,
     ILanguageService languageService)
 {
     _genreService    = genreService;
     _languageService = languageService;
 }
Esempio n. 23
0
 public BooksController(IBookService serv, IAuthorService serv2, IGenreService serv3, IVoteService serv4)
 {
     bookService   = serv;
     authorService = serv2;
     genreService  = serv3;
     voteService   = serv4;
 }
 public BookController(IBookService bService, IAuthorService aService, ILanguageService lService, IGenreService gService)
 {
     _bookService     = bService;
     _authorService   = aService;
     _languageService = lService;
     _genreService    = gService;
 }
        public ImportXMLCommand(IBookService bookService, IGenreService genreService, IProducerService producerService, IStudioService studioService, IXMLParser xmlParser)
        {
            if (bookService == null)
            {
                throw new ArgumentNullException("Book service cannnot be null.");
            }

            if (genreService == null)
            {
                throw new ArgumentNullException("Genre service cannnot be null.");
            }

            if (producerService == null)
            {
                throw new ArgumentNullException("Studio service cannnot be null.");
            }

            if (studioService == null)
            {
                throw new ArgumentNullException("Studio service cannnot be null.");
            }

            if (xmlParser == null)
            {
                throw new ArgumentNullException("XML parser cannnot be null.");
            }

            this.bookService     = bookService;
            this.genreService    = genreService;
            this.producerService = producerService;
            this.studioService   = studioService;
            this.xMLParser       = xmlParser;
        }
Esempio n. 26
0
 public GenreController(IGenreService genreService, ILogger <GenreController> logger, ICacheManager cacheManager,
                        UserManager <User> userManager, IRoadieSettings roadieSettings)
     : base(cacheManager, roadieSettings, userManager)
 {
     Logger       = logger;
     GenreService = genreService;
 }
 public GetGenreByIdQueryHandler(
     ILogger <GetGenreByIdQuery> logger,
     IGenreService service)
     : base(logger)
 {
     _service = service;
 }
Esempio n. 28
0
 public FanficController(
     IFanficService fanficService,
     IFanficTagsService fanficTagsService,
     IChapterService chapterService,
     IChapterRatingService chapterRatingService,
     ICommentService commentService,
     ICommentRatingService commentRatingService,
     IGenreService genreService,
     ITagService tagService,
     SignInManager <ApplicationUser> authManager,
     IUserService userService,
     IMapper mapper)
 {
     _fanficService         = fanficService;
     _fanficTagsService     = fanficTagsService;
     _chapterService        = chapterService;
     _chapterRatingService  = chapterRatingService;
     _commentService        = commentService;
     _commentRatingService  = commentRatingService;
     _genreService          = genreService;
     _tagService            = tagService;
     _userService           = userService;
     _authenticationManager = authManager;
     _mapper = mapper;
 }
 public LibraryAccountController(
     IBookService bookService,
     IMessageService messageService,
     IGenreService genreService,
     IAllBooksServices getAllBooks,
     SignInManager <ApplicationUser> signInManager,
     UserManager <ApplicationUser> userManager,
     IGiveBookService giveBookService,
     IUserService userService,
     IGivenBooksService givenBooksService,
     ILogger <LogoutModel> logger,
     ILibraryProfileService libraryProfileService,
     IStatsLibraryService statsLibraryService,
     IIndexLibraryService indexLibraryService,
     IHostingEnvironment hostingEnvironment,
     IProfileChakerService profilChekerService)
 {
     this.bookService           = bookService;
     this.messageService        = messageService;
     this.genreService          = genreService;
     this.getAllBooks           = getAllBooks;
     this.userManager           = userManager;
     this.giveBookService       = giveBookService;
     this.userService           = userService;
     this.givenBooksService     = givenBooksService;
     this.signInManager         = signInManager;
     this.logger                = logger;
     this.libraryProfileService = libraryProfileService;
     this.statsLibraryService   = statsLibraryService;
     this.indexLibraryService   = indexLibraryService;
     this.hostingEnvironment    = hostingEnvironment;
     this.profilChekerService   = profilChekerService;
 }
Esempio n. 30
0
        public static void SeedData(
            RoleManager <IdentityRole> roleManager,
            UserManager <ApplicationUser> userManager,
            DatabaseContext dbContext,
            IMovieService movieService,
            IGenreRepository genreRepository,
            IGenreService genreService)
        {
            SeedRoles(roleManager);

            SeedUsers(userManager);

            // Example from SamBioin's Website - Not scraped
            SeedDatabase_CinemasAndLocations(dbContext);

            // Scraped from IMDB
            SeedDatabase_Genres(dbContext, genreService);

            // Generated by me
            SeedDatabase_TheatreHalls(dbContext);

            // Scraped from IMDB
            SeedDatabase_Movies(dbContext, movieService, genreRepository);

            /* This will be commented after one run */
            // Random Generated
            //SeedDatabase_MovieShowtimes(dbContext);
        }
Esempio n. 31
0
 public BooksController(IBookService bookService, IAuthorService authorService, IGenreService genreService, IMapper mapper)
 {
     _bookService   = bookService;
     _authorService = authorService;
     _genreService  = genreService;
     _mapper        = mapper;
 }
 public BookController(IBookService bookService, IAuthorService authorService, IGradeService gradeService, IGenreService genreService, IUserService userService)
 {
     this.bookService = bookService;
     this.authorService = authorService;
     this.gradeService = gradeService;
     this.genreService = genreService;
     this.userService = userService;
 }
Esempio n. 33
0
        public GenresController(
                IGenreService genreSvc
            )
        {
            if (genreSvc == null)
                throw new ArgumentNullException("genreSvc");

            _genreSvc = genreSvc;
        }
Esempio n. 34
0
 public StoryController(
     IStoryService storyService,
     IGenreService genreService,
     IIdentifierProvider identifierProvider,
     IChapterService chapterService,
     IStatisticsService statisticsService)
 {
     this.storyService = storyService;
     this.genreService = genreService;
     this.chapterService = chapterService;
     this.identifierProvider = identifierProvider;
     this.statisticsService = statisticsService;
 }
Esempio n. 35
0
 public MovieController(IMovieService movieService, ICountryService countryService,
                        IGenreService genreService, IPeopleService peopleService,
                        ICareerService careerService, IUserCommentService userCommentService,
                        IRatingService ratingService)
 {
     _movieService = movieService;
     _countryService = countryService;
     _genreService = genreService;
     _peopleService = peopleService;
     _careerService = careerService;
     _userCommentService = userCommentService;
     _ratingService = ratingService;
 }
Esempio n. 36
0
        public GamesController(IGameService gameService,
            ILogger logger,
            IGenreService genreService,
            IPlarfotmTypeService platformTypeService,
            IPublisherService publisherService)
        {
            _gameService = gameService;
            _logger = logger;
            _genreService = genreService;
            _publisherService = publisherService;
            _plarfotmTypeService = platformTypeService;

            Mapper.CreateMap<CreateGameViewModel, GameDTO>()
                .ForMember(g => g.Genres, m => m.Ignore())
                .ForMember(g => g.PlatformTypes, m => m.Ignore())
                .ForMember(g => g.Publisher, m => m.Ignore());

            Mapper.CreateMap<CreateGameViewModel, GameViewModel>()
                .ForMember(g => g.Genres, m => m.Ignore())
                .ForMember(g => g.PlatformTypes, m => m.Ignore())
                .ForMember(g => g.Publishers, m => m.Ignore());

            Mapper.CreateMap<FilterViewModel, FilterDTO>()
                .ForMember(f => f.From, m => m.MapFrom(fvm => Convert.ToDecimal(fvm.From)))
                .ForMember(f => f.To, m => m.MapFrom(fvm => Convert.ToDecimal(fvm.To)));

            Mapper.CreateMap<GameDTO, GameDetailsViewModel>()
                .ForMember(g => g.Genres,
                    m =>
                        m.MapFrom(
                            gamedto =>
                                new MultiSelectList(
                                    gamedto.Genres.Select(
                                        genre =>
                                            new SelectListItem() { Value = genre.GenreId.ToString(), Text = genre.Name }))))
                .ForMember(pt => pt.PlatformTypes,
                    m =>
                        m.MapFrom(
                            ptDto =>
                                new MultiSelectList(
                                    ptDto.PlatformTypes.Select(
                                        platformType =>
                                            new SelectListItem()
                                            {
                                                Value = platformType.PlatformTypeId.ToString(),
                                                Text = platformType.Name
                                            }))))
                .ForMember(g => g.PublisherCompanyName, m => m.MapFrom(g => g.Publisher.CompanyName));
        }
Esempio n. 37
0
        public AlbumsController(
                IGenreService genreSvc,
                IArtistService artistSvc,
                IAlbumService albumSvc
            )
        {
            if (genreSvc == null)
                throw new ArgumentNullException("genreSvc");
            if (artistSvc == null)
                throw new ArgumentNullException("artistSvc");
            if (albumSvc == null)
                throw new ArgumentNullException("albumSvc");

            _genreSvc = genreSvc;
            _artistSvc = artistSvc;
            _albumSvc = albumSvc;
        }
Esempio n. 38
0
 public GameController(IGameService gameService,
     ICommentService commentServise, 
     ILogger logger, 
     IGenreService genreService, 
     IPlarfotmTypeService plarfotmTypeService)
 {
     _gameService = gameService;
     _commentService = commentServise;
     _logger = logger;
     _genreService = genreService;
     _plarfotmTypeService = plarfotmTypeService;
     Mapper.CreateMap<CommentDTO, CommentViewModel>()
         .ForMember( c => c.ParentComment, m => m.Ignore() );
     Mapper.CreateMap<CommentViewModel, CommentDTO>();
     Mapper.CreateMap<GameDTO, GameDetailsViewModel>()
         .ForMember(g => g.Genres,
             m =>
                 m.MapFrom(
                     gamedto =>
                         new MultiSelectList(
                             gamedto.Genres.Select(
                                 genre =>
                                     new SelectListItem() { Value = genre.GenreId.ToString(), Text = genre.Name }))))
         .ForMember(pt => pt.PlatformTypes,
             m =>
                 m.MapFrom(
                     ptDto =>
                         new MultiSelectList(
                             ptDto.PlatformTypes.Select(
                                 platformType =>
                                     new SelectListItem()
                                     {
                                         Value = platformType.PlatformTypeId.ToString(),
                                         Text = platformType.Name
                                     }))))
         .ForMember(g => g.PublisherCompanyName, m => m.MapFrom( g => g.Publisher.CompanyName ));
 }
Esempio n. 39
0
 public GenreAdminController(IGenreService genreService)
 {
     this.genreService = genreService;
 }
 public GenreApiController(ILocalLogger logger,
     IGenreService genreService)
 {
     _logger = logger;
     _genreService = genreService;
 }
Esempio n. 41
0
 public MovieController(IMovieService movieService, IGenreService genreService, ICertificationService certificationService)
 {
     _movieService = movieService;
     _genreService = genreService;
     _certificationService = certificationService;
 }
Esempio n. 42
0
 public AlbumController(IAlbumService albumService, IArtistService artistService, IGenreService genreService)
 {
     _albumService = albumService;
     _artistService = artistService;
     _genreService = genreService;
 }
Esempio n. 43
0
 public SongController(ISongService songService, IGenreService genreService, IArtistService artistService)
 {
     this._artistService = artistService;
     this._songService = songService;
     this._genreService = genreService;
 }
 public UnknownRecordController(IGenreService genreService)
 {
     this._genreService = genreService;
 }
 public StoreController(IGenreService genreService)
 {
     _genreService = genreService;
     HtmlHelper.UnobtrusiveJavaScriptEnabled = true;
 }
 //public GenreController()
 //{
 //}
 public GenreController(IGenreService genreService)
 {
     _genreService = genreService;
 }
Esempio n. 47
0
 public GenreController(IGenreService service)
 {
     this._service = service;
 }