Table of Contents

Class PinCollection

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents a collection of IPins on a INode

public abstract class PinCollection : CorePropertyChanged, IPinCollection, IEnumerable<IPin>, IEnumerable
Inheritance
object
CorePropertyChanged
PinCollection
Implements
Derived

Constructors

PinCollection(INode, string)

Creates a new instance of the PinCollection class

protected PinCollection(INode node, string name)

Parameters

node INode

The node the pin collection belongs to

name string

The name of the pin collection

Properties

Direction

Gets the direction of the pin collection and all its pins

public abstract PinDirection Direction { get; }

Property Value

PinDirection

Name

Gets the name of the pin collection

public string Name { get; }

Property Value

string

Node

Gets the node the pin collection belongs to

public INode Node { get; }

Property Value

INode

Pins

Gets a read only observable collection of the pins

public ReadOnlyCollection<IPin> Pins { get; }

Property Value

ReadOnlyCollection<IPin>

Type

Gets the type of values the pin collection and all its pins holds

public abstract Type Type { get; }

Property Value

Type

Methods

Add(IPin)

Adds the provided pin to the collection

public void Add(IPin pin)

Parameters

pin IPin

CreatePin()

Creates a new pin compatible with this collection

public abstract IPin CreatePin()

Returns

IPin

The newly created pin

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<IPin> GetEnumerator()

Returns

IEnumerator<IPin>

An enumerator that can be used to iterate through the collection.

Remove(IPin)

Removes the provided pin from the collection

public bool Remove(IPin pin)

Parameters

pin IPin

The pin to remove

Returns

bool

Reset()

Resets the pin collection, causing its pins to re-evaluate the next time its value is requested

public void Reset()

Events

PinAdded

Occurs when a pin was added to the collection

public event EventHandler<SingleValueEventArgs<IPin>>? PinAdded

Event Type

EventHandler<SingleValueEventArgs<IPin>>

PinRemoved

Occurs when a pin was removed from the collection

public event EventHandler<SingleValueEventArgs<IPin>>? PinRemoved

Event Type

EventHandler<SingleValueEventArgs<IPin>>