private static FunctionDefinition CreateFunctionDefinition(string functionName, int argumentCount, string mappedFunctionName,
                                                                   Func <FunctionDefinition, Func <string, ODataExpression, IEnumerable <object>, ODataExpression> > mapper, AdapterVersion adapterVersion = AdapterVersion.Any)
        {
            var functionCall    = new ExpressionFunction.FunctionCall(functionName, argumentCount);
            var functionMapping = new FunctionMapping(mappedFunctionName);
            var function        = new FunctionDefinition(functionCall, functionMapping, adapterVersion);

            functionMapping.FunctionMapper = mapper(function);
            return(function);
        }
 public FunctionDefinition(ExpressionFunction.FunctionCall functionCall, FunctionMapping functionMapping, AdapterVersion adapterVersion = AdapterVersion.Any)
 {
     FunctionCall    = functionCall;
     FunctionMapping = functionMapping;
     AdapterVersion  = adapterVersion;
 }