C# Class GSF.Data.DataRowExtensions

Static extension methods for DataRow that will automatically type cast fields to the desired value. This is superior to DataSetExtensions.dll because if the field type does not exactly match in that case, a cast exception occurs.
Afficher le fichier Open project: GridProtectionAlliance/gsf

Méthodes publiques

Méthode Description
AsBoolean ( this row, int ordinal, bool valueIfNull ) : bool

Attempts to type cast the specified column of a to the defined type.

AsBoolean ( this row, string columnName, bool valueIfNull ) : bool

Attempts to type cast the specified column of a to the defined type.

AsBoolean ( this row, int ordinal ) : bool?

Attempts to type cast the specified column of a to the defined type.

AsBoolean ( this row, string columnName ) : bool?

Attempts to type cast the specified column of a to the defined type.

AsByte ( this row, int ordinal, byte valueIfNull ) : byte

Attempts to type cast the specified column of a to the defined type.

AsByte ( this row, string columnName, byte valueIfNull ) : byte

Attempts to type cast the specified column of a to the defined type.

AsByte ( this row, int ordinal ) : byte?

Attempts to type cast the specified column of a to the defined type.

AsByte ( this row, string columnName ) : byte?

Attempts to type cast the specified column of a to the defined type.

AsByteArray ( this row, int ordinal ) : byte[]

Attempts to type cast the specified column of a to the defined type.

AsByteArray ( this row, int ordinal, byte valueIfNull ) : byte[]

Attempts to type cast the specified column of a to the defined type.

AsByteArray ( this row, string columnName ) : byte[]

Attempts to type cast the specified column of a to the defined type.

AsByteArray ( this row, string columnName, byte valueIfNull ) : byte[]

Attempts to type cast the specified column of a to the defined type.

AsDateTime ( this row, int ordinal, System.DateTime valueIfNull ) : System.DateTime

Attempts to type cast the specified column of a to the defined type.

AsDateTime ( this row, string columnName, System.DateTime valueIfNull ) : System.DateTime

Attempts to type cast the specified column of a to the defined type.

AsDateTime ( this row, int ordinal ) : DateTime?

Attempts to type cast the specified column of a to the defined type.

AsDateTime ( this row, string columnName ) : DateTime?

Attempts to type cast the specified column of a to the defined type.

AsDecimal ( this row, int ordinal, decimal valueIfNull ) : decimal

Attempts to type cast the specified column of a to the defined type.

AsDecimal ( this row, string columnName, decimal valueIfNull ) : decimal

Attempts to type cast the specified column of a to the defined type.

AsDecimal ( this row, int ordinal ) : decimal?

Attempts to type cast the specified column of a to the defined type.

AsDecimal ( this row, string columnName ) : decimal?

Attempts to type cast the specified column of a to the defined type.

AsDouble ( this row, int ordinal, double valueIfNull ) : double

Attempts to type cast the specified column of a to the defined type.

AsDouble ( this row, string columnName, double valueIfNull ) : double

Attempts to type cast the specified column of a to the defined type.

AsDouble ( this row, int ordinal ) : double?

Attempts to type cast the specified column of a to the defined type.

AsDouble ( this row, string columnName ) : double?

Attempts to type cast the specified column of a to the defined type.

AsGuid ( this row, int ordinal, System.Guid valueIfNull ) : System.Guid

Attempts to type cast the specified column of a to the defined type.

AsGuid ( this row, string columnName, System.Guid valueIfNull ) : System.Guid

Attempts to type cast the specified column of a to the defined type.

AsGuid ( this row, int ordinal ) : Guid?

Attempts to type cast the specified column of a to the defined type.

AsGuid ( this row, string columnName ) : Guid?

Attempts to type cast the specified column of a to the defined type.

AsInt16 ( this row, int ordinal, short valueIfNull ) : short

Attempts to type cast the specified column of a to the defined type.

AsInt16 ( this row, string columnName, short valueIfNull ) : short

Attempts to type cast the specified column of a to the defined type.

AsInt16 ( this row, int ordinal ) : short?

Attempts to type cast the specified column of a to the defined type.

AsInt16 ( this row, string columnName ) : short?

Attempts to type cast the specified column of a to the defined type.

AsInt32 ( this row, int ordinal, int valueIfNull ) : int

Attempts to type cast the specified column of a to the defined type.

AsInt32 ( this row, string columnName, int valueIfNull ) : int

Attempts to type cast the specified column of a to the defined type.

AsInt32 ( this row, int ordinal ) : int?

Attempts to type cast the specified column of a to the defined type.

AsInt32 ( this row, string columnName ) : int?

Attempts to type cast the specified column of a to the defined type.

AsInt64 ( this row, int ordinal, long valueIfNull ) : long

Attempts to type cast the specified column of a to the defined type.

AsInt64 ( this row, string columnName, long valueIfNull ) : long

