C# Класс Candor.Data.DataRecordExtensions

Methods to get a data record row value cast to the desired type.
Показать файл Открыть проект

Открытые методы

Метод Описание
FieldIndex ( this record, string name ) : int

Gets the index of a field of a specific name in a record.

GetBoolean ( object fieldValue, bool defaultValue ) : bool

Gets a value from a database field value or output parameter.

GetBoolean ( this record, string name, bool defaultValue ) : bool

Gets a field value from a record.

GetBoolean ( this record, string name, bool defaultValue, bool ignoreErrors ) : bool

Gets a field value from a record.

GetDateTime ( object fieldValue ) : System.DateTime

Gets a value from a database field value or output parameter.

GetDateTime ( object fieldValue, System.DateTime defaultValue ) : System.DateTime

Gets a value from a database field value or output parameter.

GetDateTime ( this record, string name ) : System.DateTime

Gets a field value from a record.

GetDateTime ( this record, string name, System.DateTime defaultValue ) : System.DateTime

Gets a field value from a record.

GetDateTime ( this record, string name, System.DateTime defaultValue, bool ignoreErrors ) : System.DateTime

Gets a field value from a record.

GetDecimal ( object fieldValue ) : decimal

Gets a value from a database field value or output parameter.

GetDecimal ( object fieldValue, decimal defaultValue ) : decimal

Gets a value from a database field value or output parameter.

GetDecimal ( this record, string name ) : decimal

Gets a field value from a record.

GetDecimal ( this record, string name, decimal defaultValue ) : decimal

Gets a field value from a record.

GetDecimal ( this record, string name, decimal defaultValue, bool ignoreErrors ) : decimal

Gets a field value from a record.

GetDouble ( object fieldValue ) : double

Gets a value from a database field value or output parameter.

GetDouble ( object fieldValue, double defaultValue ) : double

Gets a value from a database field value or output parameter.

GetDouble ( this record, string name ) : double

Gets a field value from a record.

GetDouble ( this record, string name, double defaultValue ) : double

Gets a field value from a record.

GetDouble ( this record, string name, double defaultValue, bool ignoreErrors ) : double

Gets a field value from a record.

GetGuid ( object fieldValue ) : System.Guid

Gets a value from a database field value or output parameter.

GetGuid ( object fieldValue, System.Guid defaultValue ) : System.Guid

Gets a value from a database field value or output parameter.

GetGuid ( this record, string name ) : System.Guid

Gets a field value from a record.

GetGuid ( this record, string name, System.Guid defaultValue ) : System.Guid

Gets a field value from a record.

GetGuid ( this record, string name, System.Guid defaultValue, bool ignoreErrors ) : System.Guid

Gets a field value from a record.

GetInt16 ( object fieldValue ) : short

Gets a value from a database field value or output parameter.

GetInt16 ( object fieldValue, short defaultValue ) : short

Gets a value from a database field value or output parameter.

GetInt16 ( this record, string name ) : short

Gets a field value from a record.

GetInt16 ( this record, string name, short defaultValue ) : short

Gets a field value from a record.

GetInt16 ( this record, string name, short defaultValue, bool ignoreErrors ) : short

Gets a field value from a record.

GetInt32 ( object fieldValue ) : int

Gets a value from a database field value or output parameter.

GetInt32 ( object fieldValue, int defaultValue ) : int

Gets a value from a database field value or output parameter.

GetInt32 ( this record, string name ) : int

Gets a field value from a record.

GetInt32 ( this record, string name, int defaultValue ) : int

Gets a field value from a record.

GetInt32 ( this record, string name, int defaultValue, bool ignoreErrors ) : int

Gets a field value from a record.

GetInt64 ( object fieldValue ) : long

Gets a value from a database field value or output parameter.

GetInt64 ( object fieldValue, long defaultValue ) : long

Gets a value from a database field value or output parameter.

GetInt64 ( this record, string name ) : long

Gets a field value from a record.

GetInt64 ( this record, string name, long defaultValue ) : long

Gets a field value from a record.

