public SaveEmployeeCommandHandler(IEmployeeService employeeService, ICreateAttributeService createAttributeService)
        {
            ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService);
            ArgumentHelper.EnsureNotNull(nameof(createAttributeService), createAttributeService);

            _employeeService        = employeeService;
            _createAttributeService = createAttributeService;
        }
예제 #2
0
        public SaveEmployeeCommandValidator(IEmployeeService employeeService, IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService);
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

            _employeeService      = employeeService;
            _attributeInfoService = attributeInfoService;
        }
예제 #3
0
        public async Task Add(Employee employee)
        {
            ArgumentHelper.EnsureNotNull(nameof(employee), employee);

            employee.LastModified = DateTime.UtcNow;
            await _db.Employees.AddAsync(employee).ConfigureAwait(false);

            await _db.SaveChangesAsync().ConfigureAwait(false);
        }
예제 #4
0
        public EmployeeService(HrSystemDb hrSystemDb, IAccountService accountService, IDocumentService documentService)
        {
            ArgumentHelper.EnsureNotNull(nameof(hrSystemDb), hrSystemDb);
            ArgumentHelper.EnsureNotNull(nameof(accountService), accountService);
            ArgumentHelper.EnsureNotNull(nameof(documentService), documentService);

            _db              = hrSystemDb;
            _accountService  = accountService;
            _documentService = documentService;
        }
예제 #5
0
        public GetEmployeeQueryHandler(
            IEmployeeService employeeService,
            IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService);
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

            _employeeService      = employeeService;
            _attributeInfoService = attributeInfoService;
        }
예제 #6
0
        protected AttributeBase(Employee employee, AttributeInfo attributeInfo)
        {
            ArgumentHelper.EnsureNotNull("employee", employee);
            ArgumentHelper.EnsureNotNull("attributeInfo", attributeInfo);

            EmployeeLogin = employee.Login;
            Employee      = employee;

            AttributeInfoId = attributeInfo.Id;
            AttributeInfo   = attributeInfo;

            Descriminator = attributeInfo.Type;
        }
        public GetAttributesQueryHandler(IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

            _attributeInfoService = attributeInfoService;
        }
예제 #8
0
        public SaveAttributeCommandValidator(IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

            _attributeInfoService = attributeInfoService;
        }
예제 #9
0
 public void EnsureNotNull2()
 {
     ArgumentHelper.EnsureNotNull(new object(), nameof(Object));
     ArgumentHelper.EnsureNotNull(123, "number");
 }
예제 #10
0
 public void EnsureNotNull1()
 {
     try {
         ArgumentHelper.EnsureNotNull(null, null);
     } catch (ArgumentNullException) { }
 }
예제 #11
0
        public GetAttributeSavingInfoQueryValidator(IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

            _attributeInfoService = attributeInfoService;
        }
예제 #12
0
        public AttributeController(IMediator mediator)
        {
            ArgumentHelper.EnsureNotNull(nameof(mediator), mediator);

            _mediator = mediator;
        }
예제 #13
0
        public AttributeInfoService(HrSystemDb db)
        {
            ArgumentHelper.EnsureNotNull(nameof(db), db);

            _db = db;
        }