Attempts to type cast the specified column of a to the defined type.

AsInt64 ( this row, int ordinal ) : long?

Attempts to type cast the specified column of a to the defined type.

AsInt64 ( this row, string columnName ) : long?

Attempts to type cast the specified column of a to the defined type.

AsSingle ( this row, int ordinal, float valueIfNull ) : float

Attempts to type cast the specified column of a to the defined type.

AsSingle ( this row, string columnName, float valueIfNull ) : float

Attempts to type cast the specified column of a to the defined type.

AsSingle ( this row, int ordinal ) : float?

Attempts to type cast the specified column of a to the defined type.

AsSingle ( this row, string columnName ) : float?

Attempts to type cast the specified column of a to the defined type.

AsString ( this row, int ordinal ) : string

Attempts to type cast the specified column of a to the defined type.

AsString ( this row, int ordinal, string valueIfNull ) : string

Attempts to type cast the specified column of a to the defined type.

AsString ( this row, string columnName ) : string

Attempts to type cast the specified column of a to the defined type.

AsString ( this row, string columnName, string valueIfNull ) : string

Attempts to type cast the specified column of a to the defined type.

AsUInt32 ( this row, int ordinal, uint valueIfNull ) : uint

Attempts to type cast the specified column of a to the defined type.

AsUInt32 ( this row, string columnName, uint valueIfNull ) : uint

Attempts to type cast the specified column of a to the defined type.

AsUInt32 ( this row, int ordinal ) : uint?

Attempts to type cast the specified column of a to the defined type.

AsUInt32 ( this row, string columnName ) : uint?

Attempts to type cast the specified column of a to the defined type.

Method Details

AsBoolean() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsBoolean ( this row, int ordinal, bool valueIfNull ) : bool
row this the row
ordinal int the index of the column
valueIfNull bool the value to replace if null
Résultat bool

AsBoolean() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsBoolean ( this row, string columnName, bool valueIfNull ) : bool
row this the row
columnName string the column name
valueIfNull bool the value to replace if null
Résultat bool

AsBoolean() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsBoolean ( this row, int ordinal ) : bool?
row this the row
ordinal int the index of the column
Résultat bool?

AsBoolean() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsBoolean ( this row, string columnName ) : bool?
row this the row
columnName string the column name
Résultat bool?

AsByte() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByte ( this row, int ordinal, byte valueIfNull ) : byte
row this the row
ordinal int the index of the column
valueIfNull byte the value to replace if null
Résultat byte

AsByte() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByte ( this row, string columnName, byte valueIfNull ) : byte
row this the row
columnName string the column name
valueIfNull byte the value to replace if null
Résultat byte

AsByte() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByte ( this row, int ordinal ) : byte?
row this the row
ordinal int the index of the column
Résultat byte?

AsByte() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByte ( this row, string columnName ) : byte?
row this the row
columnName string the column name
Résultat byte?

AsByteArray() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByteArray ( this row, int ordinal ) : byte[]
row this the row
ordinal int the index of the column
Résultat byte[]

AsByteArray() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByteArray ( this row, int ordinal, byte valueIfNull ) : byte[]
row this the row
ordinal int the index of the column
valueIfNull byte the value to replace if null
Résultat byte[]

AsByteArray() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByteArray ( this row, string columnName ) : byte[]
row this the row
columnName string the column name
Résultat byte[]

AsByteArray() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsByteArray ( this row, string columnName, byte valueIfNull ) : byte[]
row this the row
columnName string the column name
valueIfNull byte the value to replace if null
Résultat byte[]

AsDateTime() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDateTime ( this row, int ordinal, System.DateTime valueIfNull ) : System.DateTime
row this the row
ordinal int the index of the column
valueIfNull System.DateTime the value to replace if null
Résultat System.DateTime

AsDateTime() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDateTime ( this row, string columnName, System.DateTime valueIfNull ) : System.DateTime
row this the row
columnName string the column name
valueIfNull System.DateTime the value to replace if null
Résultat System.DateTime

AsDateTime() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDateTime ( this row, int ordinal ) : DateTime?
row this the row
ordinal int the index of the column
Résultat DateTime?

AsDateTime() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDateTime ( this row, string columnName ) : DateTime?
row this the row
columnName string the column name
Résultat DateTime?

AsDecimal() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDecimal ( this row, int ordinal, decimal valueIfNull ) : decimal
row this the row
ordinal int the index of the column
valueIfNull decimal the value to replace if null
Résultat decimal

AsDecimal() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDecimal ( this row, string columnName, decimal valueIfNull ) : decimal
row this the row
columnName string the column name
valueIfNull decimal the value to replace if null
Résultat decimal

AsDecimal() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDecimal ( this row, int ordinal ) : decimal?
row this the row
ordinal int the index of the column
Résultat decimal?

AsDecimal() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDecimal ( this row, string columnName ) : decimal?
row this the row
columnName string the column name
Résultat decimal?

