MVVMbasics Logo

mobilemotion.eu Logo


Back to Class Reference home page


MVVMbasics.Services
Class ParameterList

System.Collections.Generic.Dictionary<string, object>
  extended by 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.
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  GetObject(string key)
Getter for Parameter values of type object.
Deprecated. User Get<T>(string key) instead.
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.
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

ParameterList

public ParameterList()

Empty Constructor.

ParameterList

public ParameterList(params Parameter[] parameters)

Constructor that expects one or several Parameter objects and creates a ParameterList of those.

Parameters:

parameters - One or several Parameter objects

Method Detail

Contains

public bool Contains(string key)

Checks whether a Parameter with specified key exists within this ParameterList.

Parameters:

key - Key of the Parameter to be searched.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


Get<T>

public T Get<T>(string key)

Getter for Parameter values of custom types.

Type Parameters:

T - Value of the desired Parameter to be retrieved.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGet<T>

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.

Type Parameters:

T - Value of the desired Parameter to be retrieved.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetObject

public object GetObject(string key)

Getter for Parameter values of type object.

Deprecated. User Get<T>(string key) instead.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetObject

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetString

public string GetString(string key)

Getter for Parameter values of type string.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetString

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetInt

public int GetInt(string key)

Getter for Parameter values of type int.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetInt

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetUInt

public uint GetUInt(string key)

Getter for Parameter values of type uint.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetUInt

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetDouble

public double GetDouble(string key)

Getter for Parameter values of type double.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetDouble

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetLong

public long GetLong(string key)

Getter for Parameter values of type long.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetLong

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetShort

public short GetShort(string key)

Getter for Parameter values of type short.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetShort

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetULong

public ulong GetULong(string key)

Getter for Parameter values of type ulong.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetULong

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetUShort

public ushort GetUShort(string key)

Getter for Parameter values of type ushort.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetUShort

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetByte

public byte GetByte(string key)

Getter for Parameter values of type byte.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetByte

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetSByte

public sbyte GetSByte(string key)

Getter for Parameter values of type sbyte.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetSByte

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetBoolean

public bool GetBoolean(string key)

Getter for Parameter values of type bool.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetBoolean

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetChar

public char GetChar(string key)

Getter for Parameter values of type char.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetChar

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


GetDateTime

public DateTime GetDateTime(string key)

Getter for Parameter values of type DateTime.

Parameters:

key - Key of the Parameter to be retrieved.

Returns:

Value of the desired Parameter, if specified.


TryGetDateTime

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.

Parameters:

key - Key of the Parameter to be retrieved.

Out Parameters:

result - Value of the desired Parameter, if specified.

Returns:

TRUE if a Parameter with the given key exists, FALSE otherwise.


Add

public void Add(params Parameter[] parameters)

Adds one or several Parameter objects to this ParameterList.

Parameters:

parameters - Parameter objects to be added to the ParameterList.


Add

public void Add(string key, object value)

(Inherited from Dictionary<string, object>.)