Table of Contents

Interface IPin

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

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

IReadOnlyList<IPin>

Direction

Gets the direction of the pin

PinDirection Direction { get; }

Property Value

PinDirection

IsEvaluated

Gets or sets a boolean indicating whether this pin is evaluated or not

bool IsEvaluated { get; set; }

Property Value

bool

IsNumeric

Gets a boolean indicating whether the type of this pin is numeric.

bool IsNumeric { get; }

Property Value

bool

Name

Gets or sets the name of the pin

string Name { get; set; }

Property Value

string

Node

Gets the node the pin belongs to

INode Node { get; }

Property Value

INode

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

Type

Methods

ConnectTo(IPin)

Connects the pin to the provided pin

void ConnectTo(IPin pin)

Parameters

pin IPin

The 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

pin IPin

The 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

type Type

The type to check for compatibility

forgivingEnumMatching bool

A boolean indicating whether or not enums should be exactly equal or just both be enums

Returns

bool

true if the type is compatible, otherwise false.

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

EventHandler<SingleValueEventArgs<IPin>>

PinDisconnected

Occurs when the pin disconnects from another pin

event EventHandler<SingleValueEventArgs<IPin>> PinDisconnected

Event Type

EventHandler<SingleValueEventArgs<IPin>>