Class ExtensibleObject<TBase>
Derived objects can be extended by fields and functions. Extending classes need to be derivations from Supertype.
Namespace: Holoride.ElasticSDK
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
public class ExtensibleObject<TBase>
Type Parameters
Name | Description |
---|---|
TBase |
Fields
Extensions
The extensions attached to this object.
Declaration
protected readonly Dictionary<Type, TBase> Extensions
Field Value
Type | Description |
---|---|
Dictionary<Type, TBase> |
Methods
GetExtension<T>()
Gets an extension of a given type.
Declaration
public T GetExtension<T>() where T : class, TBase
Returns
Type | Description |
---|---|
T | The extension of the given type. |
Type Parameters
Name | Description |
---|---|
T |
SetExtension(TBase)
Sets an extension.
Declaration
public void SetExtension(TBase extension)
Parameters
Type | Name | Description |
---|---|---|
TBase | extension | The extension to set. |
TryGetExtension<T>(out T)
Gets an extension of a given type.
Declaration
public bool TryGetExtension<T>(out T result) where T : class, TBase
Parameters
Type | Name | Description |
---|---|---|
T | result | The extension. |
Returns
Type | Description |
---|---|
bool | Whether the extension was set. |
Type Parameters
Name | Description |
---|---|
T |