Пример #1
0
 public PlanetViewModel(IPeopleRepository peopleRepository, IFilmRepository filmRepository, IDataService dataService)
 {
     _peopleRepository = peopleRepository;
     _filmRepository   = filmRepository;
     _dataService      = dataService;
     InitAsyncCommand  = new AsyncRelayCommand <Planet>(InitAsync);
 }
Пример #2
0
 public FilmPersonRepository(FilmContext context,
                             IFilmRepository frepo,
                             IPersonRepository prepo) : base(context)
 {
     _filmRepository   = frepo;
     _personRepository = prepo;
 }
Пример #3
0
 public AdminController(IFilmRepository context, IIdentityRepository repository, UserManager <ApplicationUser> userMgr, RoleManager <IdentityRole> rm)
 {
     repo        = context;
     repos       = repository;
     userManager = userMgr;
     roleManager = rm;
 }
Пример #4
0
 /// <summary>
 /// .ctor
 /// </summary>
 /// <param name="loggerFactory">Поставщик логгера</param>
 /// <param name="hallRepository">Репозиторий залов</param>
 /// <param name="sessionRepository">Репозиторий сессий</param>
 /// <param name="filmRepository">Репозиторий фильмов</param>
 public HallService(ILoggerFactory loggerFactory, IHallRepository hallRepository, ISessionRepository sessionRepository, IFilmRepository filmRepository, IPlaceRepository placeRepository) : base(loggerFactory.CreateLogger <HallService>())
 {
     _hallRepository    = hallRepository;
     _sessionRepository = sessionRepository;
     _filmRepository    = filmRepository;
     _placeRepository   = placeRepository;
 }
Пример #5
0
 public FilmService(IFilmRepository filmRepository, IDirectorService directorService, ICastMemberService castMemberService, IPermissionService permissionService)
 {
     this.filmRepository    = filmRepository;
     this.directorService   = directorService;
     this.castMemberService = castMemberService;
     this.permissionService = permissionService;
 }
Пример #6
0
        public CardControlViewModel()
        {
            _filmRepository = new FilmRepository();
            _board          = new Board(_filmRepository);

            RegisterFilmBufferEvent();
        }
Пример #7
0
 public FilmController(IFilmRepository filmRepository, ITrailerRepository trailerRepository, IWebHostEnvironment appEnvironment, IPosterRepository posterRepository)
 {
     _filmRepository    = filmRepository;
     _trailerRepository = trailerRepository;
     _appEnvironment    = appEnvironment;
     _posterRepository  = posterRepository;
 }
Пример #8
0
 public FilmsController(IFilmRepository filmRepository, IMapper mapper,
                        IBinaryResourcePathResolver resourcePathResolver)
 {
     this.mapper = mapper;
     this.resourcePathResolver = resourcePathResolver;
     this.filmRepository       = filmRepository;
 }
        public void CollectionFilmRepository_IT()
        {
            //Arrange
            var             kernel     = new StandardKernel(new DependencyInjection());
            ISerializer     serializer = kernel.Get <ISerializer>();
            IFilmRepository sut        = kernel.Get <IFilmRepository>(new ConstructorArgument("serializer", serializer));

            Film film1 = new Film("Aliens", new DateTime(1984, 1, 20), 5, Genre.Science_Fiction);
            Film film2 = new Film("Predator", new DateTime(1984, 1, 20), 5, Genre.Science_Fiction);

            //Act
            long id1 = sut.Insert(film1);
            long id2 = sut.Insert(film2);

            //Assert
            Assert.AreEqual(2, sut.SelectAll().Count, "Assertion 1");
            Assert.AreEqual(1, sut.SearchByTitle("Aliens").Count, "Assertion 2");
            Assert.AreEqual(film1, sut.SelectById(id1), "Assertion 3");
            Assert.AreEqual(film2, sut.SelectById(id2), "Assertion 4");

            film1.Stock = 0;
            sut.Update(film1);
            Assert.AreEqual(0, sut.SelectById(id1).Stock, "Assertion 5");

            sut.Delete(film2);
            Assert.IsNull(sut.SelectById(id2), "Assertion 6");
        }
Пример #10
0
 public ImageController(IBinaryResourcePathResolver resourcePathResolver, IUserRepository userRepository,
                        IFilmRepository filmRepository)
 {
     this.resourcePathResolver = resourcePathResolver;
     this.userRepository       = userRepository;
     this.filmRepository       = filmRepository;
 }
