public QueryFunction Bind(string functionName, string functionNamespace, XPathExprList args) { Fx.Assert(null != functionName && null != args, ""); // Variable length argument list requires a special case here if (functionName == "concat" && args.Count > 4) { ConcatFunction f = new ConcatFunction(args.Count); if (f.Bind(functionName, args)) { return(f); } } else { for (int i = 0; i < XPathFunctionLibrary.functionTable.Length; ++i) { // XPath functions are typeless, so don't check types if (XPathFunctionLibrary.functionTable[i].Bind(functionName, args)) { return(XPathFunctionLibrary.functionTable[i]); } } } return(null); }
internal override bool Equals(QueryFunction function) { ConcatFunction f = function as ConcatFunction; if (f != null && this.argCount == f.argCount) { return(true); } return(false); }
public QueryFunction Bind(string functionName, string functionNamespace, XPathExprList args) { if ((functionName == "concat") && (args.Count > 4)) { ConcatFunction function = new ConcatFunction(args.Count); if (function.Bind(functionName, args)) { return function; } } else { for (int i = 0; i < functionTable.Length; i++) { if (functionTable[i].Bind(functionName, args)) { return functionTable[i]; } } } return null; }
public QueryFunction Bind(string functionName, string functionNamespace, XPathExprList args) { if ((functionName == "concat") && (args.Count > 4)) { ConcatFunction function = new ConcatFunction(args.Count); if (function.Bind(functionName, args)) { return(function); } } else { for (int i = 0; i < functionTable.Length; i++) { if (functionTable[i].Bind(functionName, args)) { return(functionTable[i]); } } } return(null); }
public QueryFunction Bind(string functionName, string functionNamespace, XPathExprList args) { Fx.Assert(null != functionName && null != args, ""); // Variable length argument list requires a special case here if (functionName == "concat" && args.Count > 4) { ConcatFunction f = new ConcatFunction(args.Count); if (f.Bind(functionName, args)) { return f; } } else { for (int i = 0; i < XPathFunctionLibrary.functionTable.Length; ++i) { // XPath functions are typeless, so don't check types if (XPathFunctionLibrary.functionTable[i].Bind(functionName, args)) { return XPathFunctionLibrary.functionTable[i]; } } } return null; }
internal ConcatFunction(int argCount) : base("concat", ValueDataType.String, ConcatFunction.MakeTypes(argCount)) { Fx.Assert(argCount >= 2, ""); this.argCount = argCount; }
internal override bool Equals(QueryFunction function) { ConcatFunction function2 = function as ConcatFunction; return((function2 != null) && (this.argCount == function2.argCount)); }