GetInt64 ( this record, string name, long defaultValue, bool ignoreErrors ) : long

Gets a field value from a record.

GetString ( object fieldValue ) : string

Gets a value from a database field value or output parameter.

GetString ( object fieldValue, string defaultValue ) : string

Gets a value from a database field value or output parameter.

GetString ( this record, string name ) : string

Gets a field value from a record.

GetString ( this record, string name, string defaultValue ) : string

Gets a field value from a record.

GetString ( this record, string name, string defaultValue, bool ignoreErrors ) : string

Gets a field value from a record.

GetUTCDateTime ( object fieldValue ) : System.DateTime

Gets a value from a database field value or output parameter.

GetUTCDateTime ( object fieldValue, System.DateTime defaultValue ) : System.DateTime

Gets a value from a database field value or output parameter.

GetUTCDateTime ( this record, string name ) : System.DateTime

Gets a field value from a record.

GetUTCDateTime ( this record, string name, System.DateTime defaultValue ) : System.DateTime

Gets a field value from a record.

GetUTCDateTime ( this record, string name, System.DateTime defaultValue, bool ignoreErrors ) : System.DateTime

Gets a field value from a record.

GetValue ( object fieldValue ) : object

Gets a value from a database field value or output parameter.

GetValue ( object fieldValue, object defaultValue ) : object

Gets a value from a database field value or output parameter.

GetValue ( this record, string name ) : object

Gets a field value from a record.

GetValue ( this record, string name, bool ignoreErrors ) : object

Gets a field value from a record.

Описание методов

FieldIndex() публичный статический Метод

Gets the index of a field of a specific name in a record.
public static FieldIndex ( this record, string name ) : int
record this The source record.
name string The field name to find.
Результат int

GetBoolean() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetBoolean ( object fieldValue, bool defaultValue ) : bool
fieldValue object The value to convert.
defaultValue bool The default value if the original is DbNull.
Результат bool

GetBoolean() публичный статический Метод

Gets a field value from a record.
public static GetBoolean ( this record, string name, bool defaultValue ) : bool
record this The source record.
name string The field name to find.
defaultValue bool The default in case the value is not assigned.
Результат bool

GetBoolean() публичный статический Метод

Gets a field value from a record.
public static GetBoolean ( this record, string name, bool defaultValue, bool ignoreErrors ) : bool
record this The source record.
name string The field name to find.
defaultValue bool The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат bool

GetDateTime() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetDateTime ( object fieldValue ) : System.DateTime
fieldValue object The value to convert.
Результат System.DateTime

GetDateTime() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetDateTime ( object fieldValue, System.DateTime defaultValue ) : System.DateTime
fieldValue object The value to convert.
defaultValue System.DateTime The default value if the original is DbNull.
Результат System.DateTime

GetDateTime() публичный статический Метод

Gets a field value from a record.
public static GetDateTime ( this record, string name ) : System.DateTime
record this The source record.
name string The field name to find.
Результат System.DateTime

GetDateTime() публичный статический Метод

Gets a field value from a record.
public static GetDateTime ( this record, string name, System.DateTime defaultValue ) : System.DateTime
record this The source record.
name string The field name to find.
defaultValue System.DateTime The default in case the value is not assigned.
Результат System.DateTime

GetDateTime() публичный статический Метод

Gets a field value from a record.
public static GetDateTime ( this record, string name, System.DateTime defaultValue, bool ignoreErrors ) : System.DateTime
record this The source record.
name string The field name to find.
defaultValue System.DateTime The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат System.DateTime

GetDecimal() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetDecimal ( object fieldValue ) : decimal
fieldValue object The value to convert.
Результат decimal

GetDecimal() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetDecimal ( object fieldValue, decimal defaultValue ) : decimal
fieldValue object The value to convert.
defaultValue decimal The default value if the original is DbNull.
Результат decimal

GetDecimal() публичный статический Метод

Gets a field value from a record.
public static GetDecimal ( this record, string name ) : decimal
record this The source record.
name string The field name to find.
Результат decimal

