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