Beispiel #1
0
        public void AddAttributeMapper(IAttributeMapper <TContext> attributeMapper)
        {
            if (containsAttributeFor(attributeMapper.ObjectType))
            {
                throw new ArgumentException($"A attribute mapper for type '{attributeMapper.ObjectType}' is already registered in the repository '{GetType()}'.");
            }

            _allAttributes.Add(attributeMapper);
        }
Beispiel #2
0
 public void Register(Attribute attribute, IAttributeMapper mapper)
 {
     _mappers[attribute.Id] = mapper;
 }
 public XmlAttributeMapper(IPropertyMap propertyMap, IAttributeMapper <TContext> attributeMapper)
 {
     _propertyMap     = propertyMap;
     _attributeMapper = attributeMapper;
 }