Пример #11
0
        public FilmDetailViewModel(
            IFilmRepository filmRepository,
            IMessageDialogService messageDialogService,
            IMediator mediator,
            IReviewListViewModel reviewListViewModel,
            IAddActorListViewModel addActorListViewModel,
            IAddDirectorListViewModel addDirectorListViewModel,
            IFactory <IReviewDetailViewModel> reviewDetailViewModelFactory)
        {
            _filmRepository       = filmRepository;
            _messageDialogService = messageDialogService;
            _mediator             = mediator;

            ReviewListViewModel      = reviewListViewModel;
            AddActorListViewModel    = addActorListViewModel;
            AddDirectorListViewModel = addDirectorListViewModel;

            _reviewDetailViewModelFactory = reviewDetailViewModelFactory;

            ReviewDetailViewModel = _reviewDetailViewModelFactory.Create();

            SaveCommand   = new RelayCommand(Save, CanSave);
            DeleteCommand = new RelayCommand(Delete);
            CloseReviewDetailTabCommand = new RelayCommand(OnCloseReviewDetailTabExecute);
            ActorSelectedCommand        = new RelayCommand <ActedInFilmWrapper>(OnActorSelected);
            DirectorSelectedCommand     = new RelayCommand <DirectedFilmWrapper>(OnDirectorSelected);

            mediator.Register <NewMessage <ReviewDetailWrapper> >(OnReviewNewMessage);
            mediator.Register <SelectedMessage <ReviewDetailWrapper> >(OnReviewSelected);
        }
Пример #12
0
 public StarshipViewModel(IDataService dataService, IFilmRepository filmRepository, IPeopleRepository peopleRepository)
 {
     _dataService      = dataService;
     _filmRepository   = filmRepository;
     _peopleRepository = peopleRepository;
     InitAsyncCommand  = new AsyncRelayCommand <Starship>(InitAsync);
 }
Пример #13
0
 public UserService(IUserRepository userRepository, IFilmRepository filmRepository,
                    ICommentaryRepository commentaryRepository, IReviewRepository reviewRepository)
 {
     this.userRepository       = userRepository;
     this.filmRepository       = filmRepository;
     this.commentaryRepository = commentaryRepository;
     this.reviewRepository     = reviewRepository;
 }
Пример #14
0
 //Constructor for FilmBLL using a repository with stubs (for testing)
 public MenuBLL(IGenreRepository GenreStub, IUserRepository UserStub, IFilmRepository FilmStub, IOrderRepository OrderStub, IChangeLogRepository ChangeLogStub)
 {
     this._genreRepository     = GenreStub;
     this._userRepository      = UserStub;
     this._filmRepository      = FilmStub;
     this._orderRepository     = OrderStub;
     this._changeLogRepository = ChangeLogStub;
 }
Пример #15
0
 //Constructor for FilmBLL using a repository using the DBcontext
 public MenuBLL()
 {
     this._genreRepository     = new GenreRepository();
     this._userRepository      = new UserRepository();
     this._filmRepository      = new FilmRepository();
     this._orderRepository     = new OrderRepository();
     this._changeLogRepository = new ChangeLogRepository();
 }
Пример #16
0
 public MediumService(IMediumRepository repo,
                      IMediumMapper mapper,
                      IFilmRepository frepo,
                      IMediumValidator validator) : base(repo, mapper)
 {
     _filmRepository = frepo;
     _validator      = validator;
 }
Пример #17
0
 public BookingController(IReservedSeatRepository reservedSeatRepository, IFilmRepository filmRepository, IUserRepository userRepository, ISeanceRepository seanceRepository)
 {
     _reservedSeatRepository = reservedSeatRepository;
     _filmRepository         = filmRepository;
     _userRepository         = userRepository;
     _seanceRepository       = seanceRepository;
     seatsCountInRow         = 5;
 }
Пример #18
0
 public FilmService(
     IFilmRepository filmRepository,
     IConfiguration configuration
     )
 {
     _filmRepository = filmRepository;
     _configuration  = configuration;
 }
Пример #19
0
 public HangfireKinoKopilkaParser(IFilmRepository repoFilm,
                                  IWebHostEnvironment env,
                                  IMapper mapper)
 {
     _repoFilm = repoFilm;
     _mapper   = mapper;
     _env      = env;
 }
Пример #20
0
 public FilmService(IFilmRepository repository,
                    IRatingRepository ratingRepository, IMapper mapper)
 {
     _filmRepository   = repository;
     _ratingRepository = ratingRepository;
     _mapper           = mapper;
     pageSize          = 6;
 }
Пример #21
0
 public AdminController(IFilmRepository repoFilm,
                        IWebHostEnvironment env,
                        IMapper mapper)
 {
     _repoFilm = repoFilm;
     _mapper   = mapper;
     _env      = env;
 }
Пример #22
0
 public ScreeningController(
     IFilmRepository filmRepository,
     ITheatreRepository theatreRepository,
     IScreeningManagementService screeningManagementService)
 {
     _filmRepository             = filmRepository;
     _theatreRepository          = theatreRepository;
     _screeningManagementService = screeningManagementService;
 }
