WireData

References
[IoId("00000000-3adc-4a53-917a-f6aa95c83138")] public struct WireData : IEquatable<WireData>, IComparable<WireData>, IStorable
Represents the instance ids of the parameters at either end of a wire, as well as the indices within the respective input and output arrays.

Constructors

WireData

#
public WireData(Guid source, Guid target, int sourceIndex, int targetIndex)
Create new wire data.
source (Guid)Source id.
target (Guid)Target id.
sourceIndex (int)Index of wire in source output array.
targetIndex (int)Index of wire in target input array.

WireData

#
public WireData(IReader reader)
reader (IReader)

Properties

Source

#
public Guid Source { get; }
Gets the source id.

SourceIndex

#
public int SourceIndex { get; }
Gets the index of this wire in the source output array.

Target

#
public Guid Target { get; }
Gets the target id.

TargetIndex

#
public int TargetIndex { get; }
Gets the index of this wire in the target input array.

Methods

CompareTo

#
public int CompareTo(WireData other)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
other (WireData)An object to compare with this instance.
A value that indicates the relative order of the objects being compared. The return value has these meanings:
ValueMeaning
Less than zeroThis instance precedes other in the sort order.
ZeroThis instance occurs in the same position in the sort order as other.
Greater than zeroThis instance follows other in the sort order.

Equals

#
public override bool Equals(object obj)
Indicates whether this instance and a specified object are equal.
obj (object)The object to compare with the current instance.
true if obj and this instance are the same type and represent the same value; otherwise, false.
ValueType.Equals

Equals

#
public bool Equals(WireData other)
Indicates whether the current object is equal to another object of the same type.
other (WireData)An object to compare with this object.
true if the current object is equal to the other parameter; otherwise, false.

GetHashCode

#
public override int GetHashCode()
Returns the hash code for this instance.
A 32-bit signed integer that is the hash code for this instance.
Explicit

IStorable.Store

#
void IStorable.Store(IWriter writer)
writer (IWriter)
Store

ToString

#
public override string ToString()
Returns the fully qualified type name of this instance.
The fully qualified type name.

TryConnect

#
public bool TryConnect(Document document, ActionList undo = null)
Try and create the wire between the specified parameters.
document (Document)Document which is supposed to contain the parameters.
undo (ActionList = null)Undo action list to populate.
True if both parameters were connected.

TryCreate

#
public static bool TryCreate(IParameter source, IParameter target, out WireData data)
Attempt to create wire data from two parameters. This method does not validate whether both parameters belong to the same document, or indeed any document.
source (IParameter)Source parameter.
target (IParameter)Target parameter.
data (out WireData)Data if a wire exists between the two parameters.
True on success, false on failure.

TryDisconnect

#
public bool TryDisconnect(Document document, ActionList undo = null)
Try and remove the wire between the specified parameters. If the connection exists but it at different indices, it will still be removed.
document (Document)Document which is supposed to contain the parameters.
undo (ActionList = null)Undo action list to populate.
True if both parameters were disconnected.