/// <summary> /// Initializes a new instance of the LinqBuiltInFunction class /// </summary> /// <param name="className">The class name that contains the method for the function call.</param> /// <param name="methodName">The method name corresponding to the function.</param> /// <param name="queryFunction">The query function metadata.</param> /// <param name="functionType">Type of the function.</param> public LinqBuiltInFunction(string className, string methodName, QueryBuiltInFunction queryFunction, LinqBuiltInFunctionKind functionType) { ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(className, "className"); ExceptionUtilities.CheckStringArgumentIsNotNullOrEmpty(methodName, "methodName"); ExceptionUtilities.CheckArgumentNotNull(queryFunction, "queryFunction"); ExceptionUtilities.CheckArgumentNotNull(functionType, "functionType"); this.ClassName = className; this.MethodName = methodName; this.BuiltInFunction = queryFunction; this.BuiltInFunctionKind = functionType; }
private static LinqBuiltInFunction CreateFunction(string className, string clrMethodOrPropertyName, string protocolFunctionName, DataType returnType, LinqBuiltInFunctionKind kind) { var function = new LinqBuiltInFunction(className, clrMethodOrPropertyName, new QueryBuiltInFunction(className, clrMethodOrPropertyName, returnType), kind); function.Annotations.Add(new ODataCanonicalFunctionNameAnnotation() { Name = protocolFunctionName }); return function; }
private static LinqBuiltInFunction CreateFunction(string className, string clrMethodOrPropertyName, string protocolFunctionName, DataType returnType, LinqBuiltInFunctionKind kind) { var function = new LinqBuiltInFunction(className, clrMethodOrPropertyName, new QueryBuiltInFunction(className, clrMethodOrPropertyName, returnType), kind); function.Annotations.Add(new ODataCanonicalFunctionNameAnnotation() { Name = protocolFunctionName }); return(function); }