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;
        }