The IReactPropertyBag provides a thread-safe property storage. Properties are identified by IReactPropertyName instance. It is expected that there will be no direct use of this interface. Ideally, all usage should happen through a strongly typed accessors.
Object Get(IReactPropertyName name)
Get property value by its name. It returns null if the property does not exist.
Object GetOrCreate(IReactPropertyName name, ReactCreatePropertyValue createValue)
Get property value for the property name. If the property does not exist, then create it by calling createValue delegate.
The function may return null if the createValue returns null when called.
The createValue is called outside of lock. It is possible that its result is not used in case if other thread sets the property value before the created value is applied.
Object Set(IReactPropertyName name, Object value)
Set property value for the property name.
It returns previously stored property value. It returns null if property did not exist. If the new value is null, then the property is removed.
delegate Object ReactCreatePropertyValue()
The delegate is used to create property value on-demand.