public SimpleMemberMap <TObj, TProperty> ToContent() { isContent = true; _simpleMemberMap = new SimpleMemberMap <TObj, TProperty>(_property); return(_simpleMemberMap); }
public SimpleMemberMap <TObj, TProperty> ToAttribute(XName name, bool required) { isAttribute = true; _name = name; _required = required; _simpleMemberMap = new SimpleMemberMap <TObj, TProperty>(_property); return(_simpleMemberMap); }
public SimpleMemberMap <TObj, TProperty> ToSimpleElement(XName name, bool required) { isSimpleElement = true; _name = name; _required = required; _simpleMemberMap = new SimpleMemberMap <TObj, TProperty>(_property); return(_simpleMemberMap); }
public SimpleMemberMap <TObj, TProperty> ToAttribute(XName name, bool required, string defaultValue, bool writeDefault) { if (String.IsNullOrEmpty(defaultValue)) { throw new MappingException("defaultValue cannot be null or empty. ObjectType '{0}' PropertyType '{1}'.", typeof(TObj).Name, typeof(TProperty).Name); } isAttribute = true; _name = name; _required = required; _defaultValue = defaultValue; _writeDefault = writeDefault; _simpleMemberMap = new SimpleMemberMap <TObj, TProperty>(_property); return(_simpleMemberMap); }