C# Класс EventCentric.Database.DataReaderExtensions

Provides usability overloads for SqlDataReader.
Based on: http://stackoverflow.com/questions/1772025/sql-data-reader-handling-null-column-values
Показать файл Открыть проект

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

Метод Описание
GetBoolean ( this reader, string name ) : bool
GetDateTime ( this reader, string name ) : System.DateTime
GetDecimal ( this reader, string name ) : decimal
GetDouble ( this reader, string name ) : double
GetFloat ( this reader, string name ) : float
GetGuid ( this reader, string name ) : System.Guid
GetInt32 ( this reader, string name ) : int
GetInt64 ( this reader, string name ) : long
GetString ( this reader, string name ) : string
GetValue ( this reader, string column ) : object
SafeGetBoolean ( this reader, int i ) : bool
SafeGetBoolean ( this reader, string name ) : bool
SafeGetBooleanOrNull ( this reader, int i ) : bool?
SafeGetBooleanOrNull ( this reader, string name ) : bool?
SafeGetDateTime ( this reader, int i ) : System.DateTime
SafeGetDateTime ( this reader, string name ) : System.DateTime
SafeGetDateTimeOrNull ( this reader, int i ) : DateTime?
SafeGetDateTimeOrNull ( this reader, string name ) : DateTime?
SafeGetDecimal ( this reader, int i ) : decimal
SafeGetDecimal ( this reader, string name ) : decimal
SafeGetDecimalOrNull ( this reader, int i ) : decimal?
SafeGetDecimalOrNull ( this reader, string name ) : decimal?
SafeGetDouble ( this reader, int i ) : double
SafeGetDouble ( this reader, string name ) : double
SafeGetDoubleOrNull ( this reader, int i ) : double?
SafeGetDoubleOrNull ( this reader, string name ) : double?
SafeGetFloat ( this reader, int i ) : float
SafeGetFloat ( this reader, string name ) : float
SafeGetFloatOrNull ( this reader, int i ) : float?
SafeGetFloatOrNull ( this reader, string name ) : float?
SafeGetGuid ( this reader, int i ) : System.Guid
SafeGetGuid ( this reader, string name ) : System.Guid
SafeGetGuidOrNull ( this reader, int i ) : Guid?
SafeGetGuidOrNull ( this reader, string name ) : Guid?
SafeGetInt32 ( this reader, int i ) : int
SafeGetInt32 ( this reader, string name ) : int
SafeGetInt32OrNull ( this reader, int i ) : int?
SafeGetInt32OrNull ( this reader, string name ) : int?
SafeGetInt64 ( this reader, int i ) : long
SafeGetInt64 ( this reader, string name ) : long
SafeGetInt64OrNull ( this reader, int i ) : long?
SafeGetInt64OrNull ( this reader, string name ) : long?
SafeGetString ( this reader, int i ) : string
SafeGetString ( this reader, string name ) : string
SafeGetStringAndTrim ( this reader, int i ) : string
SafeGetStringAndTrim ( this reader, string name ) : string
SafeGetValue ( this reader, int i ) : object
SafeGetValue ( this reader, string column ) : object

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

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

public static GetBoolean ( this reader, string name ) : bool
reader this
name string
Результат bool

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

public static GetDateTime ( this reader, string name ) : System.DateTime
reader this
name string
Результат System.DateTime

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

public static GetDecimal ( this reader, string name ) : decimal
reader this
name string
Результат decimal

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

public static GetDouble ( this reader, string name ) : double
reader this
name string
Результат double

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

public static GetFloat ( this reader, string name ) : float
reader this
name string
Результат float

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

public static GetGuid ( this reader, string name ) : System.Guid
reader this
name string
Результат System.Guid

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

public static GetInt32 ( this reader, string name ) : int
reader this
name string
Результат int

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

public static GetInt64 ( this reader, string name ) : long
reader this
name string
Результат long

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

public static GetString ( this reader, string name ) : string
reader this
name string
Результат string

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

public static GetValue ( this reader, string column ) : object
reader this
column string
Результат object

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

