internal FieldPersistenceInfo(FieldInfo fieldInfo) { this.FieldInfo = fieldInfo; this.Location = GetFieldLocation(fieldInfo); this.Attribute = GetAttribute <StoreXmlAttribute>(fieldInfo); this.SimpleFieldAttribute = this.Attribute as StoreXmlSimpleFieldAttribute; this.FieldAttribute = this.Attribute as StoreXmlFieldAttribute; }
private static string GetFieldLocation(FieldInfo fieldInfo) { string location = null; StoreXmlAttribute locationAttribute = GetAttribute <StoreXmlAttribute>(fieldInfo); if (locationAttribute != null) { location = locationAttribute.Location ?? GetDefaultFieldLocation(fieldInfo); } return(location); }