diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-29 18:22:20 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-10-29 18:22:20 -0400 |
| commit | dca78b13411db96366dddfa0d68bb6d36d28ad14 (patch) | |
| tree | 7d41e670f1cadec0db9e1ed7115e151da891f7ea /RSSDP/ReadOnlyEnumerable.cs | |
| parent | 597e27d1c6199a40398abb068282711a9cb9db1b (diff) | |
rework dlna project
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 000000000..1a69f8837 --- /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 + } +} |
