![]() |
Diffusion .NET Classic API - Core and Common
5.9.4
|
A Property Handler provides an interface to a set of properties. More...
Public Member Functions | |
bool | PropertyExists (string key) |
Indicates whether a value for a particular property exists. More... | |
string | GetProperty (string key) |
Get a property. 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... | |
A Property Handler provides an interface to a set of properties.
Such properties are typically loaded from a properties file.
bool PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetBooleanProperty | ( | string | key | ) |
Gets the value of a boolean property.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
int PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetIntegerProperty | ( | string | key | ) |
Get an integer property.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
int PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetIntegerProperty | ( | string | key, |
int | defaultValue | ||
) |
Get an integer property if it exists, otherwise return a default value.
key | The property key. |
defaultValue | The value to return if the property does not exist. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
List<string> PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetListProperty | ( | string | key | ) |
Gets the value of a list property.
A list property is interpreted as a list of values separated by ampersand characters.
If you wish to eliminate duplicates from a list then use 'GetSetProperty( string )'.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
long PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetLongProperty | ( | string | key | ) |
Get a long property.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
long PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetLongProperty | ( | string | key, |
long | defaultValue | ||
) |
Get a long property if it exists, otherwise return a default value.
key | The property key. |
defaultValue | The value to return if the property does not exist. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
string PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetMandatoryProperty | ( | string | key | ) |
Get a mandatory property.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
string PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetProperty | ( | string | key | ) |
Get a property.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.BaseProperties, and PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
string PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetProperty | ( | string | key, |
string | defaultValue | ||
) |
Get a property if it exists, otherwise return a default value.
key | The property key. |
defaultValue | The default value to return if the property is not declared. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
string PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetProperty | ( | string | key, |
string | defaultValue, | ||
params string[] | allowedValues | ||
) |
Get a property if it exists and validate it against a set of allowed values.
If the property does not exist then a default value is returned.
key | The property key. |
defaultValue | The default value to return if the property is not declared. |
allowedValues | A list of permitted values. If this list is not supplied then any value would be permitted. The case of the values is not significant and thus any of the values is permitted in any case. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
ISet<string> PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.GetSetProperty | ( | string | key | ) |
Gets the value of a set property.
A set property is interpreted as a list of values separated by ampersand characters. This differs from a list property in that because a set is returned, duplicates are removed. The set order is the same as the list within the properties.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
bool PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.PropertyExists | ( | string | key | ) |
Indicates whether a value for a particular property exists.
key | The property key. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.
void PushTechnology.DiffusionCore.PropertyHandler.IPropertyHandler.SetProperty | ( | string | key, |
string | value | ||
) |
Sets a property value.
key | The property key. |
value | The property value. |
Implemented in PushTechnology.DiffusionCore.PropertyHandler.PropertyHandlerImpl.