示例#1
0
        public TimeTrackingService(UserAccount currentUser, ICqrs cqrs)
        {
            if (currentUser == null)
            {
                throw new ArgumentNullException("currentUser");
            }
            if (cqrs == null)
            {
                throw new ArgumentNullException("cqrs");
            }

            _currentUser = currentUser;
            _cqrs        = cqrs;
        }
        public InvoiceService(ICqrs cqrs, UserAccount currentUser, IInvoiceRepository invoiceRepository)
        {
            if (cqrs == null)
            {
                throw new ArgumentNullException("cqrs");
            }
            if (currentUser == null)
            {
                throw new ArgumentNullException("currentUser");
            }
            if (invoiceRepository == null)
            {
                throw new ArgumentNullException("invoiceRepository");
            }

            _cqrs              = cqrs;
            _currentUser       = currentUser;
            _invoiceRepository = invoiceRepository;
        }