//-----------------------------------------------------------------------
//
// Copyright (c) Outercurve Foundation. All rights reserved.
//
//-----------------------------------------------------------------------
namespace DotNetOpenAuth.Messaging {
using System.Collections;
///
/// An enumerator that always generates zero elements.
///
internal class EmptyEnumerator : IEnumerator {
///
/// The singleton instance of this empty enumerator.
///
internal static readonly EmptyEnumerator Instance = new EmptyEnumerator();
///
/// Prevents a default instance of the class from being created.
///
private EmptyEnumerator() {
}
#region IEnumerator Members
///
/// Gets the current element in the collection.
///
///
///
/// The current element in the collection.
///
///
/// The enumerator is positioned before the first element of the collection or after the last element.
///
public object Current {
get { return null; }
}
///
/// Advances the enumerator to the next element of the collection.
///
///
/// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
///
///
/// The collection was modified after the enumerator was created.
///
public bool MoveNext() {
return false;
}
///
/// Sets the enumerator to its initial position, which is before the first element in the collection.
///
///
/// The collection was modified after the enumerator was created.
///
public void Reset() {
}
#endregion
}
}