C# Class BF2Statistics.ServerSettings

Show file Open project: BF2Statistics/ControlCenter Class Usage Examples

Protected Properties

Property Type Description
Items string>.Dictionary

Public Methods

Method Description
GetValue ( string Name ) : string

Method for returning the string value of a settings item

GetValue ( string Name, string DefaultValue ) : string

Method for returning the string value of a settings item

ItemCount ( ) : int

Returns the number of found settings

Save ( ) : void

Saves the current settings to the Server Settings file

ServerSettings ( string FileName ) : System

Constructor

SetValue ( string Name, string Value ) : void

Sets the value for a settings item

Method Details

GetValue() public method

Method for returning the string value of a settings item
Thrown if the named item doesnt exist
public GetValue ( string Name ) : string
Name string The name of the config item
return string

GetValue() public method

Method for returning the string value of a settings item
public GetValue ( string Name, string DefaultValue ) : string
Name string The name of the config item
DefaultValue string The default value to return if the item doesnt exist
return string

ItemCount() public method

Returns the number of found settings
public ItemCount ( ) : int
return int

Save() public method

Saves the current settings to the Server Settings file
public Save ( ) : void
return void

ServerSettings() public method

Constructor
public ServerSettings ( string FileName ) : System
FileName string The full path to the settings.con file
return System

SetValue() public method

Sets the value for a settings item
public SetValue ( string Name, string Value ) : void
Name string Item Name
Value string String value of the item
return void

Property Details

Items protected property

A list of config items
protected Dictionary Items
return string>.Dictionary