コード例 #1
0
        protected object Evaluate(XPathNavigator nav)
        {
            SeekableMessageNavigator navigator = nav as SeekableMessageNavigator;

            if (navigator != null)
            {
                navigator.Atomize();
            }
            if (XPathResultType.NodeSet == this.xpath.ReturnType)
            {
                return(nav.Select(this.xpath));
            }
            return(nav.Evaluate(this.xpath));
        }
コード例 #2
0
        protected object Evaluate(XPathNavigator nav)
        {
            SeekableMessageNavigator messageNav = nav as SeekableMessageNavigator;

            if (null != messageNav)
            {
                // If operating on messages, we would have avoided atomizing unless we were using the Framework
                // This ensures that atomization has taken place
                messageNav.Atomize();
            }

            object evalResult;

            if (XPathResultType.NodeSet == xpath.ReturnType)
            {
                evalResult = nav.Select(xpath);
            }
            else
            {
                evalResult = nav.Evaluate(xpath);
            }

            return(evalResult);
        }