Table of Contents

Class ExpressionBuilderArgument

Namespace
Bonsai.Expressions
Assembly
Bonsai.Core.dll

Represents a workflow argument assignment. This class determines the index of a workflow connection and is used to specify the order of input connections to any given node.

[TypeConverter("Bonsai.Design.ExpressionBuilderArgumentTypeConverter, Bonsai.Design")]
public class ExpressionBuilderArgument : IEquatable<ExpressionBuilderArgument>, IComparable<ExpressionBuilderArgument>, IComparable
Inheritance
ExpressionBuilderArgument
Implements
Inherited Members

Constructors

ExpressionBuilderArgument()

Initializes a new instance of the ExpressionBuilderArgument class.

public ExpressionBuilderArgument()

ExpressionBuilderArgument(int)

Initializes a new instance of the ExpressionBuilderArgument class with the specified argument index.

public ExpressionBuilderArgument(int index)

Parameters

index int

The zero-based index of the input argument.

ExpressionBuilderArgument(string)

Initializes a new instance of the ExpressionBuilderArgument class with the specified argument name.

public ExpressionBuilderArgument(string name)

Parameters

name string

The name of the input argument. Arbitrary named arguments are not supported, so all names must start with the ArgumentNamePrefix followed by the one-based argument index.

Fields

ArgumentNamePrefix

The prefix that starts every input argument name.

public const string ArgumentNamePrefix = "Source"

Field Value

string

Properties

Index

Gets or sets the zero-based index of the input argument.

public int Index { get; set; }

Property Value

int

Name

Gets or sets the name of the input argument. Arbitrary named arguments are not supported, so all names must start with the ArgumentNamePrefix followed by the one-based argument index.

public string Name { get; set; }

Property Value

string

Methods

CompareTo(ExpressionBuilderArgument)

Compares the current object with another object of the same type.

public int CompareTo(ExpressionBuilderArgument other)

Parameters

other ExpressionBuilderArgument

An object to compare with this object.

Returns

int

A value that indicates the relative order of the objects being compared. Less than zero means this object is less than the other parameter. Zero means this object is equal to other. Greater than zero means this object is greater than other.

Equals(ExpressionBuilderArgument)

Indicates whether the specified argument is equal to the current argument.

public bool Equals(ExpressionBuilderArgument other)

Parameters

other ExpressionBuilderArgument

The argument object to compare with the current argument.

Returns

bool

true if the specified argument object is equal to the current argument; otherwise, false.

Equals(object)

Returns a value indicating whether this instance is equal to a specified object.

public override bool Equals(object obj)

Parameters

obj object

An object to compare with this instance.

Returns

bool

true if obj is an instance of ExpressionBuilderArgument and its index equals the index value of this instance; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer hash code.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(ExpressionBuilderArgument, ExpressionBuilderArgument)

Tests whether two ExpressionBuilderArgument instances are equal.

public static bool operator ==(ExpressionBuilderArgument left, ExpressionBuilderArgument right)

Parameters

left ExpressionBuilderArgument

The ExpressionBuilderArgument instance on the left of the equality operator.

right ExpressionBuilderArgument

The ExpressionBuilderArgument instance on the right of the equality operator.

Returns

bool

true if left and right have equal index; otherwise, false.

operator >(ExpressionBuilderArgument, ExpressionBuilderArgument)

Tests whether an ExpressionBuilderArgument object is greater than another object of the same type.

public static bool operator >(ExpressionBuilderArgument left, ExpressionBuilderArgument right)

Parameters

left ExpressionBuilderArgument

The ExpressionBuilderArgument object on the left of the greater than operator.

right ExpressionBuilderArgument

The ExpressionBuilderArgument object on the right of the greater than operator.

Returns

bool

true if left has an index greater than right; otherwise, false.

operator !=(ExpressionBuilderArgument, ExpressionBuilderArgument)

Tests whether two ExpressionBuilderArgument instances are different.

public static bool operator !=(ExpressionBuilderArgument left, ExpressionBuilderArgument right)

Parameters

left ExpressionBuilderArgument

The ExpressionBuilderArgument instance on the left of the inequality operator.

right ExpressionBuilderArgument

The ExpressionBuilderArgument instance on the right of the inequality operator.

Returns

bool

true if left and right differ in index; false if left and right are equal.

operator <(ExpressionBuilderArgument, ExpressionBuilderArgument)

Tests whether an ExpressionBuilderArgument object is less than another object of the same type.

public static bool operator <(ExpressionBuilderArgument left, ExpressionBuilderArgument right)

Parameters

left ExpressionBuilderArgument

The ExpressionBuilderArgument object on the left of the less than operator.

right ExpressionBuilderArgument

The ExpressionBuilderArgument object on the right of the less than operator.

Returns

bool

true if left has an index smaller than right; otherwise, false.