Class Dynamic
Supplies class instances with a key-value mapping to support dynamic property storage.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class Dynamic : Serializable
Properties
DynamicProperties
Gets or sets all dynamic properties on this instance.
Declaration
public Dictionary<string, object> DynamicProperties { get; }
Property Value
Type | Description |
---|---|
Dictionary<System.String, System.Object> |
Methods
GetDynamicValue(String)
Gets a property value from the local cache.
Declaration
public object GetDynamicValue(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns
Type | Description |
---|---|
System.Object | The stored value, if found; otherwise null. |
SetDynamicValue(String, Object)
Sets a property value in the local cache.
Declaration
public void SetDynamicValue(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
System.Object | value | The property value. This can be any object that needs to be stored for future use. |
UnsetDynamicValue(String)
Removes a property value from the local cache. Returns true if the value was removed and returns false otherwise.
Declaration
public bool UnsetDynamicValue(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The property key. This key is used internally only, but should be namespaced to avoid conflict with third-party extensions. |
Returns
Type | Description |
---|---|
System.Boolean |
|