/
ForEachStatementInfo.vb
79 lines (70 loc) · 3.21 KB
/
ForEachStatementInfo.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Namespace Microsoft.CodeAnalysis.VisualBasic
''' <summary>
''' Structure containing all semantic information about a for each statement.
''' </summary>
Public Structure ForEachStatementInfo
''' <summary>
''' Gets the "GetEnumerator" method.
''' </summary>
Public ReadOnly Property GetEnumeratorMethod As IMethodSymbol
''' <summary>
''' Gets the "MoveNext" method.
''' </summary>
Public ReadOnly Property MoveNextMethod As IMethodSymbol
''' <summary>
''' Gets the "Current" property.
''' </summary>
Public ReadOnly Property CurrentProperty As IPropertySymbol
''' <summary>
''' Gets the "Dispose" method.
''' </summary>
Public ReadOnly Property DisposeMethod As IMethodSymbol
''' <summary>
''' The intermediate type to which the output of the <see cref="CurrentProperty"/> is converted
''' before being converted to the iteration variable type.
''' </summary>
''' <remarks>
''' As you might hope, for an array, it is the element type of the array.
''' </remarks>
Public ReadOnly Property ElementType As ITypeSymbol
''' <summary>
''' The conversion from the <see cref="ElementType"/> to the iteration variable type.
''' </summary>
''' <remarks>
''' May be user-defined.
''' </remarks>
Public ReadOnly Property ElementConversion As Conversion
''' <summary>
''' The conversion from the type of the <see cref="CurrentProperty"/> to the <see cref="ElementType"/>.
''' </summary>
''' <remarks>
''' Frequently the identity conversion.
''' </remarks>
Public ReadOnly Property CurrentConversion As Conversion
''' <summary>
''' Initializes a new instance of the <see cref="ForEachStatementInfo" /> structure.
''' </summary>
''' <param name="getEnumeratorMethod">The GetEnumerator method.</param>
''' <param name="moveNextMethod">The MoveNext method.</param>
''' <param name="currentProperty">The Current property.</param>
''' <param name="disposeMethod">The Dispose method.</param>
Friend Sub New(getEnumeratorMethod As IMethodSymbol,
moveNextMethod As IMethodSymbol,
currentProperty As IPropertySymbol,
disposeMethod As IMethodSymbol,
elementType As ITypeSymbol,
elementConversion As Conversion,
currentConversion As Conversion)
Me.GetEnumeratorMethod = getEnumeratorMethod
Me.MoveNextMethod = moveNextMethod
Me.CurrentProperty = currentProperty
Me.DisposeMethod = disposeMethod
Me.ElementType = elementType
Me.ElementConversion = elementConversion
Me.CurrentConversion = currentConversion
End Sub
End Structure
End Namespace