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

◆ PropertyBag() [1/3]

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

◆ PropertyBag() [2/3]

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

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

Parameters
valuesThe values.

◆ PropertyBag() [3/3]

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

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

Parameters
valuesThe values.

Member Function Documentation

◆ AsDictionary()

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

◆ GetAll()

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

The get all.

Returns
A list of all properties

◆ GetProperties() [1/4]

Hashtable Photon.Hive.Plugin.PropertyBag< TKey >.GetProperties ( )
inline

Get all properties.

Returns
A copy of all properties with keys

◆ GetProperties() [2/4]

Hashtable Photon.Hive.Plugin.PropertyBag< TKey >.GetProperties ( IEnumerable  propertyKeys)
inline

The get properties.

Parameters
propertyKeysThe property keys.
Returns
The values for the given propertyKeys

◆ GetProperties() [3/4]

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

◆ GetProperties() [4/4]

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

◆ GetProperty()

Property<TKey> Photon.Hive.Plugin.PropertyBag< TKey >.GetProperty ( TKey  key)
inline

The get property.

Parameters
keyThe key.
Returns
The value for the key .

◆ Set()

void Photon.Hive.Plugin.PropertyBag< TKey >.Set ( TKey  key,
object  value 
)
inline

The set.

Parameters
keyThe key.
valueThe value.

◆ SetProperties() [1/2]

void Photon.Hive.Plugin.PropertyBag< TKey >.SetProperties ( IDictionary  values)
inline

The set properties.

Parameters
valuesThe values.

◆ SetProperties() [2/2]

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

The set properties.

Parameters
valuesThe values.

◆ SetPropertiesCAS() [1/2]

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

◆ SetPropertiesCAS() [2/2]

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

◆ TryGetValue()

bool Photon.Hive.Plugin.PropertyBag< TKey >.TryGetValue ( TKey  key,
out object  value 
)
inline

Property Documentation

◆ Count

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

Gets the number of properties in this instance.

Event Documentation

◆ PropertyChanged

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

The property changed event.