Show / Hide Table of Contents

Class ExpressionBuilder<TExpression>

Represents compound expression builder.

Inheritance
object
ExpressionBuilder<TExpression>
ConditionalBuilder
MatchBuilder
SwitchBuilder
TryBuilder
Implements
ISupplier<TExpression>
IFunctional
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Metaprogramming
Assembly: DotNext.Metaprogramming.dll
Syntax
public abstract class ExpressionBuilder<TExpression> : ISupplier<TExpression>, IFunctional where TExpression : Expression
Type Parameters
Name Description
TExpression

Type of expression to be constructed.

Remarks

Any derived expression builder is not thread-safe and event cannot be shared between threads.

Methods

View Source

End()

Finalizes construction of the expression and adds constructed expression as statement to the entire lexical scope.

Declaration
public void End()
Exceptions
Type Condition
InvalidOperationException

The expression has been constructed already.

View Source

OfType(Type)

Changes type of the expression.

Declaration
public ExpressionBuilder<TExpression> OfType(Type expressionType)
Parameters
Type Name Description
Type expressionType

The expression type.

Returns
Type Description
ExpressionBuilder<TExpression>

This builder.

Remarks

By default, type of expression is void.

View Source

OfType<T>()

Changes type of the expression.

Declaration
public ExpressionBuilder<TExpression> OfType<T>()
Returns
Type Description
ExpressionBuilder<TExpression>

This builder.

Type Parameters
Name Description
T

The expression type.

Implements

ISupplier<TResult>
IFunctional

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