' A collection that stores <see cref='.${Properties.ItemType}'/> objects.
' </para>
'</summary>
'<seealso cref='.${ClassName}'/>
<%}%> <Serializable()> _
${Properties.Accessibility} Class ${ClassName}
Inherits CollectionBase
<%if (GenerateDocumentation) {%> '<summary>
' <para>
' Initializes a new instance of <see cref='.${ClassName}'/>.
' </para>
'</summary>
<%}%> Public Sub New()
MyBase.New
End Sub
<%if (GenerateDocumentation) {%> '<summary>
' <para>
' Initializes a new instance of <see cref='.${ClassName}'/> based on another <see cref='.${ClassName}'/>.
' </para>
'</summary>
'<param name='value'>
' A <see cref='.${ClassName}'/> from which the contents are copied
'</param>
<%}%> Public Sub New(ByVal value As ${ClassName})
MyBase.New
Me.AddRange(value)
End Sub
<%if (GenerateDocumentation) {%> '<summary>
' <para>
' Initializes a new instance of <see cref='.${ClassName}'/> containing any array of <see cref='.${Properties.ItemType}'/> objects.
' </para>
'</summary>
'<param name='value'>
' A array of <see cref='.${Properties.ItemType}'/> objects with which to intialize the collection
'</param>
<%}%> Public Sub New(ByVal value() As ${Properties.ItemType})
MyBase.New
Me.AddRange(value)
End Sub
<%if (GenerateDocumentation) {%> '<summary>
'<para>Represents the entry at the specified index of the <see cref='.${Properties.ItemType}'/>.</para>
'</summary>
'<param name='index'><para>The zero-based index of the entry to locate in the collection.</para></param>
'<value>
' <para> The entry at the specified index of the collection.</para>
'</value>
'<exception cref='System.ArgumentOutOfRangeException'><paramref name='index'/> is outside the valid range of indexes for the collection.</exception>
<%}%> Public Default Property Item(ByVal index As Integer) As ${Properties.ItemType}
Get
Return CType(List(index),${Properties.ItemType})
End Get
Set
List(index) = value
End Set
End Property
<%if (GenerateDocumentation) {%> '<summary>
' <para>Adds a <see cref='.${Properties.ItemType}'/> with the specified value to the
' <see cref='.${ClassName}'/> .</para>
'</summary>
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to add.</param>
'<returns>
' <para>The index at which the new element was inserted.</para>
'</returns>
'<seealso cref='.${ClassName}.AddRange'/>
<%}%> Public Function Add(ByVal value As ${Properties.ItemType}) As Integer
Return List.Add(value)
End Function
<%if (GenerateDocumentation) {%> '<summary>
'<para>Copies the elements of an array to the end of the <see cref='.${ClassName}'/>.</para>
'</summary>
'<param name='value'>
' An array of type <see cref='.${Properties.ItemType}'/> containing the objects to add to the collection.
'</param>
'<returns>
' <para>None.</para>
'</returns>
'<seealso cref='.${ClassName}.Add'/>
<%}%> Public Overloads Sub AddRange(ByVal value() As ${Properties.ItemType})
Dim i As Integer = 0
Do While (i < value.Length)
Me.Add(value(i))
i = (i + 1)
Loop
End Sub
<%if (GenerateDocumentation) {%> '<summary>
' <para>
' Adds the contents of another <see cref='.${ClassName}'/> to the end of the collection.
' </para>
'</summary>
'<param name='value'>
' A <see cref='.${ClassName}'/> containing the objects to add to the collection.
'</param>
'<returns>
' <para>None.</para>
'</returns>
'<seealso cref='.${ClassName}.Add'/>
<%}%> Public Overloads Sub AddRange(ByVal value As ${ClassName})
Dim i As Integer = 0
Do While (i < value.Count)
Me.Add(value(i))
i = (i + 1)
Loop
End Sub
<%if (GenerateDocumentation) {%> '<summary>
'<para>Gets a value indicating whether the
' <see cref='.${ClassName}'/> contains the specified <see cref='.${Properties.ItemType}'/>.</para>
'</summary>
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to locate.</param>
'<returns>
'<para><see langword='true'/> if the <see cref='.${Properties.ItemType}'/> is contained in the collection;
' otherwise, <see langword='false'/>.</para>
'</returns>
'<seealso cref='.${ClassName}.IndexOf'/>
<%}%> Public Function Contains(ByVal value As ${Properties.ItemType}) As Boolean
Return List.Contains(value)
End Function
<%if (GenerateDocumentation) {%> '<summary>
'<para>Copies the <see cref='.${ClassName}'/> values to a one-dimensional <see cref='System.Array'/> instance at the
' specified index.</para>
'</summary>
'<param name='array'><para>The one-dimensional <see cref='System.Array'/> that is the destination of the values copied from <see cref='.${ClassName}'/> .</para></param>
'<param name='index'>The index in <paramref name='array'/> where copying begins.</param>
'<returns>
' <para>None.</para>
'</returns>
'<exception cref='System.ArgumentException'><para><paramref name='array'/> is multidimensional.</para> <para>-or-</para> <para>The number of elements in the <see cref='.${ClassName}'/> is greater than the available space between <paramref name='arrayIndex'/> and the end of <paramref name='array'/>.</para></exception>
'<exception cref='System.ArgumentNullException'><paramref name='array'/> is <see langword='null'/>. </exception>
'<exception cref='System.ArgumentOutOfRangeException'><paramref name='arrayIndex'/> is less than <paramref name='array'/>'s lowbound. </exception>
'<seealso cref='System.Array'/>
<%}%> Public Sub CopyTo(ByVal array() As ${Properties.ItemType}, ByVal index As Integer)
List.CopyTo(array, index)
End Sub
<%if (GenerateDocumentation) {%> '<summary>
' <para>Returns the index of a <see cref='.${Properties.ItemType}'/> in
' the <see cref='.${ClassName}'/> .</para>
'</summary>
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to locate.</param>
'<returns>
'<para>The index of the <see cref='.${Properties.ItemType}'/> of <paramref name='value'/> in the
'<see cref='.${ClassName}'/>, if found; otherwise, -1.</para>
'</returns>
'<seealso cref='.${ClassName}.Contains'/>
<%}%> Public Function IndexOf(ByVal value As ${Properties.ItemType}) As Integer
Return List.IndexOf(value)
End Function
<%if (GenerateDocumentation) {%> '<summary>
'<para>Inserts a <see cref='.${Properties.ItemType}'/> into the <see cref='.${ClassName}'/> at the specified index.</para>
'</summary>
'<param name='index'>The zero-based index where <paramref name='value'/> should be inserted.</param>
'<param name=' value'>The <see cref='.${Properties.ItemType}'/> to insert.</param>
'<returns><para>None.</para></returns>
'<seealso cref='.${ClassName}.Add'/>
<%}%> Public Sub Insert(ByVal index As Integer, ByVal value As ${Properties.ItemType})
List.Insert(index, value)
End Sub
<%if (GenerateDocumentation) {%> '<summary>
' <para>Returns an enumerator that can iterate through
' the <see cref='.${ClassName}'/> .</para>
'</summary>
'<returns><para>None.</para></returns>
'<seealso cref='System.Collections.IEnumerator'/>
<%}%> Public Shadows Function GetEnumerator() As ${Properties.ItemType}Enumerator
Return New ${Properties.ItemType}Enumerator(Me)
End Function
<%if (GenerateDocumentation) {%> '<summary>
' <para> Removes a specific <see cref='.${Properties.ItemType}'/> from the
' <see cref='.${ClassName}'/> .</para>
'</summary>
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to remove from the <see cref='.${ClassName}'/> .</param>
'<returns><para>None.</para></returns>
'<exception cref='System.ArgumentException'><paramref name='value'/> is not found in the Collection. </exception>
<%}%> Public Sub Remove(ByVal value As ${Properties.ItemType})
List.Remove(value)
End Sub
Public Class ${Properties.ItemType}Enumerator
Implements IEnumerator
Private baseEnumerator As IEnumerator
Private temp As IEnumerable
Public Sub New(ByVal mappings As ${ClassName})
MyBase.New
Me.temp = CType(mappings,IEnumerable)
Me.baseEnumerator = temp.GetEnumerator
End Sub
Public ReadOnly Property Current As ${Properties.ItemType}