Show / Hide Table of Contents

Class SimpleElement.SimpleElementEnumerator

Provides an IEnumerator implementation that exposes only those elements from the element list that match a certain name.

Inheritance
object
SimpleElement.SimpleElementEnumerator
Implements
IEnumerator
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Tangosol.Run.Xml
Assembly: Coherence.dll
Syntax
protected class SimpleElement.SimpleElementEnumerator : IEnumerator

Constructors

SimpleElementEnumerator(SimpleElement, string)

Create new SimpleElementEnumerator with specified parent element and element name.

Declaration
public SimpleElementEnumerator(SimpleElement parent, string name)
Parameters
Type Name Description
SimpleElement parent

Parent SimpleElement.

string name

Name of elements that will be enumerated.

Fields

FOUND

Element with specified name has been found.

Declaration
protected const int FOUND = 0
Field Value
Type Description
int

INITIAL

Initial enumerator state.

Declaration
protected const int INITIAL = 2
Field Value
Type Description
int

RETURNED

Element with specified name has been returned.

Declaration
protected const int RETURNED = 1
Field Value
Type Description
int

m_element

Current element.

Declaration
protected IXmlElement m_element
Field Value
Type Description
IXmlElement

m_enumerator

Elements list enumerator that is wrapped by this enumerator.

Declaration
protected IEnumerator m_enumerator
Field Value
Type Description
IEnumerator

m_name

Name of elements that are enumerated.

Declaration
protected string m_name
Field Value
Type Description
string

m_state

Current state, can be one of values FOUND, RETURNED and INITIAL.

Declaration
protected int m_state
Field Value
Type Description
int

Properties

Current

Gets the current element in the collection.

Declaration
public virtual object Current { get; }
Property Value
Type Description
object

The current element in the collection.

Exceptions
Type Condition
InvalidOperationException

The enumerator is positioned before the first element of the collection or after the last element.

Methods

MoveNext()

Advances the enumerator to the next element of the collection.

Declaration
public virtual bool MoveNext()
Returns
Type Description
bool

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

Exceptions
Type Condition
InvalidOperationException

The collection was modified after the enumerator was created.

Reset()

Sets the enumerator to its initial position, which is before the first element in the collection.

Declaration
public virtual void Reset()
Exceptions
Type Condition
InvalidOperationException

The collection was modified after the enumerator was created.

Implements

IEnumerator
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.