C# Class Pathfinder.Util.DictionaryExtensions

Datei anzeigen Open project: Arkhist/Hacknet-Pathfinder

Public Methods

Method Description
GetAnyOrThrow ( Dictionary dict, Array keys, string exMessage, Predicate validator = null ) : string
GetBool ( Dictionary dict, key, bool defaultVal = false ) : bool
GetByte ( Dictionary dict, key, byte defaultVal ) : byte
GetColor ( Dictionary dict, key, Color? defaultVal = null ) : Color?
GetComp ( Dictionary dict, key, SearchType searchType = SearchType.Any, string exMessage = null ) : Computer
GetFloat ( Dictionary dict, key, float defaultVal = 0f ) : float
GetInt ( Dictionary dict, key, int defaultVal ) : int
GetOrDefault ( Dictionary dict, key ) : TValue
GetOrThrow ( Dictionary dict, key, string exMessage, Predicate validator = null ) : string
GetOrWarn ( Dictionary dict, key, string warnMessage, Predicate validator = null ) : string
GetString ( Dictionary dict, key, string defaultVal = "" ) : string
GetVector ( Dictionary dict, x, y, Vector2? defaultVal = null ) : Vector2?

Method Details

GetAnyOrThrow() public static method

public static GetAnyOrThrow ( Dictionary dict, Array keys, string exMessage, Predicate validator = null ) : string
dict Dictionary
keys Array
exMessage string
validator Predicate
return string

GetBool() public static method

public static GetBool ( Dictionary dict, key, bool defaultVal = false ) : bool
dict Dictionary
defaultVal bool
return bool

GetByte() public static method

public static GetByte ( Dictionary dict, key, byte defaultVal ) : byte
dict Dictionary
defaultVal byte
return byte

GetColor() public static method

public static GetColor ( Dictionary dict, key, Color? defaultVal = null ) : Color?
dict Dictionary
defaultVal Color?
return Color?

GetComp() public static method

public static GetComp ( Dictionary dict, key, SearchType searchType = SearchType.Any, string exMessage = null ) : Computer
dict Dictionary
searchType SearchType
exMessage string
return Computer

GetFloat() public static method

public static GetFloat ( Dictionary dict, key, float defaultVal = 0f ) : float
dict Dictionary
defaultVal float
return float

GetInt() public static method

public static GetInt ( Dictionary dict, key, int defaultVal ) : int
dict Dictionary
defaultVal int
return int

GetOrDefault() public static method

public static GetOrDefault ( Dictionary dict, key ) : TValue
dict Dictionary
return TValue

GetOrThrow() public static method

public static GetOrThrow ( Dictionary dict, key, string exMessage, Predicate validator = null ) : string
dict Dictionary
exMessage string
validator Predicate
return string

GetOrWarn() public static method

public static GetOrWarn ( Dictionary dict, key, string warnMessage, Predicate validator = null ) : string
dict Dictionary
warnMessage string
validator Predicate
return string

GetString() public static method

public static GetString ( Dictionary dict, key, string defaultVal = "" ) : string
dict Dictionary
defaultVal string
return string

GetVector() public static method

public static GetVector ( Dictionary dict, x, y, Vector2? defaultVal = null ) : Vector2?
dict Dictionary
defaultVal Vector2?
return Vector2?