IEnumerator IEnumerable.GetEnumerator() { if (Node == null) { return(SpecializedCollections.EmptyEnumerator <SyntaxTrivia>()); } return(new EnumeratorImpl(this)); }
IEnumerator <SyntaxToken> IEnumerable <SyntaxToken> .GetEnumerator() { if (Node == null) { return(SpecializedCollections.EmptyEnumerator <SyntaxToken>()); } return(new EnumeratorImpl(ref this)); }
IEnumerator IEnumerable.GetEnumerator() { if (this.Any()) { return(new EnumeratorImpl(this)); } return(SpecializedCollections.EmptyEnumerator <TNode>()); }
IEnumerator IEnumerable.GetEnumerator() { if (_list.Count == 0) { return(SpecializedCollections.EmptyEnumerator <SyntaxToken>()); } return(new EnumeratorImpl(in _list)); }
IEnumerator IEnumerable.GetEnumerator() { if (_node == null) { return(SpecializedCollections.EmptyEnumerator <SyntaxNodeOrToken>()); } return(new EnumeratorImpl(_node, _count)); }
IEnumerator IEnumerable.GetEnumerator() { if (this.list.Node == null) { return((IEnumerator)SpecializedCollections.EmptyEnumerator <TNode>()); } else { return((IEnumerator)this.GetEnumerator()); } }
/// <summary> /// Returns an enumerator that iterates through a collection. /// </summary> /// <returns> /// An <see cref="IEnumerator"/> object that can be used to iterate through the collection. /// </returns> IEnumerator IEnumerable.GetEnumerator() { return(_node == null ? SpecializedCollections.EmptyEnumerator <SyntaxNodeOrToken>() : this.GetEnumerator()); }