summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-01-12 08:40:50 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-01-12 08:42:14 -0800
commitaf21cdaf77ca72f54e04f22268b740ce262582fa (patch)
tree9b158e3bff1f56264bccb9e45c8b807816beece6 /src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs
parenta73f2a4830aaa2afcb3f13da2206d9b011dad7fb (diff)
downloadDotNetOpenAuth-af21cdaf77ca72f54e04f22268b740ce262582fa.zip
DotNetOpenAuth-af21cdaf77ca72f54e04f22268b740ce262582fa.tar.gz
DotNetOpenAuth-af21cdaf77ca72f54e04f22268b740ce262582fa.tar.bz2
Renamed assembly DotNetOpenAuth.Messaging(.UI) to DotNetOpenAuth.Core(.UI)
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs b/src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs
new file mode 100644
index 0000000..f37e3d4
--- /dev/null
+++ b/src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs
@@ -0,0 +1,65 @@
+//-----------------------------------------------------------------------
+// <copyright file="EmptyEnumerator.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.Messaging {
+ using System.Collections;
+
+ /// <summary>
+ /// An enumerator that always generates zero elements.
+ /// </summary>
+ internal class EmptyEnumerator : IEnumerator {
+ /// <summary>
+ /// The singleton instance of this empty enumerator.
+ /// </summary>
+ internal static readonly EmptyEnumerator Instance = new EmptyEnumerator();
+
+ /// <summary>
+ /// Prevents a default instance of the <see cref="EmptyEnumerator"/> class from being created.
+ /// </summary>
+ private EmptyEnumerator() {
+ }
+
+ #region IEnumerator Members
+
+ /// <summary>
+ /// Gets the current element in the collection.
+ /// </summary>
+ /// <value></value>
+ /// <returns>
+ /// The current element in the collection.
+ /// </returns>
+ /// <exception cref="T:System.InvalidOperationException">
+ /// The enumerator is positioned before the first element of the collection or after the last element.
+ /// </exception>
+ public object Current {
+ get { return null; }
+ }
+
+ /// <summary>
+ /// Advances the enumerator to the next element of the collection.
+ /// </summary>
+ /// <returns>
+ /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
+ /// </returns>
+ /// <exception cref="T:System.InvalidOperationException">
+ /// The collection was modified after the enumerator was created.
+ /// </exception>
+ public bool MoveNext() {
+ return false;
+ }
+
+ /// <summary>
+ /// Sets the enumerator to its initial position, which is before the first element in the collection.
+ /// </summary>
+ /// <exception cref="T:System.InvalidOperationException">
+ /// The collection was modified after the enumerator was created.
+ /// </exception>
+ public void Reset() {
+ }
+
+ #endregion
+ }
+}