System.Data.Common.CommandTrees.Internal.ExpressionKeyGen.VisitExprKind(System.Data.Common.CommandTrees.DbExpressionKind)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.Internal.ExpressionKeyGen.VisitExprKind(System.Data.Common.CommandTrees.DbExpressionKind) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

23 Examples 7

1. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbArithmeticExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            foreach (var a in e.Arguments)
            {
                _key.Append('(');
                a.Accept(this);
                _key.Append(')');
            }
        }

2. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbNewInstanceExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append(':');
            _key.Append(e.ResultType.EdmType.Identity);
            _key.Append('(');
            foreach (var a in e.Arguments)
            {
                _key.Append('(');
                a.Accept(this);
                _key.Append(')');
            }
            if (e.HasRelatedEntityReferences)
            {
                foreach (DbRelatedEntityRef relatedRef in e.RelatedEntityReferences)
                {
                    _key.Append("RE(A(");
                    _key.Append(relatedRef.SourceEnd.DeclaringType.Identity);
                    _key.Append(")(");
                    _key.Append(relatedRef.SourceEnd.Name);
                    _key.Append("->");
                    _key.Append(relatedRef.TargetEnd.Name);
                    _key.Append(")(");
                    relatedRef.TargetEntityReference.Accept(this);
                    _key.Append("))");
                }
            }
            _key.Append(')');
        }

3. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbScanExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            _key.Append(e.Target.EntityContainer.Name);
            _key.Append('.');
            _key.Append(e.Target.Name);
            _key.Append(':');
            _key.Append(e.ResultType.EdmType.Identity);
            _key.Append(')');
        }

4. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
private void VisitUnary(DbUnaryExpression expr)
        {
            VisitExprKind(expr.ExpressionKind);
            _key.Append('(');
            expr.Argument.Accept(this);
            _key.Append(')');
        }

5. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
private void VisitBinary(DbBinaryExpression expr)
        {
            VisitExprKind(expr.ExpressionKind);
            _key.Append('(');
            expr.Left.Accept(this);
            _key.Append(',');
            expr.Right.Accept(this);
            _key.Append(')');
        }

6. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
private void VisitCastOrTreat(DbUnaryExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.Argument.Accept(this);
            _key.Append(":");
            _key.Append(e.ResultType.Identity);
            _key.Append(')');
        }

7. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbPropertyExpression e)
        {
            e.Instance.Accept(this);
            VisitExprKind(e.ExpressionKind);
            _key.Append(e.Property.Name);
        }

8. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbLikeExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.Argument.Accept(this);
            _key.Append(")(");
            e.Pattern.Accept(this);
            _key.Append(")(");
            if (e.Escape != null)
            {
                e.Escape.Accept(this);
            }
            e.Argument.Accept(this);
            _key.Append(')');
        }

9. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbLimitExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            if (e.WithTies)
            {
                _key.Append("WithTies");
            }
            _key.Append('(');
            e.Argument.Accept(this);
            _key.Append(")(");
            e.Limit.Accept(this);
            _key.Append(')');
        }

10. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbIsOfExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.Argument.Accept(this);
            _key.Append(":");
            _key.Append(e.OfType.EdmType.Identity);
            _key.Append(')');
        }

11. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbOfTypeExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.Argument.Accept(this);
            _key.Append(":");
            _key.Append(e.OfType.EdmType.Identity);
            _key.Append(')');
        }

12. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbCaseExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            for (int idx = 0; idx < e.When.Count; idx++)
            {
                _key.Append("WHEN:(");
                e.When[idx].Accept(this);
                _key.Append(")THEN:(");
                e.Then[idx].Accept(this);
            }
            _key.Append("ELSE:(");
            e.Else.Accept(this);
            _key.Append("))");
        }

13. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbRefExpression e)
        {
            //
            VisitExprKind(e.ExpressionKind);
            _key.Append("(ESET(");
            _key.Append(e.EntitySet.EntityContainer.Name);
            _key.Append('.');
            _key.Append(e.EntitySet.Name);
            _key.Append(")T(");
            _key.Append(TypeHelpers.GetEdmType<RefType>(e.ResultType).ElementType.FullName);
            _key.Append(")(");
            e.Argument.Accept(this);
            _key.Append(')');
        }

14. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbRelationshipNavigationExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            e.NavigationSource.Accept(this);
            _key.Append(")A(");
            _key.Append(e.NavigateFrom.DeclaringType.Identity);
            _key.Append(")(");
            _key.Append(e.NavigateFrom.Name);
            _key.Append("->");
            _key.Append(e.NavigateTo.Name);
            _key.Append("))");
        }

15. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbCrossJoinExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            foreach (var i in e.Inputs)
            {
                VisitBinding(i);
            }
            _key.Append(')');
        }

16. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbApplyExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Input);
            VisitBinding(e.Apply);
            _key.Append(')');
        }

17. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbFilterExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Input);
            _key.Append('(');
            e.Predicate.Accept(this);
            _key.Append("))");
        }

18. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbProjectExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Input);
            _key.Append('(');
            e.Projection.Accept(this);
            _key.Append("))");
        }

19. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbJoinExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Left);
            VisitBinding(e.Right);
            _key.Append('(');
            e.JoinCondition.Accept(this);
            _key.Append("))");
        }

20. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbSortExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Input);
            VisitSortOrder(e.SortOrder);
            _key.Append(')');
        }

21. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbQuantifierExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Input);
            _key.Append('(');
            e.Predicate.Accept(this);
            _key.Append("))");
        }

22. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbSkipExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitBinding(e.Input);
            VisitSortOrder(e.SortOrder);
            _key.Append('(');
            e.Count.Accept(this);
            _key.Append("))");
        }

23. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbGroupByExpression e)
        {
            VisitExprKind(e.ExpressionKind);
            _key.Append('(');
            VisitGroupBinding(e.Input);
            foreach (var k in e.Keys)
            {
                _key.Append("K(");
                k.Accept(this);
                _key.Append(')');
            }
            foreach (var a in e.Aggregates)
            {
                var ga = a as DbGroupAggregate;
                if (ga != null)
                {
                    _key.Append("GA(");
                    Debug.Assert(ga.Arguments.Count == 1, "Group aggregate must have one argument.");
                    ga.Arguments[0].Accept(this);
                    _key.Append(')');
                }
                else
                {
                    _key.Append("A:");
                    var fa = (DbFunctionAggregate)a;
                    if (fa.Distinct)
                    {
                        _key.Append("D:");
                    }
                    VisitFunction(fa.Function, fa.Arguments);
                }
            }
            _key.Append(')');
        }