public object Evaluate(IContextProvider provider, IDictionary <XmlQualifiedName, object> vars) { object res = ExpressionTree.Execute(provider, BindExpr(vars)); if (res is XPathItem) { XPathItem item = (XPathItem)res; if (!item.IsNode) { res = item.TypedValue; } } resultType = CoreFuncs.GetXPath2ResultType(res); ValueProxy proxy = res as ValueProxy; if (proxy != null) { return(proxy.Value); } return(res); }
public override XPath2ResultType GetReturnType(object[] dataPool) { return(CoreFuncs.GetXPath2ResultType(_value)); }