public PropertyPart Map <TProperty>(string key)
        {
            var property    = new DummyPropertyInfo(key, typeof(TProperty));
            var propertyMap = new PropertyPart(property.ToMember(), typeof(T));

            properties.Add(propertyMap);

            return(propertyMap);
        }
Beispiel #2
0
        /// <summary>
        /// Map a property
        /// </summary>
        /// <param name="key">Dictionary key</param>
        /// <typeparam name="TProperty">Property type</typeparam>
        /// <example>
        /// Map&lt;int&gt;("Age");
        /// </example>
        public PropertyBuilder Map <TProperty>(string key)
        {
            var property        = new DummyPropertyInfo(key, typeof(TProperty));
            var propertyMapping = new PropertyMapping();
            var builder         = new PropertyBuilder(propertyMapping, typeof(T), property.ToMember());

            properties.Add(new PassThroughMappingProvider(propertyMapping));

            return(builder);
        }