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;
        }
示例#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);
 }
示例#4
0
 public IPropertyMappingProvider Visit(PropertyAttribute propertyAttribute, PropertyInfo property)
 {
     return(CreatePropertyMapping(propertyAttribute, property, _log));
 }