System.Data.Common.CommandTrees.Internal.ExpressionKeyGen.VisitGroupBinding(System.Data.Common.CommandTrees.DbGroupExpressionBinding)

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

1 Example 7

1. 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(')');
        }