Example #1
0
        /// <summary>
        /// Checks if the target of the invocation is an aggregate function.
        /// </summary>
        /// <param name="context">The query context used to resolve the routine.</param>
        /// <returns>
        /// Returns <c>true</c> if the target routine of the invocation is a <see cref="IFunction"/>
        /// and the <see cref="IFunction.FunctionType"/> is <see cref="FunctionType.Aggregate"/>,
        /// otherwise it returns <c>false</c>.
        /// </returns>
        public bool IsAggregate(IQueryContext context)
        {
            if (context.IsAggregateFunction(this))
                return true;

            // Look at parameterss
            return Arguments.Any(x => x.HasAggregate(context));
        }