C# Class Remotion.Linq.SqlBackend.SqlStatementModel.NamedExpression

NamedExpression holds an expression and a name for it. If the name is null, a default name is used (or omitted if possible). When a NamedExpression holds an expression resolved to a SqlEntityExpression, the entity's name is set to the NamedExpression's name. Otherwise, the NamedExpression is retained and used to emit "AS ..." clauses in SQL generation. Therefore, NamedExpression must only be used in parts of a SqlStatement where "AS ..." clauses are allowed.
Inheritance: Remotion.Linq.Clauses.Expressions.ExtensionExpression
显示文件 Open project: re-motion/Relinq-SqlBackend Class Usage Examples

Public Methods

Method Description
Accept ( System.Linq.Expressions.ExpressionTreeVisitor visitor ) : Expression
CreateFromMemberName ( string memberName, Expression innerExpression ) : NamedExpression
CreateNewExpressionWithNamedArguments ( NewExpression expression ) : Expression
CreateNewExpressionWithNamedArguments ( NewExpression expression, IEnumerable processedArguments ) : Expression
NamedExpression ( string name, Expression expression ) : System
ToString ( ) : string

Protected Methods

Method Description
VisitChildren ( System.Linq.Expressions.ExpressionTreeVisitor visitor ) : Expression

Private Methods

Method Description
GetMemberName ( ReadOnlyCollection members, int index ) : string
StripGetPrefix ( string memberName ) : string
WrapIntoNamedExpression ( string memberName, Expression argumentExpression ) : Expression

Method Details

Accept() public method

public Accept ( System.Linq.Expressions.ExpressionTreeVisitor visitor ) : Expression
visitor System.Linq.Expressions.ExpressionTreeVisitor
return System.Linq.Expressions.Expression

CreateFromMemberName() public static method

public static CreateFromMemberName ( string memberName, Expression innerExpression ) : NamedExpression
memberName string
innerExpression System.Linq.Expressions.Expression
return NamedExpression

CreateNewExpressionWithNamedArguments() public static method

public static CreateNewExpressionWithNamedArguments ( NewExpression expression ) : Expression
expression System.Linq.Expressions.NewExpression
return System.Linq.Expressions.Expression

CreateNewExpressionWithNamedArguments() public static method

public static CreateNewExpressionWithNamedArguments ( NewExpression expression, IEnumerable processedArguments ) : Expression
expression System.Linq.Expressions.NewExpression
processedArguments IEnumerable
return System.Linq.Expressions.Expression

NamedExpression() public method

public NamedExpression ( string name, Expression expression ) : System
name string
expression System.Linq.Expressions.Expression
return System

ToString() public method

public ToString ( ) : string
return string

VisitChildren() protected method

protected VisitChildren ( System.Linq.Expressions.ExpressionTreeVisitor visitor ) : Expression
visitor System.Linq.Expressions.ExpressionTreeVisitor
return System.Linq.Expressions.Expression