Example #1
0
        public IEnumerator <GeckoNode> GetEnumerator()
        {
            nsIDOMNode node;

            while ((node = xpathResult.IterateNext()) != null)
            {
                yield return(GeckoNode.Create(node));
            }
        }
Example #2
0
        // refactor so that Enumerator is inplemented in seperate class and GetEnumerator can
        // be called multiple times.
        public IEnumerator <GeckoHtmlElement> GetEnumerator()
        {
            nsIDOMNode node;

            while ((node = xpathResult.IterateNext()) != null)
            {
                if (node is nsIDOMHTMLElement)
                {
                    yield return(GeckoHtmlElement.Create((nsIDOMHTMLElement)node));
                }
            }
        }
        // TODO: This current implementation only also GetEnumerator to be called once!
        // refactor so that Enumerator is inplemented in seperate class and GetEnumerator can
        // be called multiple times.
        public IEnumerator <GeckoHtmlElement> GetEnumerator()
        {
            nsIDOMNode node;

#if NEED_WEBIDL
            while ((node = xpathResult.IterateNext()) != null)
            {
                if (node is nsIDOMHTMLElement)
                {
                    yield return(GeckoHtmlElement.Create((nsIDOMHTMLElement)node));
                }
            }
#else
            return(null);
#endif
        }