Beispiel #1
0
 public AbstractCommand(IMovieDbContext context, IMovieFactory factory, IReader reader, IWriter writer)
 {
     this.context = context;
     this.factory = factory;
     this.reader  = reader;
     this.writer  = writer;
 }
        public MovieService(
            IRepository <Movie> movieRepository,
            IUnitOfWork unitOfWork,
            IMovieFactory movieFactory,
            IProducerService producerService,
            IStudioService studioService,
            IGenreService genreService,
            IBookService bookService,
            IStarService starService)
        {
            if (movieRepository == null)
            {
                throw new ArgumentNullException("Movie repository cannot be null!");
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException("Unit of work cannot be null!");
            }

            if (movieFactory == null)
            {
                throw new ArgumentNullException("Movie factory cannot be null!");
            }

            if (producerService == null)
            {
                throw new ArgumentNullException("Producer service cannot be null!");
            }

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

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

            if (bookService == null)
            {
                throw new ArgumentNullException("Book service cannot be null!");
            }

            if (starService == null)
            {
                throw new ArgumentNullException("Star service cannot be null!");
            }

            this.movieRepository = movieRepository;
            this.unitOfWork      = unitOfWork;
            this.movieFactory    = movieFactory;
            this.producerService = producerService;
            this.studioService   = studioService;
            this.genreService    = genreService;
            this.bookService     = bookService;
            this.starService     = starService;
        }
 /// <summary>
 /// Initializes a new instance of <see cref="SimpleMediaLibrary"/> class
 /// </summary>
 /// <param name="critic">Critic to use</param>
 /// <param name="posterService"></param>
 /// <param name="factory"></param>
 public SimpleMediaLibrary(IMovieCritic critic, 
     IPosterService posterService,
     IMovieFactory factory)
 {
     _critic = critic;
     _posterService = posterService;
     _factory = factory;
 }
Beispiel #4
0
 public MovieService(IContext context, IRequestMessageProvider requestMessageProvider, ICustomException customException,
                     IMovieFactory movieFactory, ICategoryFactory categoryFactory, IPersonFactory personFactory)
     : base(context, requestMessageProvider, customException)
 {
     _movieFactory    = movieFactory;
     _categoryFactory = categoryFactory;
     _personFactory   = personFactory;
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of <see cref="MovieLibrary"/> class.
 /// </summary>
 /// <param name="critic">Critic to use</param>
 /// <param name="posterService">Poster service to use</param>
 /// <param name="factory">Factory to create new movies</param>
 public MovieLibrary(IMovieCritic critic, 
     IPosterService posterService, 
     IMovieFactory factory)
     : this(critic)
 {
     this._posterService = posterService;
     this._factory = factory;
 }
 protected override void WhenIRun()
 {
     this._factory = this.Sut.Resolve<IMovieFactory>();
 }
 public MoviesController(IMovieFactory movieFactory, IRatingFactory ratingFactory)
 {
     _movieFactory  = movieFactory;
     _ratingFactory = ratingFactory;
 }
 public CreatePersonCommand(IMovieDbContext context, IMovieFactory factory, IReader reader, IWriter writer)
     : base(context, factory, reader, writer)
 {
 }
Beispiel #9
0
 protected override void WhenIRun()
 {
     this._factory = this.Sut.Resolve <IMovieFactory>();
 }
 public SimpleMovieRepository(IMovieFactory factory)
 {
     _factory = factory;
 }
 /// <summary>
 /// Initializes a new instances of <see cref="SimpleMovieLibrary"/> class.
 /// </summary>
 /// <param name="posterService">Service to find the poster</param>
 /// <param name="factory">Factory to import the movies</param>
 /// <param name="critic">Critic to filter movies</param>
 public SimpleMovieLibrary(IPosterService posterService, IMovieFactory factory, IMovieCritic critic)
 {
     _posterService = posterService;
     _critic = critic;
     _factory = factory;
 }
Beispiel #12
0
 public RemoveMovieCommand(IMovieDbContext context, IMovieFactory factory, IReader reader, IWriter writer)
     : base(context, factory, reader, writer)
 {
 }
Beispiel #13
0
 public MovieService(IUnitOfWork unitOfWork, IMovieFactory movieFactory, IDirectoryFactory directoryFactory)
 {
     _uow              = unitOfWork;
     _movieFactory     = movieFactory;
     _directoryFactory = directoryFactory;
 }
Beispiel #14
0
 public SimpleMovieRepository(IMovieFactory factory)
 {
     _factory = factory;
 }
Beispiel #15
0
 public MovieRepository(IMovieDao movieDao, IMovieFactory movieFactory)
 {
     _movieDao     = movieDao;
     _movieFactory = movieFactory;
 }
 /// <summary>
 /// Initializes a new instances of <see cref="SimpleMovieLibrary"/> class.
 /// </summary>
 /// <param name="posterService">Service to find the poster</param>
 /// <param name="factory">Factory to import the movies</param>
 /// <param name="critic">Critic to filter movies</param>
 public SimpleMovieLibrary(IPosterService posterService, IMovieFactory factory, IMovieCritic critic)
 {
     _posterService = posterService;
     _critic        = critic;
     _factory       = factory;
 }
 public RatingsController(IRatingFactory ratingFactory, IMovieFactory movieFactory, IUserFactory userFactory)
 {
     _ratingFactory = ratingFactory;
     _movieFactory  = movieFactory;
     _userFactory   = userFactory;
 }
Beispiel #18
0
 public ListSeriesCommand(IMovieDbContext context, IMovieFactory factory, IReader reader, IWriter writer)
     : base(context, factory, reader, writer)
 {
 }
Beispiel #19
0
 public MovieApi(IMovieFactory movieFactory, IMovieMetaData movieMetaData)
 {
     _movieFactory  = movieFactory;
     _movieMetaData = movieMetaData;
 }
Beispiel #20
0
 /// <summary>
 /// Initializes the controller
 /// </summary>
 /// <param name="library">Library to use</param>
 /// <param name="factory">Factory to create movies</param>
 public MoviesController(IMediaLibrary library, IMovieFactory factory)
 {
     _library = library;
     _factory = factory;
 }
Beispiel #21
0
 public PDFExportCommand(IMovieDbContext context, IMovieFactory factory, IReader reader, IWriter writer) : base(context, factory, reader, writer)
 {
 }