C# Class DataTools.Extensions

Mostra file Open project: gothos-folly/TeraDataTools

Public Methods

Method 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

Method Description
ToFloat ( object s ) : float?
ToInt ( object s ) : int?
ToLong ( object s ) : long?
ToString ( object s ) : string

Method Details

GetFloat() public static method

public static GetFloat ( Dictionary dictionary, key, float defaultValue ) : float
dictionary Dictionary
defaultValue float
return float

GetInt() public static method

public static GetInt ( Dictionary dictionary, key, int defaultValue ) : int
dictionary Dictionary
defaultValue int
return int

GetLong() public static method

public static GetLong ( Dictionary dictionary, key, long defaultValue ) : long
dictionary Dictionary
defaultValue long
return long

GetString() public static method

public static GetString ( Dictionary dictionary, key, string defaultValue = null ) : string
dictionary Dictionary
defaultValue string
return string

GetValueOrDefault() public static method

public static GetValueOrDefault ( Dictionary dictionary, key, defaultValue = default(TValue) ) : TValue
dictionary Dictionary
return TValue

Map() public static method

public static Map ( input, Func map ) : TResult
map Func
return TResult

Map() public static method

public static Map ( T? input, Func map ) : TResult
input T?
map Func
return TResult