diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-10-30 03:29:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-30 03:29:27 -0400 |
| commit | d31b0f7be4b14e4ada999c97e675b856ad68352b (patch) | |
| tree | a4619513efbb3be62a6204c996526df606cb62c5 /RSSDP/ReadOnlyEnumerable.cs | |
| parent | b19f75fcae017cb51f1e58eb2d54ca84620b6ee0 (diff) | |
| parent | 3094cd7ff3e51578808ce1b6f56b141930c18004 (diff) | |
Merge pull request #2258 from MediaBrowser/dev
Dev
Diffstat (limited to 'RSSDP/ReadOnlyEnumerable.cs')
| -rw-r--r-- | RSSDP/ReadOnlyEnumerable.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/RSSDP/ReadOnlyEnumerable.cs b/RSSDP/ReadOnlyEnumerable.cs new file mode 100644 index 0000000000..1a69f88379 --- /dev/null +++ b/RSSDP/ReadOnlyEnumerable.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Rssdp +{ + internal sealed class ReadOnlyEnumerable<T> : System.Collections.Generic.IEnumerable<T> + { + + #region Fields + + private IEnumerable<T> _Items; + + #endregion + + #region Constructors + + public ReadOnlyEnumerable(IEnumerable<T> items) + { + if (items == null) throw new ArgumentNullException("items"); + + _Items = items; + } + + #endregion + + #region IEnumerable<T> Members + + public IEnumerator<T> GetEnumerator() + { + return _Items.GetEnumerator(); + } + + #endregion + + #region IEnumerable Members + + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + { + return _Items.GetEnumerator(); + } + + #endregion + } +} |
