Table of Contents

Class ExpressionStarter<T>

Namespace
System.Linq
Assembly
Volo.Abp.Core.dll

ExpressionStarter{T} which eliminates the default 1=0 or 1=1 stub expressions

public class ExpressionStarter<T>

Type Parameters

T

The type

Inheritance
ExpressionStarter<T>
Inherited Members
Extension Methods

Constructors

ExpressionStarter()

public ExpressionStarter()

ExpressionStarter(bool)

public ExpressionStarter(bool defaultExpression)

Parameters

defaultExpression bool

ExpressionStarter(Expression<Func<T, bool>>?)

public ExpressionStarter(Expression<Func<T, bool>>? exp)

Parameters

exp Expression<Func<T, bool>>

Properties

Body

public Expression Body { get; }

Property Value

Expression

CanReduce

public virtual bool CanReduce { get; }

Property Value

bool

DefaultExpression

The default expression

public Expression<Func<T, bool>>? DefaultExpression { get; set; }

Property Value

Expression<Func<T, bool>>

IsStarted

Determines if the predicate is started.

public bool IsStarted { get; }

Property Value

bool

Name

public string? Name { get; }

Property Value

string

NodeType

public ExpressionType NodeType { get; }

Property Value

ExpressionType

Parameters

public ReadOnlyCollection<ParameterExpression> Parameters { get; }

Property Value

ReadOnlyCollection<ParameterExpression>

ReturnType

public Type ReturnType { get; }

Property Value

Type

TailCall

public bool TailCall { get; }

Property Value

bool

Type

public Type Type { get; }

Property Value

Type

UseDefaultExpression

A default expression to use only when the expression is null

public bool UseDefaultExpression { get; }

Property Value

bool

Methods

And(Expression<Func<T, bool>>)

And

public Expression<Func<T, bool>> And(Expression<Func<T, bool>> expr2)

Parameters

expr2 Expression<Func<T, bool>>

Returns

Expression<Func<T, bool>>

Compile()

public Func<T, bool> Compile()

Returns

Func<T, bool>

Compile(DebugInfoGenerator)

public Func<T, bool> Compile(DebugInfoGenerator debugInfoGenerator)

Parameters

debugInfoGenerator DebugInfoGenerator

Returns

Func<T, bool>

Or(Expression<Func<T, bool>>)

Or

public Expression<Func<T, bool>> Or(Expression<Func<T, bool>> expr2)

Parameters

expr2 Expression<Func<T, bool>>

Returns

Expression<Func<T, bool>>

Start(Expression<Func<T, bool>>)

Set the Expression predicate

public Expression<Func<T, bool>> Start(Expression<Func<T, bool>> exp)

Parameters

exp Expression<Func<T, bool>>

The first expression

Returns

Expression<Func<T, bool>>

ToString()

Show predicate string

public override string? ToString()

Returns

string

Update(Expression, IEnumerable<ParameterExpression>)

public Expression<Func<T, bool>> Update(Expression body, IEnumerable<ParameterExpression> parameters)

Parameters

body Expression
parameters IEnumerable<ParameterExpression>

Returns

Expression<Func<T, bool>>

Operators

implicit operator Func<T, bool>?(ExpressionStarter<T>?)

Allows this object to be implicitely converted to an Expression{Func{T, bool}}.

public static implicit operator Func<T, bool>?(ExpressionStarter<T>? right)

Parameters

right ExpressionStarter<T>

Returns

Func<T, bool>

implicit operator Expression<Func<T, bool>>?(ExpressionStarter<T>?)

Allows this object to be implicitely converted to an Expression{Func{T, bool}}.

public static implicit operator Expression<Func<T, bool>>?(ExpressionStarter<T>? right)

Parameters

right ExpressionStarter<T>

Returns

Expression<Func<T, bool>>

implicit operator ExpressionStarter<T>?(Expression<Func<T, bool>>?)

Allows this object to be implicitely converted to an Expression{Func{T, bool}}.

public static implicit operator ExpressionStarter<T>?(Expression<Func<T, bool>>? right)

Parameters

right Expression<Func<T, bool>>

Returns

ExpressionStarter<T>