Created
February 28, 2013 08:30
-
-
Save einarwh/5055189 to your computer and use it in GitHub Desktop.
BoxEnumerable class.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BoxEnumerable<T> : IEnumerable<Box<T>> | |
{ | |
private readonly IEnumerable<T> _; | |
public BoxEnumerable(IEnumerable<T> e) | |
{ | |
_ = e; | |
} | |
public IEnumerator<Box<T>> GetEnumerator() | |
{ | |
return new BoxEnumerator<T>(_.GetEnumerator()); | |
} | |
IEnumerator IEnumerable.GetEnumerator() | |
{ | |
return GetEnumerator(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment