C# 클래스 MicroLite.Mapping.PocoObjectInfo

상속: IObjectInfo
파일 보기 프로젝트 열기: TrevorPilley/MicroLite 1 사용 예제들

공개 메소드들

메소드 설명
CreateInstance ( IDataReader reader ) : object

Creates a new instance of the type populated with the values from the specified IDataReader.

GetColumnInfo ( string columnName ) : ColumnInfo

Gets the column information for the column with the specified name.

GetIdentifierValue ( object instance ) : object

Gets the property value for the object identifier.

GetInsertValues ( object instance ) : SqlArgument[]

Gets the insert values for the specified instance.

GetUpdateValues ( object instance ) : SqlArgument[]

Gets the update values for the specified instance.

HasDefaultIdentifierValue ( object instance ) : bool

Determines whether the specified instance has the default identifier value.

IsDefaultIdentifier ( object identifier ) : bool

Determines whether the specified identifier value is the default identifier value.

PocoObjectInfo ( Type forType, TableInfo tableInfo ) : System

Initialises a new instance of the PocoObjectInfo class.

SetIdentifierValue ( object instance, object identifier ) : void

Sets the property value for the object identifier to the supplied value.

VerifyInstanceForInsert ( object instance ) : void

Verifies the instance can be inserted.

비공개 메소드들

메소드 설명
VerifyIdentifierMapped ( ) : void
VerifyInstanceIsCorrectTypeForThisObjectInfo ( object instance ) : void

메소드 상세

CreateInstance() 공개 메소드

Creates a new instance of the type populated with the values from the specified IDataReader.
Thrown if reader is null.
public CreateInstance ( IDataReader reader ) : object
reader IDataReader The IDataReader containing the values to build the instance from.
리턴 object

GetColumnInfo() 공개 메소드

Gets the column information for the column with the specified name.
public GetColumnInfo ( string columnName ) : ColumnInfo
columnName string Name of the column.
리턴 ColumnInfo

GetIdentifierValue() 공개 메소드

Gets the property value for the object identifier.
Thrown if instance is null. Thrown if the instance is not of the correct type.
public GetIdentifierValue ( object instance ) : object
instance object The instance to retrieve the value from.
리턴 object

GetInsertValues() 공개 메소드

Gets the insert values for the specified instance.
Thrown if instance is null. Thrown if the instance is not of the correct type.
public GetInsertValues ( object instance ) : SqlArgument[]
instance object The instance to retrieve the values from.
리턴 SqlArgument[]

GetUpdateValues() 공개 메소드

Gets the update values for the specified instance.
Thrown if instance is null. Thrown if the instance is not of the correct type.
public GetUpdateValues ( object instance ) : SqlArgument[]
instance object The instance to retrieve the values from.
리턴 SqlArgument[]

HasDefaultIdentifierValue() 공개 메소드

Determines whether the specified instance has the default identifier value.
Thrown if instance is null. Thrown if the instance is not of the correct type.
public HasDefaultIdentifierValue ( object instance ) : bool
instance object The instance to verify.
리턴 bool

IsDefaultIdentifier() 공개 메소드

Determines whether the specified identifier value is the default identifier value.
public IsDefaultIdentifier ( object identifier ) : bool
identifier object The identifier value to verify.
리턴 bool

PocoObjectInfo() 공개 메소드

Initialises a new instance of the PocoObjectInfo class.
/// Thrown if forType or tableInfo are null. ///
public PocoObjectInfo ( Type forType, TableInfo tableInfo ) : System
forType System.Type The type the object info relates to.
tableInfo TableInfo The table info.
리턴 System

SetIdentifierValue() 공개 메소드

Sets the property value for the object identifier to the supplied value.
Thrown if instance is null. Thrown if the instance is not of the correct type.
public SetIdentifierValue ( object instance, object identifier ) : void
instance object The instance to set the value for.
identifier object The value to set as the identifier property.
리턴 void

VerifyInstanceForInsert() 공개 메소드

Verifies the instance can be inserted.
Thrown if instance is null. /// Thrown if the instance is not of the correct type or its state is invalid for the specified StatementType. ///
public VerifyInstanceForInsert ( object instance ) : void
instance object The instance to verify.
리턴 void