Photon Server API
Public Member Functions | Properties | List of all members
ExitGames.Configuration.NameValueCollectionReader Class Reference

Reads values from a NameValueCollection. More...

Inheritance diagram for ExitGames.Configuration.NameValueCollectionReader:
ExitGames.Configuration.ProfileReader

Public Member Functions

 NameValueCollectionReader (NameValueCollection collection)
 Initializes a new instance of the NameValueCollectionReader class. More...
 
string GetOptionalValue (string key, string defaultValue)
 Gets an optional string value. More...
 
bool GetOptionalValueBoolean (string key, bool defaultValue)
 Gets an optional boolean value. More...
 
byte GetOptionalValueByte (string key, byte defaultValue)
 Gets an optional byte value. More...
 
int GetOptionalValueInteger (string key, int defaultValue)
 Gets an optional integer value. More...
 
string GetValue (string key)
 Gets a mandatory string value. More...
 
bool GetValueBoolean (string key)
 Gets a mandatory boolean value. More...
 
byte GetValueByte (string key)
 Gets a mandatory byte value. More...
 
int GetValueInteger (string key)
 Gets a mandatory integer value. More...
 
bool TryGetValue (string key, out string value)
 Tries to find a string value. More...
 
bool TryGetValueBoolean (string key, out bool value)
 Tries to find a boolean value. More...
 
bool TryGetValueByte (string key, out byte value)
 Tries to find a byte value. More...
 
bool TryGetValueInteger (string key, out int value)
 Tries to find an integer value. More...
 

Properties

NameValueCollection Collection [get]
 Gets the collection. More...
 

Detailed Description

Reads values from a NameValueCollection.

Constructor & Destructor Documentation

ExitGames.Configuration.NameValueCollectionReader.NameValueCollectionReader ( NameValueCollection  collection)
inline

Initializes a new instance of the NameValueCollectionReader class.

Parameters
collectionThe collection.

Member Function Documentation

string ExitGames.Configuration.NameValueCollectionReader.GetOptionalValue ( string  key,
string  defaultValue 
)
inline

Gets an optional string value.

Parameters
keyThe key.
defaultValueThe default value.
Returns
If found the value; otherwise the defaultValue .
bool ExitGames.Configuration.NameValueCollectionReader.GetOptionalValueBoolean ( string  key,
bool  defaultValue 
)
inline

Gets an optional boolean value.

Parameters
keyThe key.
defaultValueThe default value.
Returns
If found the value; otherwise the defaultValue .
byte ExitGames.Configuration.NameValueCollectionReader.GetOptionalValueByte ( string  key,
byte  defaultValue 
)
inline

Gets an optional byte value.

Parameters
keyThe key.
defaultValueThe default value.
Returns
If found the value; otherwise the defaultValue .
int ExitGames.Configuration.NameValueCollectionReader.GetOptionalValueInteger ( string  key,
int  defaultValue 
)
inline

Gets an optional integer value.

Parameters
keyThe key.
defaultValueThe default value.
Returns
If found the value; otherwise the defaultValue .
string ExitGames.Configuration.NameValueCollectionReader.GetValue ( string  key)
inline

Gets a mandatory string value.

Parameters
keyThe key.
Returns
The value.
Exceptions
ConfigurationExceptionKey missing in collection.
bool ExitGames.Configuration.NameValueCollectionReader.GetValueBoolean ( string  key)
inline

Gets a mandatory boolean value.

Parameters
keyThe key.
Returns
The value.
Exceptions
ConfigurationExceptionKey missing in collection.
byte ExitGames.Configuration.NameValueCollectionReader.GetValueByte ( string  key)
inline

Gets a mandatory byte value.

Parameters
keyThe key.
Returns
The value.
Exceptions
ConfigurationExceptionKey missing in collection.
int ExitGames.Configuration.NameValueCollectionReader.GetValueInteger ( string  key)
inline

Gets a mandatory integer value.

Parameters
keyThe key.
Returns
The value.
Exceptions
ConfigurationExceptionKey missing in collection.
bool ExitGames.Configuration.NameValueCollectionReader.TryGetValue ( string  key,
out string  value 
)
inline

Tries to find a string value.

Parameters
keyThe key.
valueThe result value.
Returns
True on succes, otherwise false.
bool ExitGames.Configuration.NameValueCollectionReader.TryGetValueBoolean ( string  key,
out bool  value 
)
inline

Tries to find a boolean value.

Parameters
keyThe key.
valueThe result value.
Returns
True on succes, otherwise false.
Exceptions
ConfigurationExceptionValue parse error.
bool ExitGames.Configuration.NameValueCollectionReader.TryGetValueByte ( string  key,
out byte  value 
)
inline

Tries to find a byte value.

Parameters
keyThe key.
valueThe result value.
Returns
True on succes, otherwise false.
Exceptions
ConfigurationExceptionValue parse error.
bool ExitGames.Configuration.NameValueCollectionReader.TryGetValueInteger ( string  key,
out int  value 
)
inline

Tries to find an integer value.

Parameters
keyThe key.
valueThe result value.
Returns
True on succes, otherwise false.
Exceptions
ConfigurationExceptionValue parse error.

Property Documentation

NameValueCollection ExitGames.Configuration.NameValueCollectionReader.Collection
get

Gets the collection.