C# Class EventCentric.Database.DataReaderExtensions

Provides usability overloads for SqlDataReader.
Based on: http://stackoverflow.com/questions/1772025/sql-data-reader-handling-null-column-values
Afficher le fichier Open project: Narvalex/EventCentric

Méthodes publiques

Méthode Description
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

Method Details

GetBoolean() public static méthode

public static GetBoolean ( this reader, string name ) : bool
reader this
name string
Résultat bool

GetDateTime() public static méthode

public static GetDateTime ( this reader, string name ) : System.DateTime
reader this
name string
Résultat System.DateTime

GetDecimal() public static méthode

public static GetDecimal ( this reader, string name ) : decimal
reader this
name string
Résultat decimal

GetDouble() public static méthode

public static GetDouble ( this reader, string name ) : double
reader this
name string
Résultat double

GetFloat() public static méthode

public static GetFloat ( this reader, string name ) : float
reader this
name string
Résultat float

GetGuid() public static méthode

public static GetGuid ( this reader, string name ) : System.Guid
reader this
name string
Résultat System.Guid

GetInt32() public static méthode

public static GetInt32 ( this reader, string name ) : int
reader this
name string
Résultat int

GetInt64() public static méthode

public static GetInt64 ( this reader, string name ) : long
reader this
name string
Résultat long

GetString() public static méthode

public static GetString ( this reader, string name ) : string
reader this
name string
Résultat string

GetValue() public static méthode

public static GetValue ( this reader, string column ) : object
reader this
column string
Résultat object

SafeGetBoolean() public static méthode

public static SafeGetBoolean ( this reader, int i ) : bool
reader this
i int
Résultat bool

SafeGetBoolean() public static méthode

public static SafeGetBoolean ( this reader, string name ) : bool
reader this
name string
Résultat bool

SafeGetBooleanOrNull() public static méthode

public static SafeGetBooleanOrNull ( this reader, int i ) : bool?
reader this
i int
Résultat bool?

SafeGetBooleanOrNull() public static méthode

public static SafeGetBooleanOrNull ( this reader, string name ) : bool?
reader this
name string
Résultat bool?

SafeGetDateTime() public static méthode

public static SafeGetDateTime ( this reader, int i ) : System.DateTime
reader this
i int
Résultat System.DateTime

SafeGetDateTime() public static méthode

public static SafeGetDateTime ( this reader, string name ) : System.DateTime
reader this
name string
Résultat System.DateTime

SafeGetDateTimeOrNull() public static méthode

public static SafeGetDateTimeOrNull ( this reader, int i ) : DateTime?
reader this
i int
Résultat DateTime?

SafeGetDateTimeOrNull() public static méthode

public static SafeGetDateTimeOrNull ( this reader, string name ) : DateTime?
reader this
name string
Résultat DateTime?

SafeGetDecimal() public static méthode

public static SafeGetDecimal ( this reader, int i ) : decimal
reader this
i int
Résultat decimal

SafeGetDecimal() public static méthode

public static SafeGetDecimal ( this reader, string name ) : decimal
reader this
name string
Résultat decimal

SafeGetDecimalOrNull() public static méthode

public static SafeGetDecimalOrNull ( this reader, int i ) : decimal?
reader this
i int
Résultat decimal?

SafeGetDecimalOrNull() public static méthode

public static SafeGetDecimalOrNull ( this reader, string name ) : decimal?
reader this
name string
Résultat decimal?

SafeGetDouble() public static méthode

public static SafeGetDouble ( this reader, int i ) : double
reader this
i int
Résultat double

SafeGetDouble() public static méthode

public static SafeGetDouble ( this reader, string name ) : double
reader this
name string
Résultat double

SafeGetDoubleOrNull() public static méthode

public static SafeGetDoubleOrNull ( this reader, int i ) : double?
reader this
i int
Résultat double?

SafeGetDoubleOrNull() public static méthode

public static SafeGetDoubleOrNull ( this reader, string name ) : double?
reader this
name string
Résultat double?

SafeGetFloat() public static méthode

public static SafeGetFloat ( this reader, int i ) : float
reader this
i int
Résultat float

SafeGetFloat() public static méthode

public static SafeGetFloat ( this reader, string name ) : float
reader this
name string
Résultat float

SafeGetFloatOrNull() public static méthode

public static SafeGetFloatOrNull ( this reader, int i ) : float?
reader this
i int
Résultat float?

SafeGetFloatOrNull() public static méthode

public static SafeGetFloatOrNull ( this reader, string name ) : float?
reader this
name string
Résultat float?

SafeGetGuid() public static méthode

public static SafeGetGuid ( this reader, int i ) : System.Guid
reader this
i int
Résultat System.Guid

SafeGetGuid() public static méthode

public static SafeGetGuid ( this reader, string name ) : System.Guid
reader this
name string
Résultat System.Guid

SafeGetGuidOrNull() public static méthode

public static SafeGetGuidOrNull ( this reader, int i ) : Guid?
reader this
i int
Résultat Guid?

SafeGetGuidOrNull() public static méthode

public static SafeGetGuidOrNull ( this reader, string name ) : Guid?
reader this
name string
Résultat Guid?

SafeGetInt32() public static méthode

public static SafeGetInt32 ( this reader, int i ) : int
reader this
i int
Résultat int

SafeGetInt32() public static méthode

public static SafeGetInt32 ( this reader, string name ) : int
reader this
name string
Résultat int

SafeGetInt32OrNull() public static méthode

public static SafeGetInt32OrNull ( this reader, int i ) : int?
reader this
i int
Résultat int?

SafeGetInt32OrNull() public static méthode

public static SafeGetInt32OrNull ( this reader, string name ) : int?
reader this
name string
Résultat int?

SafeGetInt64() public static méthode

public static SafeGetInt64 ( this reader, int i ) : long
reader this
i int
Résultat long

SafeGetInt64() public static méthode

public static SafeGetInt64 ( this reader, string name ) : long
reader this
name string
Résultat long

SafeGetInt64OrNull() public static méthode

public static SafeGetInt64OrNull ( this reader, int i ) : long?
reader this
i int
Résultat long?

SafeGetInt64OrNull() public static méthode

public static SafeGetInt64OrNull ( this reader, string name ) : long?
reader this
name string
Résultat long?

SafeGetString() public static méthode

public static SafeGetString ( this reader, int i ) : string
reader this
i int
Résultat string

SafeGetString() public static méthode

public static SafeGetString ( this reader, string name ) : string
reader this
name string
Résultat string

SafeGetStringAndTrim() public static méthode

public static SafeGetStringAndTrim ( this reader, int i ) : string
reader this
i int
Résultat string

SafeGetStringAndTrim() public static méthode

public static SafeGetStringAndTrim ( this reader, string name ) : string
reader this
name string
Résultat string

SafeGetValue() public static méthode

public static SafeGetValue ( this reader, int i ) : object
reader this
i int
Résultat object

SafeGetValue() public static méthode

public static SafeGetValue ( this reader, string column ) : object
reader this
column string
Résultat object