示例#1
0
        public void ConfirmBorrowing(BorrowingConfirmation confirmation)
        {
            string message = string.Format("{0} was borrowed {1} for {2} days."
                                           , confirmation.Title
                                           , confirmation.ReaderFullname
                                           , confirmation.Duration);

            Console.WriteLine(message);
        }
        public void ConfirmBorrowing(BorrowingConfirmation confirmation)
        {
            string message = string.Format("{0} was borrowed {1} for {2} days."
                                           , confirmation.Title
                                           , confirmation.ReaderFullname
                                           , confirmation.Duration);


            View.InfoMessageValue = message;
        }
示例#3
0
        public void Handle(BorrowBookCommand command)
        {
            Reader reader = repository.FindReader(command.ReaderCardId);

            Book book = repository.FindBook(command.BookIsbn);

            Borrowing borrowing = create.Borrowing(reader, book,
                                                   command.StartDate,
                                                   command.BorrowingDuration);

            repository.Store(borrowing);

            BorrowingConfirmation confirmation
                = BorrowingConfirmation.With
                  .Title(book.Title)
                  .Author(book.Author)
                  .ReaderFullname(reader.Fullname)
                  .BorrowingDuration(command.BorrowingDuration)
                  .Get;

            _presenter.ConfirmBorrowing(confirmation);
        }
 public void ConfirmBorrowing(BorrowingConfirmation confirmation)
 {
     _counter++;
 }