public GeoDatabaseContext(IHostingEnvironment hostingEnvironment, ICommonMapper mapper, IHostingEnvironment environment, ILogger <GeoDatabaseContext> logger) { _logger = logger; _environment = environment; _mapper = mapper; }
public CommonMapperActionResult(ICommonMapper iCommonMapper, Type sourceType, Type destType, ViewResult view) { _iCommonMapper = iCommonMapper; _sourceType = sourceType; _destType = destType; View = view; }
public override void OnActionExecuted(ActionExecutedContext filterContext) { ICommonMapper mappingEngine = DependencyResolver.Current.GetService <ICommonMapper>() ?? GetDefaultMapperFor(SourceType, DestType); var filter = new CommonMapperActionFilter(mappingEngine, _sourceType, _destType); filter.OnActionExecuted(filterContext); }
/// <summary> /// Initializes a new instance of the <see cref="LanguageResourceService" /> class. /// </summary> /// <param name="defaultResourceCulture">The default resource culture.</param> protected LanguageResourceService(string defaultResourceCulture, ICommonMapper iCommonMapper) { DefaultResourceCulture = defaultResourceCulture; _iCommonMapper = iCommonMapper; //_repository = new LanguageResourceRepository(); //DefaultResourceCulture = "en-US"; }
public ProjectService(IDataContextFactory dataContextFactory, IEmployeeService employeeService, ICommonMapper commonMapper) { _context = dataContextFactory.Create(ConnectionType.Ip); _employeeService = employeeService; _commonMapper = commonMapper; _utilityCommonDbContext = _commonMapper.GetCommonDataBAseContext(); }
public SalesController(ISaleRepository orderRepository, IRegionRepository regionRepository, ICountryRepository countryRepository, IItemTypeRepository itemTypeRepository, ICommonMapper mapper, ILogger <SalesController> logger) { saleRepository = orderRepository; this.regionRepository = regionRepository; this.countryRepository = countryRepository; this.itemTypeRepository = itemTypeRepository; Mapper = mapper; this.logger = logger; }
public void Initialize() { var settings = new List <CommonMapperProfileResolutionSettings> { new CommonMapperProfileResolutionSettings { AssemblyName = Assembly.GetAssembly(typeof(ANDP.Provisioning.API.Rest.Models.ApMax.ServiceVersions)).GetName().Name, Namespace = null } }; _commonMapper = new CommonMapper(settings); }
public void Initialize() { var settings = new List <CommonMapperProfileResolutionSettings> { new CommonMapperProfileResolutionSettings { AssemblyName = Assembly.GetAssembly(typeof(ChannelLineupType)).GetName().Name, Namespace = null } }; _commonMapper = new CommonMapper(settings); }
public static object CreateInstanceAndMapAndValidate(ICommonMapper mapper, Type sourceType, Type destinationType, object source) { //Complete mapping var result = mapper.Map(source, sourceType, destinationType); MethodInfo methodInfo = destinationType.GetMethod("Validate"); //add validation logic here. if (methodInfo != null) { object isValid = methodInfo.Invoke(result, null); } return(result); }
public void OrderProfileFixture() { var settings = new List <CommonMapperProfileResolutionSettings> { new CommonMapperProfileResolutionSettings { AssemblyName = Assembly.GetAssembly(typeof(OrderProfile)).GetName().Name, Namespace = new List <string> { typeof(OrderProfile).Namespace } } }; _commonMapper = new CommonMapper(settings); }
public void TestInitialize() { var settings = new List <CommonMapperProfileResolutionSettings> { new CommonMapperProfileResolutionSettings { AssemblyName = Assembly.GetAssembly(typeof(OrderProfile)).GetName().Name, Namespace = new List <string> { typeof(OrderProfile).Namespace } } }; _commonMapper = new CommonMapper(settings); _iAndOrderEntities = new ANDP_Order_Entities(BootStrapper.AndpEntitiesBootstrapper().ToString(), "test"); _iOrderRepository = new OrderRepository(_iAndOrderEntities); }
public TechnologyController(ISkillSetService skillSetService, ICommonMapper commonMapper) { _skillSetService = skillSetService; _commonMapper = commonMapper; }
public EmployeeService(ICommonMapper commonMapper) { _commonMapper = commonMapper; }
/// <summary> /// Initializes a new instance of the <see cref="LanguageResourceService" /> class. /// </summary> /// <param name="repository">The repository.</param> /// <param name="iCommonMapper">The i common mapper.</param> /// <param name="defaultResourceCulture">The default resource culture.</param> public LanguageResourceService(ILanguageResourceRepository repository, ICommonMapper iCommonMapper, string defaultResourceCulture) { _iLanguageResourceRepository = repository; DefaultResourceCulture = defaultResourceCulture; _iCommonMapper = iCommonMapper; }
/// <summary> /// Initializes a new instance of the <see cref="LanguageResourceService" /> class. /// </summary> /// <param name="repository">The repository.</param> /// <param name="iCommonMapper">The i common mapper.</param> public LanguageResourceService(ILanguageResourceRepository repository, ICommonMapper iCommonMapper) { _iLanguageResourceRepository = repository; _iCommonMapper = iCommonMapper; DefaultResourceCulture = "en-US"; }
public StatisticController(ISaleRepository saleRepository, ICommonMapper mapper) { this.saleRepository = saleRepository; this.mapper = mapper; }
public ItemTypesController(IItemTypeRepository itemTypeRepository, ICommonMapper mapper) { this.itemTypeRepository = itemTypeRepository; Mapper = mapper; }
public RolesService(ICommonMapper commonMapper) { _mapper = commonMapper; }
public CountriesController(ICountryRepository countryRepository, ICommonMapper mapper) { this.countryRepository = countryRepository; this.mapper = mapper; }
public InstructorsController(IInstructorRepository instructorRepository, ICommonMapper mapper) { InstructorRepository = instructorRepository; Mapper = mapper; }
public static object CreateInstanceAndMap(ICommonMapper mapper, Type sourceType, Type destinationType, object source) { //Complete mapping return(mapper.Map(source, sourceType, destinationType)); }
public EquipmentService(IEquipmentRepository equipmentRepository, ICommonMapper iCommonMapper) { _equipmentRepository = equipmentRepository; _iCommonMapper = iCommonMapper; }
public CommonMapperActionFilter(ICommonMapper iCommonMapper, Type sourceType, Type destType) { _iCommonMapper = iCommonMapper; _sourceType = sourceType; _destType = destType; }
public AuditService(IAuditRepository auditRepository, ICommonMapper commonMapper) { _iAuditRepository = auditRepository; _iCommonMapper = commonMapper; }
public static TDestination CreateInstanceAndMap <TSource, TDestination>(ICommonMapper mapper, TSource source) { //Complete mapping return(mapper.Map <TSource, TDestination>(source)); }
/// <summary> /// Initializes a new instance of the <see cref="ApMaxController" /> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="commonMapper">The mapper.</param> /// <param name="oauth2AuthenticationSettings">The oauth2 authentication settings.</param> public CalixController(ILogger logger, ICommonMapper commonMapper, Oauth2AuthenticationSettings oauth2AuthenticationSettings) { _commonMapper = commonMapper; _logger = logger; _oauth2AuthenticationSettings = oauth2AuthenticationSettings; }
public static TDestination CreateInstanceAndMapAndValidate <TSource, TDestination>(ICommonMapper mapper, TSource source) { //Complete mapping TDestination result = mapper.Map <TSource, TDestination>(source); Type destinationType = result.GetType(); MethodInfo methodInfo = destinationType.GetMethod("Validate"); //add validation logic here. if (methodInfo != null) { object isValid = methodInfo.Invoke(result, null); } return(result); }
//private readonly ICommonDataBaseContext _commonDBContxt; //public SkillSetService(IDataContextFactory dataContextFactory) //{ // _context = dataContextFactory.Create(ConnectionType.Ip); //} public SkillSetService(ICommonMapper commonMapper) { _commonMapper = commonMapper; _commonDBContext = commonMapper.GetCommonDataBAseContext(); }
public OrderService(IOrderRepository iOrderRepository, IEquipmentRepository equipmentRepository, ICommonMapper iCommonMapper) { _iOrderRepository = iOrderRepository; _equipmentRepository = equipmentRepository; _iCommonMapper = iCommonMapper; }
public EngineService(IEngineRepository iEngineRepository, ICommonMapper iCommonMapper) { _iEngineRepository = iEngineRepository; _iCommonMapper = iCommonMapper; }