public BookRepository(IBookFactory bookFactory, IAuthorFactory authorFactory)
 {
     this.Books         = new List <IBook>();
     this.BookFactory   = bookFactory;
     this.AuthorFactory = authorFactory;
     this.LoadBooks();
 }
Exemple #2
0
 public BookManager(LibraryContext context, IBookFactory bookFac, IAuthorFactory authorFac, IGenreFactory genreFac, IPublisherFactory publisherFac)
 {
     _context      = context;
     _bookFac      = bookFac;
     _authorFac    = authorFac;
     _genreFac     = genreFac;
     _publisherFac = publisherFac;
 }
 public CreateAuthorCommandHandler(
     ICurrentUser currentUser,
     IAuthorDomainRepository authorRepository,
     IAuthorFactory authorFactory)
 {
     this.currentUser      = currentUser;
     this.authorRepository = authorRepository;
     this.authorFactory    = authorFactory;
 }
Exemple #4
0
 public AddCommand(string commandName, IRepository bookRepository, IBookFactory bookFactory, IAuthorFactory authorFactory, IReader reader, IWriter writer)
     : base(commandName)
 {
     this.BookRepository = bookRepository;
     this.BookFactory    = bookFactory;
     this.AuthorFactory  = authorFactory;
     this.Reader         = reader;
     this.Writer         = writer;
 }