Пример #23
0
 public FilmService(
     [FromServices] IFilmRepository filmRepository,
     [FromServices] ILogger <FilmService> logger,
     [FromServices] IMapper mapper)
 {
     this.filmRepository = filmRepository;
     this.logger         = logger;
     this.mapper         = mapper;
 }
Пример #24
0
 public ScreeningManagementService(
     IFilmTheatreRepository filmTheatreRepository,
     IFilmRepository filmRepository,
     ITheatreRepository theatreRepository)
 {
     _filmTheatreRepository = filmTheatreRepository;
     _filmRepository        = filmRepository;
     _theatreRepository     = theatreRepository;
 }
Пример #25
0
        public FormParent()
        {
            var container = NinjectDependencyContainer.RegisterDependency(new StandardKernel());

            _personelRepo = container.Get <IPersonelRepository>();
            _filmRepo     = container.Get <IFilmRepository>();
            _salonRepo    = container.Get <ISalonRepository>();
            InitializeComponent();
        }
 public ValidateFilmPersonExistsFilterImpl(IFilmPersonRepository repo,
                                           IFilmRepository frepo,
                                           IPersonRepository prepo)
 {
     _repository       = repo;
     _filmRepository   = frepo;
     _personRepository = prepo;
     _keyService       = new KeyService();
 }
Пример #27
0
        protected void InitializeDatabase()
        {
            // In-memory database only exists while the connection is open
            var connection = new SqliteConnection("DataSource=:memory:");

            connection.Open();
            try
            {
                var options = new DbContextOptionsBuilder <FilmContext>()
                              .UseSqlite(connection)
                              .Options;

                // Create the schema in the database
                using (var context = new FilmContext(options))
                {
                    context.Database.EnsureCreated();
                }

                // Run the test against one instance of the context
                using (var context = new FilmContext(options))
                {
                    var tiffany    = AddFilm(context, tiffanyTitle, tiffanyYear, tiffanyLength);
                    var woman      = AddFilm(context, womanTitle, womanYear, womanLength);
                    var hepburn    = AddPerson(context, hepburnFirstName, hepburnLastName, hepburnBirthdate);
                    var roberts    = AddPerson(context, robertsFirstName, robertsLastName, robertsBirthdate);
                    var tiffanyDvd = AddMedium(context,
                                               tiffany,
                                               FilmConstants.MediumType_DVD,
                                               FilmConstants.Location_Left,
                                               true);
                    var womanDvd = AddMedium(context,
                                             woman,
                                             FilmConstants.MediumType_DVD,
                                             FilmConstants.Location_Left,
                                             true);
                    var tiffanyHepburn = AddFilmPerson(context,
                                                       tiffany,
                                                       hepburn,
                                                       FilmConstants.Role_Actor);
                    var womanRoberts = AddFilmPerson(context,
                                                     woman,
                                                     roberts,
                                                     FilmConstants.Role_Actor);
                    _filmRepository       = new FilmRepository(context);
                    _personRepository     = new PersonRepository(context);
                    _mediumRepository     = new MediumRepository(context, _filmRepository);
                    _filmPersonRepository = new FilmPersonRepository(context,
                                                                     _filmRepository,
                                                                     _personRepository);
                }
            }
            finally
            {
                connection.Close();
            }
        }
Пример #28
0
 public SpecieViewModel(IDataService dataService, IFilmRepository filmRepository, IPeopleRepository peopleRepository, IVehiclesRepository vehiclesRepository, IStarshipRepository starshipRepository, IPlanetRepository planetRepository)
 {
     _dataService        = dataService;
     _filmRepository     = filmRepository;
     _peopleRepository   = peopleRepository;
     _vehiclesRepository = vehiclesRepository;
     _starshipRepository = starshipRepository;
     _planetRepository   = planetRepository;
     InitAsyncCommand    = new AsyncRelayCommand <Specie>(InitAsync);
 }
        public FormFilmIslemleri()
        {
            var container = NinjectDependencyContainer.RegisterDependency(new StandardKernel());

            _filmRepo     = container.Get <IFilmRepository>();
            _filmTuruRepo = container.Get <IFilmTuruRepository>();
            _salonRepo    = container.Get <ISalonRepository>();
            _filmService  = container.Get <IFilmService>();
            InitializeComponent();
        }
Пример #30
0
 public UnitOfWork(ApplicationContext context,
                   ISessionRepository sessionRepository,
                   IFilmRepository filmRepository,
                   ICinemaRepository cinemaRepository)
 {
     _context = context;
     Cinemas  = cinemaRepository;
     Films    = filmRepository;
     Sessions = sessionRepository;
 }
 public ApiFilmController(IFilmRepository filmRepositoryParam, IUserRepository userRepositoryParam)
 {
     filmRepository = filmRepositoryParam;
     userRepository = userRepositoryParam;
 }
Пример #32
0
 public HomeController(IFilmRepository FilmRepository)
 {
     this.FilmRepository = FilmRepository;
 }