Ejemplo n.º 1
0
        public IssueService(IUnitOfWork unitOfWork,
                            IIssueRepository issueRepository,
                            IEmployeeRepository employeeRepository,
                            IEscalationService escalationService,
                            IProjectionBuilder projectionBuilder)
        {
            if (unitOfWork == null)
            {
                throw new ArgumentNullException(nameof(unitOfWork));
            }
            if (issueRepository == null)
            {
                throw new ArgumentNullException(nameof(issueRepository));
            }
            if (employeeRepository == null)
            {
                throw new ArgumentNullException(nameof(employeeRepository));
            }
            if (escalationService == null)
            {
                throw new ArgumentNullException(nameof(escalationService));
            }
            if (projectionBuilder == null)
            {
                throw new ArgumentNullException(nameof(projectionBuilder));
            }

            _unitOfWork         = unitOfWork;
            _issueRepository    = issueRepository;
            _employeeRepository = employeeRepository;
            _escalationService  = escalationService;
            _projectionBuilder  = projectionBuilder;
        }
Ejemplo n.º 2
0
 public UserService(IUnitOfWork unitOfWork,
                    IUserRepository userRepository,
                    IProjectionBuilder projectionBuilder,
                    IHashService hashService,
                    IGroupAddLogic groupAddLogic)
 {
     _unitOfWork        = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork));
     _userRepository    = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     _projectionBuilder = projectionBuilder ?? throw new ArgumentNullException(nameof(projectionBuilder));
     _hashService       = hashService ?? throw new ArgumentNullException(nameof(hashService));
     _groupAddLogic     = groupAddLogic ?? throw new ArgumentNullException(nameof(groupAddLogic));
 }
Ejemplo n.º 3
0
        public EmployeeService(IUnitOfWork unitOfWork,
                               IEmployeeRepository employeeRepository,
                               IProjectionBuilder projectionBuilder)
        {
            if (unitOfWork == null)
            {
                throw new ArgumentNullException(nameof(unitOfWork));
            }
            if (employeeRepository == null)
            {
                throw new ArgumentNullException(nameof(employeeRepository));
            }
            if (projectionBuilder == null)
            {
                throw new ArgumentNullException(nameof(projectionBuilder));
            }

            _unitOfWork         = unitOfWork;
            _employeeRepository = employeeRepository;
            _projectionBuilder  = projectionBuilder;
        }
Ejemplo n.º 4
0
 public static Expression <Func <TSource, TDestination> > GetMapExpression <TSource, TDestination>(this IProjectionBuilder expressionBuilder) =>
 (Expression <Func <TSource, TDestination> >)expressionBuilder.GetProjection(typeof(TSource), typeof(TDestination), null, Array.Empty <MemberPath>()).Projection;
Ejemplo n.º 5
0
 public ProjectionExpression(IQueryable source, IConfigurationProvider configuration)
 {
     _source  = source;
     _builder = configuration.Internal().ProjectionBuilder;
 }