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
intThe 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
stringThe 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
Properties
Index
Gets or sets the zero-based index of the input argument.
public int Index { get; set; }
Property Value
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
Methods
CompareTo(ExpressionBuilderArgument)
Compares the current object with another object of the same type.
public int CompareTo(ExpressionBuilderArgument other)
Parameters
other
ExpressionBuilderArgumentAn 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 toother
. Greater than zero means this object is greater thanother
.
Equals(ExpressionBuilderArgument)
Indicates whether the specified argument is equal to the current argument.
public bool Equals(ExpressionBuilderArgument other)
Parameters
other
ExpressionBuilderArgumentThe argument object to compare with the current argument.
Returns
Equals(object)
Returns a value indicating whether this instance is equal to a specified object.
public override bool Equals(object obj)
Parameters
obj
objectAn 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
ExpressionBuilderArgumentThe ExpressionBuilderArgument instance on the left of the equality operator.
right
ExpressionBuilderArgumentThe ExpressionBuilderArgument instance on the right of the equality operator.
Returns
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
ExpressionBuilderArgumentThe ExpressionBuilderArgument object on the left of the greater than operator.
right
ExpressionBuilderArgumentThe ExpressionBuilderArgument object on the right of the greater than operator.
Returns
operator !=(ExpressionBuilderArgument, ExpressionBuilderArgument)
Tests whether two ExpressionBuilderArgument instances are different.
public static bool operator !=(ExpressionBuilderArgument left, ExpressionBuilderArgument right)
Parameters
left
ExpressionBuilderArgumentThe ExpressionBuilderArgument instance on the left of the inequality operator.
right
ExpressionBuilderArgumentThe ExpressionBuilderArgument instance on the right of the inequality operator.
Returns
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
ExpressionBuilderArgumentThe ExpressionBuilderArgument object on the left of the less than operator.
right
ExpressionBuilderArgumentThe ExpressionBuilderArgument object on the right of the less than operator.