File: System\Windows\TestUtilities\TestData\EnumTestValidData.vb
Web Access
Project: src\src\Microsoft.VisualBasic.Forms\tests\UnitTests\Microsoft.VisualBasic.Forms.Tests.vbproj (Microsoft.VisualBasic.Forms.Tests)
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
 
Namespace Microsoft.VisualBasic.Forms.Tests
 
    Public Class EnumTestValidData(Of T)
        Implements IEnumerable(Of Object())
 
        Public Iterator Function GetEnumerator() As IEnumerator(Of Object()) Implements IEnumerable(Of Object()).GetEnumerator
            For Each mode As [Enum] In [Enum].GetValues(GetType(T))
                Yield {New EnumValueAndThrowIndicatorData(Of T)(CType(CObj(mode), T), False)}
            Next
        End Function
 
        Public Function IEnumerable_GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
            Return GetEnumerator()
        End Function
 
    End Class
 
End Namespace