summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-01-29 14:32:45 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-01-29 14:32:45 -0800
commit5fec515095ee10b522f414a03e78f282aaf520dc (patch)
tree204c75486639c23cdda2ef38b34d7e5050a1a2e3 /src/DotNetOpenAuth.Core/Messaging/EmptyEnumerator.cs
parentf1a4155398635a4fd9f485eec817152627682704 (diff)
parent8f4165ee515728aca3faaa26e8354a40612e85e4 (diff)
downloadDotNetOpenAuth-5fec515095ee10b522f414a03e78f282aaf520dc.zip
DotNetOpenAuth-5fec515095ee10b522f414a03e78f282aaf520dc.tar.gz
DotNetOpenAuth-5fec515095ee10b522f414a03e78f282aaf520dc.tar.bz2
Merge branch 'splitDlls'.
DNOA now builds and (in some cases) ships as many distinct assemblies.
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
+ }
+}