private static PropertyMappingProvider CreatePropertyMapping(PropertyAttribute propertyAttribute, PropertyInfo property)
        {
            PropertyMappingProvider propertyMappingProvider;
            if (propertyAttribute.Uri != null)
            {
                propertyMappingProvider = new PropertyMappingProvider(propertyAttribute.Uri, property);
            }
            else
            {
                propertyMappingProvider = new PropertyMappingProvider(propertyAttribute.Prefix, propertyAttribute.Term, property);
            }

            if (propertyAttribute.ConverterType != null)
            {
                propertyMappingProvider.ConverterType = propertyAttribute.ConverterType;
            }

            return propertyMappingProvider;
        }
Ejemplo n.º 2
0
        private static PropertyMappingProvider CreatePropertyMapping(PropertyAttribute propertyAttribute, PropertyInfo property, ILogger log)
        {
            PropertyMappingProvider propertyMappingProvider;

            if (propertyAttribute.Uri != null)
            {
                propertyMappingProvider = new PropertyMappingProvider(propertyAttribute.Uri, property, log);
            }
            else
            {
                propertyMappingProvider = new PropertyMappingProvider(propertyAttribute.Prefix, propertyAttribute.Term, property, log);
            }

            if (propertyAttribute.ConverterType != null)
            {
                propertyMappingProvider.ConverterType = propertyAttribute.ConverterType;
            }

            return(propertyMappingProvider);
        }
 public IPropertyMappingProvider Visit(PropertyAttribute propertyAttribute, PropertyInfo property)
 {
     return CreatePropertyMapping(propertyAttribute, property);
 }
Ejemplo n.º 4
0
 public IPropertyMappingProvider Visit(PropertyAttribute propertyAttribute, PropertyInfo property)
 {
     return(CreatePropertyMapping(propertyAttribute, property, _log));
 }