Skip to content

Class SnakeCaseNamingConventionMetadataReader ​

Namespace: Momentum.Extensions.Data.LinqToDb
Assembly: Momentum.Extensions.dll

csharp
public class SnakeCaseNamingConventionMetadataReader : IMetadataReader

Inheritance ​

object ← SnakeCaseNamingConventionMetadataReader

Implements ​

IMetadataReader

Inherited Members ​

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors ​

SnakeCaseNamingConventionMetadataReader() ​

csharp
public SnakeCaseNamingConventionMetadataReader()

Methods ​

GetAttributes(Type) ​

Gets all mapping attributes on specified type.

csharp
public MappingAttribute[] GetAttributes(Type type)

Parameters ​

type Type

Attributes owner type.

Returns ​

MappingAttribute[]

Array of mapping attributes.

GetAttributes(Type, MemberInfo) ​

Gets all mapping attributes on specified type member.

csharp
public MappingAttribute[] GetAttributes(Type type, MemberInfo memberInfo)

Parameters ​

type Type

Member type. Could be used by some metadata providers to identify actual member owner type.

memberInfo MemberInfo

Type member for which mapping attributes should be returned.

Returns ​

MappingAttribute[]

Array of attributes.

GetDynamicColumns(Type) ​

Gets the dynamic columns defined on given type.

csharp
public MemberInfo[] GetDynamicColumns(Type type)

Parameters ​

type Type

The 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)}."

csharp
public string GetObjectID()

Returns ​

string

The object ID as string