public TypedObjectMapper <T> Map(string name, Expression <Func <T, object> > expression) { var memberExpression = expression.GetMemberExpressionOrNull(); if (memberExpression != null && memberExpression.Member.BelongsTo(Type)) { MappedMembers.Add(memberExpression.Member); } var func = expression.Compile(); _maps[name] = expression.Body.Type.IsSimpleType() ? func : t => func(t).ToJsonSuppressErrors(); return(this); }
protected ClassMappingBase(AttributeStore attributes) { this.attributes = attributes; mappedMembers = new MappedMembers(); subclasses = new List <SubclassMapping>(); }
protected ClassMappingBase() { mappedMembers = new MappedMembers(); subclasses = new List<ISubclassMapping>(); }
protected ClassMappingBase() { mappedMembers = new MappedMembers(); subclasses = new List <ISubclassMapping>(); }
protected ClassMappingBase(AttributeStore underlyingStore) { attributes = new AttributeStore<ClassMappingBase>(underlyingStore); mappedMembers = new MappedMembers(); }
protected ClassMappingBase(AttributeStore attributes) { this.attributes = attributes; mappedMembers = new MappedMembers(); subclasses = new List<SubclassMapping>(); }
public CompositeElementMapping(AttributeStore attributes) { this.attributes = attributes; mappedMembers = new MappedMembers(); }
public CompositeElementMapping(AttributeStore store) { attributes = new AttributeStore <CompositeElementMapping>(store); mappedMembers = new MappedMembers(); }