System.Data.Common.CommandTrees.Internal.ExpressionKeyGen.VisitFunction(System.Data.Metadata.Edm.EdmFunction, System.Collections.Generic.IList)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.Internal.ExpressionKeyGen.VisitFunction(System.Data.Metadata.Edm.EdmFunction, System.Collections.Generic.IList) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: referencesource
Source File: ExpressionKeyGen.cs
View license
public override void Visit(DbFunctionExpression e)
        {
            VisitFunction(e.Function, e.Arguments);
        }

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