Photon Plugins API Documentation
Public Member Functions | Properties | Events | List of all members
Photon.Hive.Plugin.PropertyBag< TKey > Class Template Reference

The property bag. More...

Public Member Functions

 PropertyBag ()
 Initializes a new instance of the PropertyBag<TKey> class. More...
 
 PropertyBag (IEnumerable< KeyValuePair< TKey, object >> values)
 Initializes a new instance of the PropertyBag<TKey> class. More...
 
 PropertyBag (IDictionary values)
 Initializes a new instance of the PropertyBag<TKey> class. More...
 
IDictionary< TKey, Property< TKey > > AsDictionary ()
 
IList< Property< TKey > > GetAll ()
 The get all. More...
 
Hashtable GetProperties ()
 Get all properties. More...
 
Hashtable GetProperties (IList< TKey > propertyKeys)
 The get properties. More...
 
Hashtable GetProperties (IEnumerable< TKey > propertyKeys)
 The get properties. More...
 
Hashtable GetProperties (IEnumerable propertyKeys)
 The get properties. More...
 
Property< TKey > GetProperty (TKey key)
 The get property. More...
 
void Set (TKey key, object value)
 The set. More...
 
void SetProperties (IDictionary values)
 The set properties. More...
 
bool SetPropertiesCAS (IDictionary values, IDictionary expectedValues, out string debugMessage)
 The set properties. More...
 
void SetProperties (IDictionary< TKey, object > values)
 The set properties. More...
 
bool SetPropertiesCAS (IDictionary< TKey, object > values, IDictionary< TKey, object > expectedValues, out string debugMessage)
 The set properties. More...
 
bool TryGetValue (TKey key, out object value)
 

Properties

int Count [get]
 Gets the number of properties in this instance. More...
 

Events

EventHandler< PropertyChangedEventArgs< TKey > > PropertyChanged
 The property changed event. More...
 

Detailed Description

The property bag.

Template Parameters
TKeyThe property key type

Constructor & Destructor Documentation

Initializes a new instance of the PropertyBag<TKey> class.

Photon.Hive.Plugin.PropertyBag< TKey >.PropertyBag ( IEnumerable< KeyValuePair< TKey, object >>  values)
inline

Initializes a new instance of the PropertyBag<TKey> class.

Parameters
valuesThe values.
Photon.Hive.Plugin.PropertyBag< TKey >.PropertyBag ( IDictionary  values)
inline

Initializes a new instance of the PropertyBag<TKey> class.

Parameters
valuesThe values.

Member Function Documentation

IDictionary<TKey, Property<TKey> > Photon.Hive.Plugin.PropertyBag< TKey >.AsDictionary ( )
inline
IList<Property<TKey> > Photon.Hive.Plugin.PropertyBag< TKey >.GetAll ( )
inline

The get all.

Returns
A list of all properties
Hashtable Photon.Hive.Plugin.PropertyBag< TKey >.GetProperties ( )
inline

Get all properties.

Returns
A copy of all properties with keys
Hashtable Photon.Hive.Plugin.PropertyBag< TKey >.GetProperties ( IList< TKey >  propertyKeys)
inline

The get properties.

Parameters
propertyKeysThe property keys.
Returns
The values for the given propertyKeys
Hashtable Photon.Hive.Plugin.PropertyBag< TKey >.GetProperties ( IEnumerable< TKey >  propertyKeys)
inline

The get properties.

Parameters
propertyKeysThe property keys.
Returns
The values for the given propertyKeys
Hashtable Photon.Hive.Plugin.PropertyBag< TKey >.GetProperties ( IEnumerable  propertyKeys)
inline

The get properties.

Parameters
propertyKeysThe property keys.
Returns
The values for the given propertyKeys
Property<TKey> Photon.Hive.Plugin.PropertyBag< TKey >.GetProperty ( TKey  key)
inline

The get property.

Parameters
keyThe key.
Returns
The value for the key .
void Photon.Hive.Plugin.PropertyBag< TKey >.Set ( TKey  key,
object  value 
)
inline

The set.

Parameters
keyThe key.
valueThe value.
void Photon.Hive.Plugin.PropertyBag< TKey >.SetProperties ( IDictionary  values)
inline

The set properties.

Parameters
valuesThe values.
void Photon.Hive.Plugin.PropertyBag< TKey >.SetProperties ( IDictionary< TKey, object >  values)
inline

The set properties.

Parameters
valuesThe values.
bool Photon.Hive.Plugin.PropertyBag< TKey >.SetPropertiesCAS ( IDictionary  values,
IDictionary  expectedValues,
out string  debugMessage 
)
inline

The set properties.

Parameters
valuesThe values.
expectedValuesThe expected values for properties in order to apply CAS.
debugMessage
bool Photon.Hive.Plugin.PropertyBag< TKey >.SetPropertiesCAS ( IDictionary< TKey, object >  values,
IDictionary< TKey, object >  expectedValues,
out string  debugMessage 
)
inline

The set properties.

Parameters
valuesThe values.
expectedValuesexpected values for properties, which we are going to change
debugMessage
bool Photon.Hive.Plugin.PropertyBag< TKey >.TryGetValue ( TKey  key,
out object  value 
)
inline

Property Documentation

int Photon.Hive.Plugin.PropertyBag< TKey >.Count
get

Gets the number of properties in this instance.

Event Documentation

EventHandler<PropertyChangedEventArgs<TKey> > Photon.Hive.Plugin.PropertyBag< TKey >.PropertyChanged

The property changed event.