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

This class reads a configuration section for a profile name and merges it with profile section 'Common'. More...

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

Public Member Functions

 ProfileReader (NameValueCollection settings)
 Initializes a new instance of the ProfileReader class. More...
 
- Public Member Functions inherited from ExitGames.Configuration.NameValueCollectionReader
 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...
 

Static Public Member Functions

static ProfileReader Create (string profile, string profilesSection)
 Creates a new instance from the given pofile name. More...
 
static string ReadCurrentProfileName ()
 Reads the profile name from AppSettings.Profile. More...
 

Additional Inherited Members

- Properties inherited from ExitGames.Configuration.NameValueCollectionReader
NameValueCollection Collection [get]
 Gets the collection. More...
 

Detailed Description

This class reads a configuration section for a profile name and merges it with profile section 'Common'.

Constructor & Destructor Documentation

ExitGames.Configuration.ProfileReader.ProfileReader ( NameValueCollection  settings)
inline

Initializes a new instance of the ProfileReader class.

Parameters
settingsThe settings.

Member Function Documentation

static ProfileReader ExitGames.Configuration.ProfileReader.Create ( string  profile,
string  profilesSection 
)
inlinestatic

Creates a new instance from the given pofile name.

Parameters
profileThe profile.
profilesSectionThe profiles section.
Returns
A new instance of ProfileReader.
Exceptions
ConfigurationExceptionProfile not found.
static string ExitGames.Configuration.ProfileReader.ReadCurrentProfileName ( )
inlinestatic

Reads the profile name from AppSettings.Profile.

Returns
The profile name.
Exceptions
ConfigurationExceptionKey 'Profile' missing in AppSettings.