public ElementHelper(IDistributedCacheWrapper distributedCacheWrapper,
                      IElementMapper elementMapper,
                      IWebHostEnvironment environment,
                      IHttpContextAccessor httpContextAccessor)
 {
     _distributedCache    = distributedCacheWrapper;
     _elementMapper       = elementMapper;
     _environment         = environment;
     _httpContextAccessor = httpContextAccessor;
 }
 public MappingService(IDistributedCacheWrapper distributedCache,
                       IElementMapper elementMapper,
                       ISchemaFactory schemaFactory,
                       IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration,
                       ILogger <MappingService> logger)
 {
     _distributedCache = distributedCache;
     _elementMapper    = elementMapper;
     _schemaFactory    = schemaFactory;
     _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value;
     _logger = logger;
 }
 public MappingService(IDistributedCacheWrapper distributedCache,
                       IElementMapper elementMapper,
                       ISchemaFactory schemaFactory,
                       IWebHostEnvironment environment,
                       IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration,
                       IDetectionService detectionService,
                       ILogger <MappingService> logger)
 {
     _distributedCache = distributedCache;
     _elementMapper    = elementMapper;
     _schemaFactory    = schemaFactory;
     _environment      = environment;
     _detectionService = detectionService;
     _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value;
     _logger = logger;
 }
        /// <summary>
        /// Maps an element relationship
        /// </summary>
        /// <param name="modelInspector">The model inspector</param>
        /// <param name="member">The member to map</param>
        /// <param name="collectionRelationElementCustomizer">The property mapper </param>
        private void MapElement(IModelInspector modelInspector, PropertyPath member, IElementMapper mapper)
        {
            string columName = namingEngine.ToElementValueColumnName(member.LocalMember);

            mapper.Column(columName);
        }
Exemple #5
0
 public static void MapElement(IModelInspector modelInspector, PropertyPath member, IElementMapper map)
 {
 }
 public void InvokeCustomizers(PropertyPath member, IElementMapper mapper)
 {
     InvokeCustomizers(collectionRelationElementCustomizers, member, mapper);
 }
 public DocumentCreationHelper(IElementMapper elementMapper) => _elementMapper = elementMapper;
 protected virtual void OnBeforeMapElement(IModelInspector modelInspector, PropertyPath member, IElementMapper collectionRelationElementCustomizer)
 {
 }
Exemple #9
0
 protected virtual void OnAfterMapElement(IModelInspector modelInspector, PropertyPath member, IElementMapper collectionRelationElementCustomizer)
 {
 }
 /// <summary>
 /// Maps a mixed list of columns and formulas.
 /// </summary>
 /// <param name="mapper">The mapper.</param>
 /// <param name="columnOrFormulaMapper">The mappers for each column or formula.</param>
 /// <remarks>Replaces any previously mapped column or formula.</remarks>
 public static void ColumnsAndFormulas(
     this IElementMapper mapper,
     params Action <IColumnOrFormulaMapper>[] columnOrFormulaMapper)
 {
     CallColumnsAndFormulas(mapper, columnOrFormulaMapper);
 }
 /// <summary>
 /// Maps many formulas.
 /// </summary>
 /// <param name="mapper">The mapper.</param>
 /// <param name="formulas">The formulas to map.</param>
 /// <remarks>Replaces any previously mapped column or formula.</remarks>
 public static void Formulas(this IElementMapper mapper, params string[] formulas)
 {
     CallFormulas(mapper, formulas);
 }
Exemple #12
0
        private void MapElement(IModelInspector modelInspector, PropertyPath member, IElementMapper mapper)
        {
            string columName = namingEngine.ToElementValueColumnName(member.LocalMember);

            mapper.Column(columName);
        }