Interface IConsumerNode
Interface for any node that consumes (takes) data. In other words, any node that has one more in ports.
Inherited Members
Namespace: InsaneScatterbrain.ScriptGraph
Syntax
public interface IConsumerNode : IScriptNode, INode
Properties
InPorts
Gets all the in ports.
Declaration
ReadOnlyCollection<InPort> InPorts { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyCollection<InPort> |
Methods
GetInPort(string)
Returns the in port with the given name.
Declaration
InPort GetInPort(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name. |
Returns
| Type | Description |
|---|---|
| InPort | The in port. |
HasInPort(string)
Returns whether the in port with the given name exists on the node.
Declaration
bool HasInPort(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name. |
Returns
| Type | Description |
|---|---|
| bool | True if the port exists, false otherwise. |
MoveIn(int, int)
Move the in port to a different index
Declaration
void MoveIn(int oldIndex, int newIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldIndex | The port's old index. |
| int | newIndex | The port's new index. |
OnLoadInputPorts()
This method should contain all the in port initialization code. In other words, it should contain all the AddIn calls for the node.
Declaration
void OnLoadInputPorts()
RemoveIn(string)
Removes the in port with the given name from the node.
Declaration
void RemoveIn(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The port's name. |
RenameIn(string, string)
Renames the in port.
Declaration
void RenameIn(string oldName, string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oldName | The port's old name. |
| string | newName | The port's new name. |
Events
OnInPortAdded
Event is triggered everytime an in port is added to the node.
Declaration
event Action<InPort> OnInPortAdded
Event Type
| Type | Description |
|---|---|
| Action<InPort> |
OnInPortMoved
Event is triggered everytime an in port is moved.
Declaration
event Action<InPort, int> OnInPortMoved
Event Type
| Type | Description |
|---|---|
| Action<InPort, int> |
OnInPortRemoved
Event is triggered everytime an in port is removed from the node.
Declaration
event Action<InPort> OnInPortRemoved
Event Type
| Type | Description |
|---|---|
| Action<InPort> |
OnInPortRenamed
Event is triggered everytime an in port is renamed.
Declaration
event Action<InPort, string, string> OnInPortRenamed
Event Type
| Type | Description |
|---|---|
| Action<InPort, string, string> |