public static SafeGetBoolean ( this reader, int i ) : bool
reader this
i int
Результат bool

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

public static SafeGetBoolean ( this reader, string name ) : bool
reader this
name string
Результат bool

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

public static SafeGetBooleanOrNull ( this reader, int i ) : bool?
reader this
i int
Результат bool?

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

public static SafeGetBooleanOrNull ( this reader, string name ) : bool?
reader this
name string
Результат bool?

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

public static SafeGetDateTime ( this reader, int i ) : System.DateTime
reader this
i int
Результат System.DateTime

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

public static SafeGetDateTime ( this reader, string name ) : System.DateTime
reader this
name string
Результат System.DateTime

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

public static SafeGetDateTimeOrNull ( this reader, int i ) : DateTime?
reader this
i int
Результат DateTime?

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

public static SafeGetDateTimeOrNull ( this reader, string name ) : DateTime?
reader this
name string
Результат DateTime?

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

public static SafeGetDecimal ( this reader, int i ) : decimal
reader this
i int
Результат decimal

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

public static SafeGetDecimal ( this reader, string name ) : decimal
reader this
name string
Результат decimal

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

public static SafeGetDecimalOrNull ( this reader, int i ) : decimal?
reader this
i int
Результат decimal?

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

public static SafeGetDecimalOrNull ( this reader, string name ) : decimal?
reader this
name string
Результат decimal?

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

public static SafeGetDouble ( this reader, int i ) : double
reader this
i int
Результат double

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

public static SafeGetDouble ( this reader, string name ) : double
reader this
name string
Результат double

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

public static SafeGetDoubleOrNull ( this reader, int i ) : double?
reader this
i int
Результат double?

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

public static SafeGetDoubleOrNull ( this reader, string name ) : double?
reader this
name string
Результат double?

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

public static SafeGetFloat ( this reader, int i ) : float
reader this
i int
Результат float

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

public static SafeGetFloat ( this reader, string name ) : float
reader this
name string
Результат float

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

public static SafeGetFloatOrNull ( this reader, int i ) : float?
reader this
i int
Результат float?

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

public static SafeGetFloatOrNull ( this reader, string name ) : float?
reader this
name string
Результат float?

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

public static SafeGetGuid ( this reader, int i ) : System.Guid
reader this
i int
Результат System.Guid

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

public static SafeGetGuid ( this reader, string name ) : System.Guid
reader this
name string
Результат System.Guid

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

public static SafeGetGuidOrNull ( this reader, int i ) : Guid?
reader this
i int
Результат Guid?

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

public static SafeGetGuidOrNull ( this reader, string name ) : Guid?
reader this
name string
Результат Guid?

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

public static SafeGetInt32 ( this reader, int i ) : int
reader this
i int
Результат int

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

public static SafeGetInt32 ( this reader, string name ) : int
reader this
name string
Результат int

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

public static SafeGetInt32OrNull ( this reader, int i ) : int?
reader this
i int
Результат int?

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

public static SafeGetInt32OrNull ( this reader, string name ) : int?
reader this
name string
Результат int?

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

public static SafeGetInt64 ( this reader, int i ) : long
reader this
i int
Результат long

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

public static SafeGetInt64 ( this reader, string name ) : long
reader this
name string
Результат long

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

public static SafeGetInt64OrNull ( this reader, int i ) : long?
reader this
i int
Результат long?

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

public static SafeGetInt64OrNull ( this reader, string name ) : long?
reader this
name string
Результат long?

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

public static SafeGetString ( this reader, int i ) : string
reader this
i int
Результат string

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

public static SafeGetString ( this reader, string name ) : string
reader this
name string
Результат string

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

public static SafeGetStringAndTrim ( this reader, int i ) : string
reader this
i int
Результат string

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

public static SafeGetStringAndTrim ( this reader, string name ) : string
reader this
name string
Результат string

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

public static SafeGetValue ( this reader, int i ) : object
reader this
i int
Результат object

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

public static SafeGetValue ( this reader, string column ) : object
reader this
column string
Результат object