AsDouble() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDouble ( this row, int ordinal, double valueIfNull ) : double
row this the row
ordinal int the index of the column
valueIfNull double the value to replace if null
Résultat double

AsDouble() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDouble ( this row, string columnName, double valueIfNull ) : double
row this the row
columnName string the column name
valueIfNull double the value to replace if null
Résultat double

AsDouble() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDouble ( this row, int ordinal ) : double?
row this the row
ordinal int the index of the column
Résultat double?

AsDouble() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsDouble ( this row, string columnName ) : double?
row this the row
columnName string the column name
Résultat double?

AsGuid() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsGuid ( this row, int ordinal, System.Guid valueIfNull ) : System.Guid
row this the row
ordinal int the index of the column
valueIfNull System.Guid the value to replace if null
Résultat System.Guid

AsGuid() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsGuid ( this row, string columnName, System.Guid valueIfNull ) : System.Guid
row this the row
columnName string the column name
valueIfNull System.Guid the value to replace if null
Résultat System.Guid

AsGuid() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsGuid ( this row, int ordinal ) : Guid?
row this the row
ordinal int the index of the column
Résultat Guid?

AsGuid() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsGuid ( this row, string columnName ) : Guid?
row this the row
columnName string the column name
Résultat Guid?

AsInt16() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt16 ( this row, int ordinal, short valueIfNull ) : short
row this the row
ordinal int the index of the column
valueIfNull short the value to replace if null
Résultat short

AsInt16() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt16 ( this row, string columnName, short valueIfNull ) : short
row this the row
columnName string the column name
valueIfNull short the value to replace if null
Résultat short

AsInt16() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt16 ( this row, int ordinal ) : short?
row this the row
ordinal int the index of the column
Résultat short?

AsInt16() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt16 ( this row, string columnName ) : short?
row this the row
columnName string the column name
Résultat short?

AsInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt32 ( this row, int ordinal, int valueIfNull ) : int
row this the row
ordinal int the index of the column
valueIfNull int the value to replace if null
Résultat int

AsInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt32 ( this row, string columnName, int valueIfNull ) : int
row this the row
columnName string the column name
valueIfNull int the value to replace if null
Résultat int

AsInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt32 ( this row, int ordinal ) : int?
row this the row
ordinal int the index of the column
Résultat int?

AsInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt32 ( this row, string columnName ) : int?
row this the row
columnName string the column name
Résultat int?

AsInt64() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt64 ( this row, int ordinal, long valueIfNull ) : long
row this the row
ordinal int the index of the column
valueIfNull long the value to replace if null
Résultat long

AsInt64() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt64 ( this row, string columnName, long valueIfNull ) : long
row this the row
columnName string the column name
valueIfNull long the value to replace if null
Résultat long

AsInt64() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt64 ( this row, int ordinal ) : long?
row this the row
ordinal int the index of the column
Résultat long?

AsInt64() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsInt64 ( this row, string columnName ) : long?
row this the row
columnName string the column name
Résultat long?

AsSingle() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsSingle ( this row, int ordinal, float valueIfNull ) : float
row this the row
ordinal int the index of the column
valueIfNull float the value to replace if null
Résultat float

AsSingle() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsSingle ( this row, string columnName, float valueIfNull ) : float
row this the row
columnName string the column name
valueIfNull float the value to replace if null
Résultat float

AsSingle() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsSingle ( this row, int ordinal ) : float?
row this the row
ordinal int the index of the column
Résultat float?

AsSingle() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsSingle ( this row, string columnName ) : float?
row this the row
columnName string the column name
Résultat float?

AsString() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsString ( this row, int ordinal ) : string
row this the row
ordinal int the index of the column
Résultat string

AsString() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsString ( this row, int ordinal, string valueIfNull ) : string
row this the row
ordinal int the index of the column
valueIfNull string the value to replace if null
Résultat string

AsString() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsString ( this row, string columnName ) : string
row this the row
columnName string the column name
Résultat string

AsString() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsString ( this row, string columnName, string valueIfNull ) : string
row this the row
columnName string the column name
valueIfNull string the value to replace if null
Résultat string

AsUInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsUInt32 ( this row, int ordinal, uint valueIfNull ) : uint
row this the row
ordinal int the index of the column
valueIfNull uint the value to replace if null
Résultat uint

AsUInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsUInt32 ( this row, string columnName, uint valueIfNull ) : uint
row this the row
columnName string the column name
valueIfNull uint the value to replace if null
Résultat uint

AsUInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsUInt32 ( this row, int ordinal ) : uint?
row this the row
ordinal int the index of the column
Résultat uint?

AsUInt32() public static méthode

Attempts to type cast the specified column of a to the defined type.
public static AsUInt32 ( this row, string columnName ) : uint?
row this the row
columnName string the column name
Résultat uint?