static ApplicationContext() { _projectDir = GetProjectDirectory(); var booksPath = _projectDir + "\\Data\\book\\books.xml"; var booksMetaInfPath = _projectDir + "\\Data\\book\\meta-inf.xml"; var booksCountPath = _projectDir + "\\Data\\book\\count.xml"; var authorsPath = _projectDir + "\\Data\\author\\authors.xml"; var authorsMetaInfPath = _projectDir + "\\Data\\author\\meta-inf.xml"; var authorDocHolder = new DocumentHolder(authorsPath, authorsMetaInfPath); var bookDocHolder = new DocumentHolder(booksPath, booksMetaInfPath); _bookDao = DaoFactory.BookDao(bookDocHolder, authorDocHolder); _authorDao = DaoFactory.AuthorDao(authorDocHolder, bookDocHolder); _bookService = new BookService() { BookDao = _bookDao }; _authorService = new AuthorService() { AuthorDao = _authorDao }; _bookCounter = new BookCounter(booksCountPath); _bookArranger = new BookArranger(_projectDir + "\\Data\\book\\shelves.xml"); }
public Library(IBookDao dao) { this.catalog = new CatalogBasicImpl(dao); this.processState = new LibraryState(dao); this.users = new UsersBasicImpl(); this.events = new EventsBasicImpl(); }
public LibraryClass(IBookDao dao) { this.catalog = new Catalog(dao); this.processState = new ProcessState(dao); this.users = new Users(); this.events = new Events(); }
private void Setup() { string connectionString = ConnectionString; _authorDao = new AuthorDao(connectionString); _bookDao = new BookDao(connectionString); }
public LibraryUOW(LibraryState libData, IBookDao bDao, IUsersDao uDao, IRentalDao rDao) { libraryData = libData; booksDao = bDao; usersDao = uDao; rentalsDao = rDao; }
public AuthorDao(DBWorker dBWorker) { if (dBWorker == null) { throw new ArgumentException("dBWorker cannot be null"); } _dBWorker = dBWorker; _bookDao = DaoCache.GetBookDao(dBWorker.ConnectionString); }
public void SyncBookOrders() { var orders = this.GetOrders(); // only get orders of book var ordersOfBook = orders.Where(x => x.Type == "Book"); IBookDao bookDao = this.GetBookDao(); foreach (var order in ordersOfBook) { bookDao.Insert(order); } }
public BookLogic(IBookDao bookDao) { this._bookDao = bookDao; }
public BookController(IBookDao bookDao) { _bookDao = bookDao; }
public ProcessState(IBookDao dao) { this.dao = dao; }
public void TearDown() { this.processState = null; this.dao = null; }
internal void SetBookDao(IBookDao dao) { _dao = dao; }
public BookLogic(IBookDao bookDao) { _bookDao = bookDao; }
/* * Dependency injection via constructor injection. * We're getting an object that implements a given interface, so we're not coupling it with any concrete class. */ public CatalogBasicImpl(IBookDao dao) { this.dao = dao; }
public void Setup() { _orderServiceForTest = new OrderServiceForTest(); _mockBookDao = Substitute.For <IBookDao>(); }
public void SetUp() { this.dao = new BookDaoBasicImpl(); this.processState = new LibraryState(dao); }
public StubOrderService(IBookDao boolDao) { _bookDao = boolDao; }
public LibraryState(IBookDao dao) { this.dao = dao; }
public Catalog(IBookDao dao) { this.dao = dao; }
public BooksController(IBookDao bookDao) { this.bookDao = bookDao; }
public BookLogic(IBookDao bookDao, IBookValidationLogic bookValidation) { this.books = bookDao; this.validation = bookValidation; }
public void SetBookDao(IBookDao bookDao) { BookDao = bookDao; }
public BookManagerService(IBookDao dao, IBookDetailsRetrievalService bookDetailsRetrievalService) { _dao = dao; _bookDetailsRetrievalService = bookDetailsRetrievalService; }
internal void SetBookDao(IBookDao bookDao) { this._bookDao = bookDao; }
public BookBo(IBookDao bookDao) { this._bookDao = bookDao; }
public FakeOrderService(IBookDao fakeBookDao) { _fakeBookDao = fakeBookDao; }
public void SetBookDao(IBookDao dao) { this._dao = dao; }
public void SetUp() { this.dao = new SimpleBookDao(); this.processState = new ProcessState(dao); }
public void SetBookDao(IBookDao mockBookDao) { _dao = mockBookDao; }
public BookManager(UserInterface ui, IBookDao bookDao, IAuthorDao authorDao) : base(ui) { _bookDao = bookDao; _authorDao = authorDao; }