Interface IPin
Represents a pin containing a value on a INode
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public interface IPin
Properties
ConnectedTo
Gets a read only list of pins this pin is connected to
Declaration
IReadOnlyList<IPin> ConnectedTo { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<IPin> |
Direction
Gets the direction of the pin
Declaration
PinDirection Direction { get; }
Property Value
Type | Description |
---|---|
PinDirection |
IsEvaluated
Gets or sets a boolean indicating whether this pin is evaluated or not
Declaration
bool IsEvaluated { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsNumeric
Gets a boolean indicating whether the type of this pin is numeric.
Declaration
bool IsNumeric { get; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets or sets the name of the pin
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Node
Gets the node the pin belongs to
Declaration
INode Node { get; }
Property Value
Type | Description |
---|---|
INode |
PinValue
Gets the value the pin holds
Declaration
object? PinValue { get; }
Property Value
Type | Description |
---|---|
object |
Type
Gets the type of value the pin holds
Declaration
Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
ConnectTo(IPin)
Connects the pin to the provided pin
Declaration
void ConnectTo(IPin pin)
Parameters
Type | Name | Description |
---|---|---|
IPin | pin | The pin to connect this pin to |
DisconnectAll()
Disconnects all pins this pin is connected to
Declaration
void DisconnectAll()
DisconnectFrom(IPin)
Disconnects the pin to the provided pin
Declaration
void DisconnectFrom(IPin pin)
Parameters
Type | Name | Description |
---|---|---|
IPin | pin | The pin to disconnect this pin to |
IsTypeCompatible(Type, bool)
Determines whether this pin is compatible with the given type
Declaration
bool IsTypeCompatible(Type type, bool forgivingEnumMatching = true)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to check for compatibility |
bool | forgivingEnumMatching | A boolean indicating whether or not enums should be exactly equal or just both be enums |
Returns
Type | Description |
---|---|
bool |
Reset()
Resets the pin, causing it to re-evaluate the next time its value is requested
Declaration
void Reset()
Events
PinConnected
Occurs when the pin connects to another pin
Declaration
event EventHandler<SingleValueEventArgs<IPin>> PinConnected
Event Type
Type | Description |
---|---|
EventHandler<SingleValueEventArgs<IPin>> |
PinDisconnected
Occurs when the pin disconnects from another pin
Declaration
event EventHandler<SingleValueEventArgs<IPin>> PinDisconnected
Event Type
Type | Description |
---|---|
EventHandler<SingleValueEventArgs<IPin>> |