コード例 #1
0
        public ExceptionLogger(IRepository <ExceptionLog> repository, IUnitOfWork unitOfWork, ILogsFactory logsFactory)
        {
            Guard.WhenArgument(repository, "repository").IsNull().Throw();
            Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw();
            Guard.WhenArgument(logsFactory, "logsFactory").IsNull().Throw();

            this.repository  = repository;
            this.unitOfWork  = unitOfWork;
            this.logsFactory = logsFactory;
        }
コード例 #2
0
        public UserLogger(IRepository <UserLog> repository, IUnitOfWork unitOfWork, IUserProvider userProvider, ILogsFactory logsFactory)
        {
            Guard.WhenArgument(repository, "repository").IsNull().Throw();
            Guard.WhenArgument(unitOfWork, "unitOfWork").IsNull().Throw();
            Guard.WhenArgument(userProvider, "userProvider").IsNull().Throw();
            Guard.WhenArgument(logsFactory, "logsFactory").IsNull().Throw();

            this.repository   = repository;
            this.unitOfWork   = unitOfWork;
            this.userProvider = userProvider;
            this.logsFactory  = logsFactory;
        }