Class DisableBuilder
- Namespace
- Bonsai.Expressions
- Assembly
- Bonsai.Core.dll
Represents an expression builder that disables the generation of expression tree nodes from its decorated builder.
The Disable
decorator is used to remove expressions from the workflow build process without actually removing the expressions themselves from the workflow. It is most frequently used for rapid-prototyping of alternative solutions, or during debugging to quickly activate or deactivate branches for testing.
public class DisableBuilder : ExpressionBuilder, IExpressionBuilder, INamedElement
- Inheritance
-
DisableBuilder
- Implements
- Inherited Members
- Extension Methods
Constructors
DisableBuilder()
Initializes a new instance of the DisableBuilder class.
public DisableBuilder()
DisableBuilder(ExpressionBuilder)
Initializes a new instance of the DisableBuilder class with the specified expression builder.
public DisableBuilder(ExpressionBuilder builder)
Parameters
builder
ExpressionBuilderThe expression builder instance to be disabled.
Properties
ArgumentRange
Gets the range of input arguments that the decorated expression builder accepts.
public override Range<int> ArgumentRange { get; }
Property Value
Builder
Gets or sets the expression builder to be disabled by this decorator.
public ExpressionBuilder Builder { get; set; }
Property Value
Name
Gets the display name of the decorated expression builder.
public string Name { get; }
Property Value
Methods
Build(IEnumerable<Expression>)
Generates an Expression node from a collection of input arguments. The result can be chained with other builders in a workflow.
public override Expression Build(IEnumerable<Expression> arguments)
Parameters
arguments
IEnumerable<Expression>A collection of Expression nodes that represents the input arguments.
Returns
- Expression
An Expression tree node.