Created
December 8, 2009 14:54
-
-
Save sgoguen/251693 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MustInherit Class LazyXMLBase | |
Implements IEnumerable(Of XNode) | |
Public MustOverride Function Render() As XNode | |
Public Function GetEnumerator() As System.Collections.Generic.IEnumerator(Of System.Xml.Linq.XNode) Implements System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XNode).GetEnumerator | |
Return Enumerable.Repeat(Me.Render(), 1).GetEnumerator() | |
End Function | |
Public Function GetEnumerator1() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator | |
Return Me.GetEnumerator() | |
End Function | |
Public Overrides Function ToString() As String | |
Return Me.Render().ToString() | |
End Function | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment