Class BindingAttribute
Register a binding inside nodes. Bindings are specific to the NodeInstance, SystemGraph does not manage any of the data inside bindings. Bindings differ from properties in that they are initialized earlier in the lifecylce. You can access the data in bindings from InternalInitialize() in the node. For these reasons bindings are highly recommended if your node is the the only consumer of the external data, and different instances of your node may require different instances of the external data.
Namespace: Mechatronics.SystemGraph
Syntax
[AttributeUsage(AttributeTargets.Field)]
public class BindingAttribute : Attribute, _Attribute
Constructors
BindingAttribute(String)
Initializes a binding.
Declaration
public BindingAttribute(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | Name for the binding. |
Fields
Name
Name for the binding, will show up in the inspector as "NodeName.BindingName"
Declaration
public string Name
Field Value
| Type | Description |
|---|---|
| String |
Methods
ExtractAll(Object)
Extract all bindings from an object.
Declaration
public static List<FieldInfo> ExtractAll(object instance)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | instance | Object to extract bindings from. |
Returns
| Type | Description |
|---|---|
| List<FieldInfo> | List of fields which are bindings. |