Back to Class Reference home page
System.Collections.Generic.Dictionary<string, object>
MVVMbasics.Services.ParameterList
public class ParameterList : Dictionary<string, object>
Helper class that holds several Parameters which have been passed to a View during navigation.
Constructor Summary | |
---|---|
public |
ParameterList()
Empty Constructor. |
public |
ParameterList(params Parameter[] parameters)
Constructor that expects one or several Parameter objects and creates a ParameterList of those.
|
Method Summary | |
---|---|
bool |
Contains(string key)
Checks whether a Parameter with specified key exists within this ParameterList .
|
T |
Get<T>(string key)
Getter for Parameter values of custom types. |
bool |
TryGet<T>(string key, out T result)
Getter for Parameter values of custom types that checks whether a parameter with the specified key exists. |
object |
Getter for Parameter values of type object .
Deprecated. User Get<T>(string key) instead.
|
bool |
Getter for Parameter values of type object that checks whether a parameter with the specified key exists.
Deprecated. User TryGet<T>(string key, out T result) instead.
|
string |
GetString(string key)
Getter for Parameter values of type string .
|
bool |
TryGetString(string key, out string result)
Getter for Parameter values of type string that checks whether a parameter with the specified key exists.
|
int |
GetInt(string key)
Getter for Parameter values of type int .
|
bool |
TryGetInt(string key, out int result)
Getter for Parameter values of type int that checks whether a parameter with the specified key exists.
|
uint |
GetUInt(string key)
Getter for Parameter values of type uint .
|
bool |
TryGetUInt(string key, out uint result)
Getter for Parameter values of type uint that checks whether a parameter with the specified key exists.
|
double |
GetDouble(string key)
Getter for Parameter values of type double .
|
bool |
TryGetDouble(string key, out double result)
Getter for Parameter values of type double that checks whether a parameter with the specified key exists.
|
long |
GetLong(string key)
Getter for Parameter values of type long .
|
bool |
TryGetLong(string key, out long result)
Getter for Parameter values of type long that checks whether a parameter with the specified key exists.
|
short |
GetShort(string key)
Getter for Parameter values of type short .
|
bool |
TryGetShort(string key, out short result)
Getter for Parameter values of type short that checks whether a parameter with the specified key exists.
|
ulong |
GetULong(string key)
Getter for Parameter values of type ulong .
|
bool |
TryGetULong(string key, out ulong result)
Getter for Parameter values of type ulong that checks whether a parameter with the specified key exists.
|
ushort |
GetUShort(string key)
Getter for Parameter values of type ushort .
|
bool |
TryGetUShort(string key, out ushort result)
Getter for Parameter values of type ushort that checks whether a parameter with the specified key exists.
|
byte |
GetByte(string key)
Getter for Parameter values of type byte .
|
bool |
TryGetByte(string key, out byte result)
Getter for Parameter values of type byte that checks whether a parameter with the specified key exists.
|
sbyte |
GetSByte(string key)
Getter for Parameter values of type sbyte .
|
bool |
TryGetSByte(string key, out sbyte result)
Getter for Parameter values of type sbyte that checks whether a parameter with the specified key exists.
|
bool |
GetBoolean(string key)
Getter for Parameter values of type bool .
|
bool |
TryGetBoolean(string key, out bool result)
Getter for Parameter values of type bool that checks whether a parameter with the specified key exists.
|
char |
GetChar(string key)
Getter for Parameter values of type char .
|
bool |
TryGetChar(string key, out char result)
Getter for Parameter values of type char that checks whether a parameter with the specified key exists.
|
DateTime |
GetDateTime(string key)
Getter for Parameter values of type DateTime. |
bool |
TryGetDateTime(string key, out DateTime result)
Getter for Parameter values of type DateTime that checks whether a parameter with the specified key exists. |
void |
Add(params Parameter[] parameters)
Adds one or several Parameter objects to this ParameterList .
|
void |
Add(string key, object value)
(Inherited from Dictionary<string, object>.) |
Constructor Detail |
---|
public ParameterList()
Empty Constructor.
public ParameterList(params Parameter[] parameters)
Constructor that expects one or several Parameter objects and creates a ParameterList
of those.
parameters
- One or several Parameter objects
Method Detail |
---|
public bool Contains(string key)
Checks whether a Parameter with specified key exists within this ParameterList
.
key
- Key of the Parameter to be searched.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public T Get<T>(string key)
Getter for Parameter values of custom types.
T
- Value of the desired Parameter to be retrieved.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGet<T>(string key, out T result)
Getter for Parameter values of custom types that checks whether a parameter with the specified key exists.
T
- Value of the desired Parameter to be retrieved.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public object GetObject(string key)
Getter for Parameter values of type object
.
Deprecated. User Get<T>(string key)
instead.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetObject(string key, out object result)
Getter for Parameter values of type object
that checks whether a parameter with the specified key exists.
Deprecated. User TryGet<T>(string key, out T result)
instead.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public string GetString(string key)
Getter for Parameter values of type string
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetString(string key, out string result)
Getter for Parameter values of type string
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public int GetInt(string key)
Getter for Parameter values of type int
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetInt(string key, out int result)
Getter for Parameter values of type int
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public uint GetUInt(string key)
Getter for Parameter values of type uint
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetUInt(string key, out uint result)
Getter for Parameter values of type uint
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public double GetDouble(string key)
Getter for Parameter values of type double
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetDouble(string key, out double result)
Getter for Parameter values of type double
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public long GetLong(string key)
Getter for Parameter values of type long
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetLong(string key, out long result)
Getter for Parameter values of type long
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public short GetShort(string key)
Getter for Parameter values of type short
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetShort(string key, out short result)
Getter for Parameter values of type short
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public ulong GetULong(string key)
Getter for Parameter values of type ulong
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetULong(string key, out ulong result)
Getter for Parameter values of type ulong
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public ushort GetUShort(string key)
Getter for Parameter values of type ushort
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetUShort(string key, out ushort result)
Getter for Parameter values of type ushort
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public byte GetByte(string key)
Getter for Parameter values of type byte
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetByte(string key, out byte result)
Getter for Parameter values of type byte
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public sbyte GetSByte(string key)
Getter for Parameter values of type sbyte
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetSByte(string key, out sbyte result)
Getter for Parameter values of type sbyte
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public bool GetBoolean(string key)
Getter for Parameter values of type bool
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetBoolean(string key, out bool result)
Getter for Parameter values of type bool
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public char GetChar(string key)
Getter for Parameter values of type char
.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetChar(string key, out char result)
Getter for Parameter values of type char
that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public DateTime GetDateTime(string key)
Getter for Parameter values of type DateTime.
key
- Key of the Parameter to be retrieved.
Value of the desired Parameter, if specified.
public bool TryGetDateTime(string key, out DateTime result)
Getter for Parameter values of type DateTime that checks whether a parameter with the specified key exists.
key
- Key of the Parameter to be retrieved.
result
- Value of the desired Parameter, if specified.
TRUE if a Parameter with the given key exists, FALSE otherwise.
public void Add(params Parameter[] parameters)
Adds one or several Parameter objects to this ParameterList
.
parameters
- Parameter objects to be added to the ParameterList
.
public void Add(string key, object value)
(Inherited from Dictionary<string, object>.)