Diffusion .NET Classic API - Core and Common  5.9.4
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
PushTechnology.DiffusionCore.PropertyHandler.BaseProperties Class Referenceabstract

This is the base class for loading and controlling property files. If the PropertyFile is dynamic then the last time modified will be checked before each GetProperty call. If required the property file will be re-loaded picking up all of the new values. More...

Inheritance diagram for PushTechnology.DiffusionCore.PropertyHandler.BaseProperties:
PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler PushTechnology.DiffusionCore.PropertyHandlers.DiffusionProperties

Public Member Functions

override string GetProperty (string key)
 Gets a property given a string-based key. More...
 
void SaveProperties (string header)
 Persists the properties. More...
 
- Public Member Functions inherited from PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl
 PropertyHandlerImpl ()
 Constructor. More...
 
 PropertyHandlerImpl (Properties properties)
 Constructor. More...
 
bool PropertyExists (string key)
 Indicates whether a value for a particular property exists. More...
 
string GetProperty (string key, string defaultValue)
 Get a property if it exists, otherwise return a default value. More...
 
string GetProperty (string key, string defaultValue, params string[] allowedValues)
 Get a property if it exists and validate it against a set of allowed values. More...
 
string GetMandatoryProperty (string key)
 Get a mandatory property. More...
 
void SetProperty (string key, string value)
 Sets a property value. More...
 
int GetIntegerProperty (string key)
 Get an integer property. More...
 
int GetIntegerProperty (string key, int defaultValue)
 Get an integer property if it exists, otherwise return a default value. More...
 
long GetLongProperty (string key)
 Get a long property. More...
 
long GetLongProperty (string key, long defaultValue)
 Get a long property if it exists, otherwise return a default value. More...
 
List< string > GetListProperty (string key)
 Gets the value of a list property. More...
 
ISet< string > GetSetProperty (string key)
 Gets the value of a set property. More...
 
bool GetBooleanProperty (string key)
 Gets the value of a boolean property. More...
 

Static Public Member Functions

static void SetPropertiesDirectory (string dirName)
 Allows the properties directory to be set. More...
 

Protected Member Functions

 BaseProperties (bool dynamic, bool loadFromFile, bool useIsolatedStorage)
 Constructor. More...
 
string GetPropertiesFileName ()
 Returns the filename of the properties file. More...
 
string GetIsolatedStoreResourceName ()
 Returns the isolated storage resource name of the properties file. More...
 
abstract string GetPropertiesName ()
 Gets the name of the properties file. More...
 
int GetPort (string key)
 Gets a port value. More...
 

Additional Inherited Members

- Properties inherited from PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl
Properties Properties [get, set]
 Returns the set of properties. More...
 

Detailed Description

This is the base class for loading and controlling property files. If the PropertyFile is dynamic then the last time modified will be checked before each GetProperty call. If required the property file will be re-loaded picking up all of the new values.

Constructor & Destructor Documentation

PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.BaseProperties ( bool  dynamic,
bool  loadFromFile,
bool  useIsolatedStorage 
)
protected

Constructor.

Parameters
dynamic
loadFromFile
useIsolatedStorage

Member Function Documentation

string PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.GetIsolatedStoreResourceName ( )
protected

Returns the isolated storage resource name of the properties file.

Returns
int PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.GetPort ( string  key)
protected

Gets a port value.

The property must be present and must contain a valid port number otherwise an exception will be thrown.

Parameters
key
Returns
string PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.GetPropertiesFileName ( )
protected

Returns the filename of the properties file.

Returns
abstract string PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.GetPropertiesName ( )
protectedpure virtual

Gets the name of the properties file.

Returns

Implemented in PushTechnology.DiffusionCore.PropertyHandlers.DiffusionProperties.

override string PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.GetProperty ( string  key)
virtual

Gets a property given a string-based key.

Parameters
key
Returns

Reimplemented from PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.

void PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.SaveProperties ( string  header)

Persists the properties.

Parameters
header
static void PushTechnology.DiffusionCore.PropertyHandler.BaseProperties.SetPropertiesDirectory ( string  dirName)
static

Allows the properties directory to be set.

Parameters
dirName