/// <summary> /// Initializes a new instance of the <see cref="MassTerminateController"/> class. /// </summary> public MassTerminateController(IDataFactory dataFactory, IAuthorizationProvider authorization, IMappingFactory mapFactory) { this.DataFactory = dataFactory; this.Authorization = authorization; this._mapFactory = mapFactory; }
public TrackManager(ITrackRepository trackRepository, IMappingFactory <Track, TrackModel, TrackModel> trackMapper, IPermissionManager permissionManager) { _trackRepository = trackRepository; _trackMapper = trackMapper; _permissionManager = permissionManager; }
public MappingEngine(ISectionProvider sectionProvider, ITypeFactory typeFactory, IMappingFactory mappingFactory, IStrategyManager strategyManager) { _sectionProvider = sectionProvider; _typeFactory = typeFactory; _mappingFactory = mappingFactory; _strategyManager = strategyManager; }
public UsersManager(IUsersRepository userRepository, IMappingFactory <User, UserModel, UserModel> usersMapper, IMappingFactory <User, UserMeModel, UserMeModel> userMeMapper, IPermissionManager permissionManager) { _usersRepository = userRepository; _usersMapper = usersMapper; _userMeMapper = userMeMapper; _permissionManager = permissionManager; }
/// <summary> /// Initializes a new instance of the <see cref="MassRehireController"/> class. /// </summary> public MassRehireController(IDataFactory factory, IAuthorizationProvider authorization, IMappingFactory mapper) { this.dataFactory = factory; this.authorizationProvider = authorization; this._mapFactory = mapper; }
public MappingStore( IIntersectionAnalyzer <TypeModel, PropertyInfoField, TypeModel, PropertyInfoField> intersectionAnalyzer = null, IMappingFactory <TypeModel, PropertyInfoField, TypeModel, PropertyInfoField> mappingFactory = null ) { _intersectionAnalyzer = intersectionAnalyzer ?? new TypeToTypeIntersectionAnalyzer(); _mappingFactory = mappingFactory ?? new TypeToTypeMappingFactory(); }
/// <summary> /// Initializes a new instance of <see cref="Downloader"/> /// </summary> /// <param name="mappingFactory">Mapping factory</param> /// <param name="metadataInserterFactory">Metadata inserter factory</param> /// <param name="queryService">Query service</param> public Downloader(IMappingFactory mappingFactory, IMetadataInserterFactory metadataInserterFactory, IQueryService queryService) { _mappingFactory = mappingFactory; _metadataInserterFactory = metadataInserterFactory; _queryService = queryService; }
public AttendanceManager(IAttendanceRepository attendanceRepository, IMappingFactory <Attendance, AttendanceModel, AttendanceModel> attendanceMapper, IEmployeeManager employeeManager, ITrackManager trackManager, IPermissionManager permissionManager) { _attendanceRepository = attendanceRepository; _attendanceMapper = attendanceMapper; _employeeManager = employeeManager; _trackManager = trackManager; _permissionManager = permissionManager; }
public ChangeRequestManager(IChangeRequestRepository changeRequestRepository, IMappingFactory <ChangeRequest, DeviceChangeRequestModel, DeviceChangeRequestModel> deviceChangeRequestMapper, IPermissionManager permissionManager, IEmployeeRepository employeeRepository) { _changeRequestRepository = changeRequestRepository; _deviceChangeRequestMapper = deviceChangeRequestMapper; _permissionManager = permissionManager; _employeeRepository = employeeRepository; }
public MapperProfile AddMappingFactory(IMappingFactory factory) { if (factory is null) { throw new ArgumentNullException(nameof(factory)); } factories.Add(factory); return(this); }
public static IMappingFactory RegisterWith(this IMappingFactory factory, IServiceCollection services) { foreach (var mappingInstance in factory.GetAll()) { var mappingInterfaceType = mappingInstance.GetType().GetInterfaces().First(); services.AddSingleton(mappingInterfaceType, mappingInstance); } return(factory); }
protected IEnumerable <TTarget> ConvertInternal(IEnumerable <TSource> from, IMappingFactory mappingFactory) { var source = from?.ToList() ?? new List <TSource>(0); if (!source.Any()) { return(null); } var mapper = mappingFactory.Create <TSource, TTarget>(); return(mapper == null ? null : source.Select(item => mapper.Map(item)).ToList()); }
public EmployeeManager(IEmployeeRepository employeeRepository, IMappingFactory <Employee, EmployeeListModel, EmployeeModel> employeeMapper, IPermissionManager permissionManager, IMappingFactory <Employee, EmployeeUpdateModel, EmployeeUpdateModel> employeeUpdateMapper, IMappingFactory <Employee, EmployeeRegisterModel, EmployeeRegisterModel> employeeRegisterMapper, IShiftHistoryManager shiftHistroyManager) { _employeeRepository = employeeRepository; _employeeMapper = employeeMapper; _permissionManager = permissionManager; _employeeUpdateMapper = employeeUpdateMapper; _employeeRegisterMapper = employeeRegisterMapper; _shiftHistroyManager = shiftHistroyManager; _applicationRepository = new ApplicationRepository(); }
/// <summary> /// Initializes a new instance of <see cref="Uploader"/> /// </summary> /// <param name="imageDataProvider">Image data provider</param> /// <param name="mappingFactory">Mapping factory</param> /// <param name="metadataExtractorFactory">Metadata extractor factory</param> /// <param name="builderService">Builder service</param> /// <param name="publishingService">Publishing service</param> /// <param name="imageWriteService">Image write service</param> /// <param name="writeService">Write service</param> public Uploader(IImageDataProvider imageDataProvider, IMappingFactory mappingFactory, IMetadataExtractorFactory metadataExtractorFactory, IBuilderService builderService, IPublishingService publishingService, IImageWriteService imageWriteService, IWriteService writeService) { _imageDataProvider = imageDataProvider; _mappingFactory = mappingFactory; _metadataExtractorFactory = metadataExtractorFactory; _builderService = builderService; _publishingService = publishingService; _imageWriteService = imageWriteService; _writeService = writeService; }
public void InitializeMassRehireController() { //Mock the repository var repository = new Mock <IStagingRepository <MassRehireModelSerialized> >(MockBehavior.Strict); var qRepo = new Mock <IQueueRepository>(MockBehavior.Strict); repository.Setup(r => r.SetDataAsync(It.IsAny <UserContext>(), It.IsAny <List <MassRehireModelSerialized> >())) .ReturnsAsync(new List <DataloadBatch>() { new DataloadBatch { BatchID = Guid.NewGuid(), JobID = Guid.NewGuid() } }); qRepo.Setup(r => r.PushDataAsync(It.IsAny <IEnumerable <DataloadBatch> >())) .ReturnsAsync(true); //Mock data factory dataFactory = new Mock <IDataFactory>(MockBehavior.Strict); dataFactory.Setup(d => d.GetMassRehireRepository()).Returns(repository.Object); dataFactory.Setup(d => d.GetQueueRepository()).Returns(qRepo.Object); //Mock Auth authorization = new Mock <IAuthorizationProvider>(MockBehavior.Strict); authorization.Setup(s => s.IsAuthorized(It.IsIn <string>(new List <string>() { ValidGroupID }))).Returns(true); //Mock Mapper mappingFactory = new MappingFactory(); models.Add(new MassRehireModel { EmployeeNumber = "abc" }); //Serializedmodels = mappingFactory.Mapper.Map<List<MassRehireModelSerialized>>(models); }
private MappingView(IEnumerable <TSource> source, IScheduler scheduler, IMappingFactory <TSource, TResult> factory, params IObservable <object>[] triggers) { Ensure.NotNull(source, nameof(source)); Ensure.NotNull(source as INotifyCollectionChanged, "source"); Ensure.NotNull(factory, nameof(factory)); this.source = source; this.factory = factory; this.mapped.AddRange(source.Select(this.GetOrCreateValue)); this.updateSubscription.Add(ThrottledRefresher.Create(this, source, TimeSpan.Zero, scheduler, false) .ObserveOn(scheduler ?? Scheduler.Immediate) .Subscribe(this.OnSourceCollectionChanged)); if (triggers != null && triggers.Any(t => t != null)) { var triggerSubscription = triggers.Merge() .ObserveOn(scheduler ?? Scheduler.Immediate) .Subscribe(_ => this.Refresh()); this.updateSubscription.Add(triggerSubscription); } this.SetSource(this.mapped); }
public ShiftHistoryManager(IShiftHistoryRepository shiftHistroryRepository, IMappingFactory <ShiftEmployeeHistory, ShiftHistoryModel, ShiftHistoryModel> shiftHistoryMapper, IPermissionManager permissionManager) { _shiftHistroryRepository = shiftHistroryRepository; _shiftHistoryMapper = shiftHistoryMapper; _permissionManager = permissionManager; }
public void SetUp() { TypeFactoryMock = new Mock <ITypeFactory>(); MappingFactory = new MappingFactory(TypeFactoryMock.Object); }
public ShiftManager(IShiftRepository shiftRepository, IMappingFactory <Shift, ShiftModel, ShiftModel> shiftMapper, IPermissionManager permissionManager) { _shiftRepository = shiftRepository; _shiftMapper = shiftMapper; _permissionManager = permissionManager; }
public HolidayManager(IHolidayRepository holidayRepository, IMappingFactory <Holiday, HolidayModel, HolidayModel> holidayMapper, IPermissionManager permissionManager) { _holidayRepository = holidayRepository; _holidayMapper = holidayMapper; _permissionManager = permissionManager; }
public ModelMapper(IMappingFactory mappingFactory) { modelMapping = mappingFactory.CreateReversible<Model, ViewModel>() //.For(x => x.BasicProperty).MapFrom(x => x.BasicProperty) .Build(); }
public ClientManager(IClientRepository clientRepository, IMappingFactory <Client, ClientModel, ClientModel> clientMapper, IPermissionManager permissionManager) { _clientRepository = clientRepository; _clientMapper = clientMapper; _permissionManager = permissionManager; }
public PlaceManager(IPlaceRepository placeRepository, IMappingFactory <Place, PlaceModel, PlaceModel> placeMapper, IPermissionManager permissionManager) { _placeRepository = placeRepository; _placeMapper = placeMapper; _permissionManager = permissionManager; }
public EmployeeMappingFactory(IMappingFactory <Shift, ShiftModel, ShiftModel> shiftMapper) { _shiftMapper = shiftMapper; }
public TestUserToUserViewMapper(IMappingFactory mappingFactory) { }
public DepartmentManager(IDepartmentRepository departmentRepository, IMappingFactory <Department, DepartmentModel, DepartmentModel> departmentMapper, IPermissionManager permissionManager) { _departmentRepository = departmentRepository; _departmentMapper = departmentMapper; _permissionManager = permissionManager; }
public LeaveManager(ILeaveRepository leaveRepository, IMappingFactory <Leave, LeaveModel, LeaveModel> leaveMapper, IPermissionManager permissionManager) { _leaveRepository = leaveRepository; _leaveMapper = leaveMapper; _permissionManager = permissionManager; }
public BeaconManager(IBeaconRepository beaconRepository, IMappingFactory <Beacon, BeaconModel, BeaconModel> beaconMapper, IPermissionManager permissionManager) { _beaconRepository = beaconRepository; _beaconMapper = beaconMapper; _permissionManager = permissionManager; }