Class FluentMetadataReader
public class FluentMetadataReader : IMetadataReader
- Inheritance
-
FluentMetadataReader
- Implements
- Extension Methods
Constructors
FluentMetadataReader(IReadOnlyDictionary<Type, List<MappingAttribute>>, IReadOnlyDictionary<MemberInfo, List<MappingAttribute>>, IReadOnlyList<MemberInfo>)
public FluentMetadataReader(IReadOnlyDictionary<Type, List<MappingAttribute>> typeAttributes, IReadOnlyDictionary<MemberInfo, List<MappingAttribute>> memberAttributes, IReadOnlyList<MemberInfo> orderedMembers)
Parameters
typeAttributesIReadOnlyDictionary<Type, List<MappingAttribute>>memberAttributesIReadOnlyDictionary<MemberInfo, List<MappingAttribute>>orderedMembersIReadOnlyList<MemberInfo>
Methods
GetAttributes(Type)
Gets all mapping attributes on specified type.
public MappingAttribute[] GetAttributes(Type type)
Parameters
typeTypeAttributes owner type.
Returns
- MappingAttribute[]
Array of mapping attributes.
GetAttributes(Type, MemberInfo)
Gets all mapping attributes on specified type member.
public MappingAttribute[] GetAttributes(Type type, MemberInfo memberInfo)
Parameters
typeTypeMember type. Could be used by some metadata providers to identify actual member owner type.
memberInfoMemberInfoType member for which mapping attributes should be returned.
Returns
- MappingAttribute[]
Array of attributes.
GetDynamicColumns(Type)
Gets the dynamic columns defined on given type.
public MemberInfo[] GetDynamicColumns(Type type)
Parameters
typeTypeThe type.
Returns
- MemberInfo[]
All dynamic columns defined on given type.
GetObjectID()
Should return a unique ID for cache purposes. If the implemented Metadata reader returns instance-specific data you'll need to calculate a unique value based on content. Otherwise just use a static const e.g. $".{nameof(YourMetadataReader)}."
public string GetObjectID()
Returns
- string
The object ID as string
GetRegisteredTypes()
Gets all types, registered by by current fluent mapper.
public IEnumerable<Type> GetRegisteredTypes()
Returns
- IEnumerable<Type>
Returns array with all types, mapped by current fluent mapper.