C# Class DataTools.Extensions

Afficher le fichier Open project: gothos-folly/TeraDataTools

Méthodes publiques

Méthode Description
GetFloat ( Dictionary dictionary, key, float defaultValue ) : float
GetInt ( Dictionary dictionary, key, int defaultValue ) : int
GetLong ( Dictionary dictionary, key, long defaultValue ) : long
GetString ( Dictionary dictionary, key, string defaultValue = null ) : string
GetValueOrDefault ( Dictionary dictionary, key, defaultValue = default(TValue) ) : TValue
Map ( input, Func map ) : TResult
Map ( T? input, Func map ) : TResult

Private Methods

Méthode Description
ToFloat ( object s ) : float?
ToInt ( object s ) : int?
ToLong ( object s ) : long?
ToString ( object s ) : string

Method Details

GetFloat() public static méthode

public static GetFloat ( Dictionary dictionary, key, float defaultValue ) : float
dictionary Dictionary
defaultValue float
Résultat float

GetInt() public static méthode

public static GetInt ( Dictionary dictionary, key, int defaultValue ) : int
dictionary Dictionary
defaultValue int
Résultat int

GetLong() public static méthode

public static GetLong ( Dictionary dictionary, key, long defaultValue ) : long
dictionary Dictionary
defaultValue long
Résultat long

GetString() public static méthode

public static GetString ( Dictionary dictionary, key, string defaultValue = null ) : string
dictionary Dictionary
defaultValue string
Résultat string

GetValueOrDefault() public static méthode

public static GetValueOrDefault ( Dictionary dictionary, key, defaultValue = default(TValue) ) : TValue
dictionary Dictionary
Résultat TValue

Map() public static méthode

public static Map ( input, Func map ) : TResult
map Func
Résultat TResult

Map() public static méthode

public static Map ( T? input, Func map ) : TResult
input T?
map Func
Résultat TResult