Table of Contents

Class MemberAccessor

Namespace
FluentCommand.Reflection
Assembly
FluentCommand.dll

A base class for member accessors.

public abstract class MemberAccessor : IMemberAccessor, IMemberInformation, IEquatable<IMemberAccessor>
Inheritance
MemberAccessor
Implements
Derived
Inherited Members

Constructors

MemberAccessor(MemberInfo)

Initializes a new instance of the MemberAccessor class.

protected MemberAccessor(MemberInfo memberInfo)

Parameters

memberInfo MemberInfo

Properties

Column

Gets the database column name that a property is mapped to

public string Column { get; }

Property Value

string

The database column name that a property is mapped to

ColumnOrder

Gets the zero-based order of the column the property is mapped to

public int? ColumnOrder { get; }

Property Value

int?

The zero-based order of the column the property is mapped to

ColumnType

Gets the database provider specific data type of the column the property is mapped to

public string ColumnType { get; }

Property Value

string

The database provider specific data type of the column the property is mapped to

ForeignKey

Gets a value indicating the name of the associated navigation property or associated foreign key(s)

public string ForeignKey { get; }

Property Value

string

A value indicating the name of the associated navigation property or associated foreign key(s)

HasGetter

Gets a value indicating whether this member has getter.

public abstract bool HasGetter { get; }

Property Value

bool

true if this member has getter; otherwise, false.

HasSetter

Gets a value indicating whether this member has setter.

public abstract bool HasSetter { get; }

Property Value

bool

true if this member has setter; otherwise, false.

IsConcurrencyCheck

Gets a value indicating that this property participates in optimistic concurrency check

public bool IsConcurrencyCheck { get; }

Property Value

bool

true if this property participates in optimistic concurrency check; otherwise, false.

IsDatabaseGenerated

Gets a value indicating that this property is database generated

public bool IsDatabaseGenerated { get; }

Property Value

bool

true if this property is database generated; otherwise, false.

IsKey

Gets a value indicating that this property is the unique identify for the entity

public bool IsKey { get; }

Property Value

bool

true if this instance is key; otherwise, false.

IsNotMapped

Gets a value indicating that this property is the unique identify for the entity

public bool IsNotMapped { get; }

Property Value

bool

true if this property is key; otherwise, false.

MemberInfo

Gets the MemberInfo for the accessor.

public MemberInfo MemberInfo { get; }

Property Value

MemberInfo

The member info.

MemberType

Gets the Type of the member.

public abstract Type MemberType { get; }

Property Value

Type

The Type of the member.

Name

Gets the name of the member.

public abstract string Name { get; }

Property Value

string

The name of the member.

Methods

Equals(IMemberAccessor)

Determines whether the specified IMemberAccessor is equal to this instance.

public bool Equals(IMemberAccessor other)

Parameters

other IMemberAccessor

The IMemberAccessor to compare with this instance.

Returns

bool

true if the specified IMemberAccessor is equal to this instance; otherwise, false.

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GetValue(object)

Returns the value of the member.

public abstract object GetValue(object instance)

Parameters

instance object

The object whose member value will be returned.

Returns

object

The member value for the instance parameter.

SetValue(object, object)

Sets the value of the member.

public abstract void SetValue(object instance, object value)

Parameters

instance object

The object whose member value will be set.

value object

The new value for this member.