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

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

            _employeeService      = employeeService;
            _attributeInfoService = attributeInfoService;
        }
Beispiel #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);
        }
Beispiel #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;
        }
Beispiel #5
0
        public GetEmployeeQueryHandler(
            IEmployeeService employeeService,
            IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(employeeService), employeeService);
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

            _employeeService      = employeeService;
            _attributeInfoService = attributeInfoService;
        }
        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;
        }
Beispiel #8
0
        public SaveAttributeCommandValidator(IAttributeInfoService attributeInfoService)
        {
            ArgumentHelper.EnsureNotNull(nameof(attributeInfoService), attributeInfoService);

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

            _attributeInfoService = attributeInfoService;
        }
        public AttributeController(IMediator mediator)
        {
            ArgumentHelper.EnsureNotNull(nameof(mediator), mediator);

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

            _db = db;
        }