GetDecimal() публичный статический Метод

Gets a field value from a record.
public static GetDecimal ( this record, string name, decimal defaultValue ) : decimal
record this The source record.
name string The field name to find.
defaultValue decimal The default in case the value is not assigned.
Результат decimal

GetDecimal() публичный статический Метод

Gets a field value from a record.
public static GetDecimal ( this record, string name, decimal defaultValue, bool ignoreErrors ) : decimal
record this The source record.
name string The field name to find.
defaultValue decimal The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат decimal

GetDouble() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetDouble ( object fieldValue ) : double
fieldValue object The value to convert.
Результат double

GetDouble() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetDouble ( object fieldValue, double defaultValue ) : double
fieldValue object The value to convert.
defaultValue double The default value if the original is DbNull.
Результат double

GetDouble() публичный статический Метод

Gets a field value from a record.
public static GetDouble ( this record, string name ) : double
record this The source record.
name string The field name to find.
Результат double

GetDouble() публичный статический Метод

Gets a field value from a record.
public static GetDouble ( this record, string name, double defaultValue ) : double
record this The source record.
name string The field name to find.
defaultValue double The default in case the value is not assigned.
Результат double

GetDouble() публичный статический Метод

Gets a field value from a record.
public static GetDouble ( this record, string name, double defaultValue, bool ignoreErrors ) : double
record this The source record.
name string The field name to find.
defaultValue double The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат double

GetGuid() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetGuid ( object fieldValue ) : System.Guid
fieldValue object The value to convert.
Результат System.Guid

GetGuid() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetGuid ( object fieldValue, System.Guid defaultValue ) : System.Guid
fieldValue object The value to convert.
defaultValue System.Guid The default value if the original is DbNull.
Результат System.Guid

GetGuid() публичный статический Метод

Gets a field value from a record.
public static GetGuid ( this record, string name ) : System.Guid
record this The source record.
name string The field name to find.
Результат System.Guid

GetGuid() публичный статический Метод

Gets a field value from a record.
public static GetGuid ( this record, string name, System.Guid defaultValue ) : System.Guid
record this The source record.
name string The field name to find.
defaultValue System.Guid The default in case the value is not assigned.
Результат System.Guid

GetGuid() публичный статический Метод

Gets a field value from a record.
public static GetGuid ( this record, string name, System.Guid defaultValue, bool ignoreErrors ) : System.Guid
record this The source record.
name string The field name to find.
defaultValue System.Guid The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат System.Guid

GetInt16() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetInt16 ( object fieldValue ) : short
fieldValue object The value to convert.
Результат short

GetInt16() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetInt16 ( object fieldValue, short defaultValue ) : short
fieldValue object The value to convert.
defaultValue short The default value if the original is DbNull.
Результат short

GetInt16() публичный статический Метод

Gets a field value from a record.
public static GetInt16 ( this record, string name ) : short
record this The source record.
name string The field name to find.
Результат short

GetInt16() публичный статический Метод

Gets a field value from a record.
public static GetInt16 ( this record, string name, short defaultValue ) : short
record this The source record.
name string The field name to find.
defaultValue short The default in case the value is not assigned.
Результат short

GetInt16() публичный статический Метод

Gets a field value from a record.
public static GetInt16 ( this record, string name, short defaultValue, bool ignoreErrors ) : short
record this The source record.
name string The field name to find.
defaultValue short The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат short

GetInt32() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetInt32 ( object fieldValue ) : int
fieldValue object The value to convert.
Результат int

GetInt32() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetInt32 ( object fieldValue, int defaultValue ) : int
fieldValue object The value to convert.
defaultValue int The default value if the original is DbNull.
Результат int

GetInt32() публичный статический Метод

Gets a field value from a record.
public static GetInt32 ( this record, string name ) : int
record this The source record.
name string The field name to find.
Результат int

GetInt32() публичный статический Метод

Gets a field value from a record.
public static GetInt32 ( this record, string name, int defaultValue ) : int
record this The source record.
name string The field name to find.
defaultValue int The default in case the value is not assigned.
Результат int

GetInt32() публичный статический Метод

Gets a field value from a record.
public static GetInt32 ( this record, string name, int defaultValue, bool ignoreErrors ) : int
record this The source record.
name string The field name to find.
defaultValue int The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат int

GetInt64() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetInt64 ( object fieldValue ) : long
fieldValue object The value to convert.
Результат long

GetInt64() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetInt64 ( object fieldValue, long defaultValue ) : long
fieldValue object The value to convert.
defaultValue long The default value if the original is DbNull.
Результат long

GetInt64() публичный статический Метод

Gets a field value from a record.
public static GetInt64 ( this record, string name ) : long
record this The source record.
name string The field name to find.
Результат long

GetInt64() публичный статический Метод

Gets a field value from a record.
public static GetInt64 ( this record, string name, long defaultValue ) : long
record this The source record.
name string The field name to find.
defaultValue long The default in case the value is not assigned.
Результат long

GetInt64() публичный статический Метод

Gets a field value from a record.
public static GetInt64 ( this record, string name, long defaultValue, bool ignoreErrors ) : long
record this The source record.
name string The field name to find.
defaultValue long The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат long

GetString() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetString ( object fieldValue ) : string
fieldValue object The value to convert.
Результат string

GetString() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetString ( object fieldValue, string defaultValue ) : string
fieldValue object The value to convert.
defaultValue string The default value if the original is DbNull.
Результат string

GetString() публичный статический Метод

Gets a field value from a record.
public static GetString ( this record, string name ) : string
record this The source record.
name string The field name to find.
Результат string

GetString() публичный статический Метод

Gets a field value from a record.
public static GetString ( this record, string name, string defaultValue ) : string
record this The source record.
name string The field name to find.
defaultValue string The default in case the value is not assigned.
Результат string

GetString() публичный статический Метод

Gets a field value from a record.
public static GetString ( this record, string name, string defaultValue, bool ignoreErrors ) : string
record this The source record.
name string The field name to find.
defaultValue string The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат string

GetUTCDateTime() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetUTCDateTime ( object fieldValue ) : System.DateTime
fieldValue object The value to convert.
Результат System.DateTime

GetUTCDateTime() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetUTCDateTime ( object fieldValue, System.DateTime defaultValue ) : System.DateTime
fieldValue object The value to convert.
defaultValue System.DateTime The default value if the original is DbNull.
Результат System.DateTime

GetUTCDateTime() публичный статический Метод

Gets a field value from a record.
public static GetUTCDateTime ( this record, string name ) : System.DateTime
record this The source record.
name string The field name to find.
Результат System.DateTime

GetUTCDateTime() публичный статический Метод

Gets a field value from a record.
public static GetUTCDateTime ( this record, string name, System.DateTime defaultValue ) : System.DateTime
record this The source record.
name string The field name to find.
defaultValue System.DateTime The default in case the value is not assigned.
Результат System.DateTime

GetUTCDateTime() публичный статический Метод

Gets a field value from a record.
public static GetUTCDateTime ( this record, string name, System.DateTime defaultValue, bool ignoreErrors ) : System.DateTime
record this The source record.
name string The field name to find.
defaultValue System.DateTime The default in case the value is not assigned.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат System.DateTime

GetValue() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetValue ( object fieldValue ) : object
fieldValue object The value to convert.
Результат object

GetValue() публичный статический Метод

Gets a value from a database field value or output parameter.
public static GetValue ( object fieldValue, object defaultValue ) : object
fieldValue object The value to convert.
defaultValue object The default value if the original is DbNull.
Результат object

GetValue() публичный статический Метод

Gets a field value from a record.
public static GetValue ( this record, string name ) : object
record this The source record.
name string The field name to find.
Результат object

GetValue() публичный статический Метод

Gets a field value from a record.
public static GetValue ( this record, string name, bool ignoreErrors ) : object
record this The source record.
name string The field name to find.
ignoreErrors bool Specifies if a missing field should return the default value.
Результат object