|
1 | 1 | using System; |
2 | | -using System.Collections.Generic; |
3 | 2 | using System.IO; |
4 | 3 | using System.Linq; |
5 | 4 | using System.Reflection.Metadata; |
@@ -111,74 +110,9 @@ public Entities.Type ErrorType |
111 | 110 | /// </summary> |
112 | 111 | /// <param name="handle">The handle of the method.</param> |
113 | 112 | /// <returns>The debugging information, or null if the information could not be located.</returns> |
114 | | - public PDB.IMethod? GetMethodDebugInformation(MethodDefinitionHandle handle) |
| 113 | + public PDB.Method? GetMethodDebugInformation(MethodDefinitionHandle handle) |
115 | 114 | { |
116 | 115 | return Pdb?.GetMethod(handle.ToDebugInformationHandle()); |
117 | 116 | } |
118 | 117 | } |
119 | | - |
120 | | - /// <summary> |
121 | | - /// When we decode a type/method signature, we need access to |
122 | | - /// generic parameters. |
123 | | - /// </summary> |
124 | | - public abstract class GenericContext |
125 | | - { |
126 | | - public Context Cx { get; } |
127 | | - |
128 | | - protected GenericContext(Context cx) |
129 | | - { |
130 | | - this.Cx = cx; |
131 | | - } |
132 | | - |
133 | | - /// <summary> |
134 | | - /// The list of generic type parameters, including type parameters of |
135 | | - /// containing types. |
136 | | - /// </summary> |
137 | | - public abstract IEnumerable<Entities.Type> TypeParameters { get; } |
138 | | - |
139 | | - /// <summary> |
140 | | - /// The list of generic method parameters. |
141 | | - /// </summary> |
142 | | - public abstract IEnumerable<Entities.Type> MethodParameters { get; } |
143 | | - |
144 | | - /// <summary> |
145 | | - /// Gets the `p`th type parameter. |
146 | | - /// </summary> |
147 | | - /// <param name="p">The index of the parameter.</param> |
148 | | - /// <returns> |
149 | | - /// For constructed types, the supplied type. |
150 | | - /// For unbound types, the type parameter. |
151 | | - /// </returns> |
152 | | - public Entities.Type GetGenericTypeParameter(int p) |
153 | | - { |
154 | | - return TypeParameters.ElementAt(p); |
155 | | - } |
156 | | - |
157 | | - /// <summary> |
158 | | - /// Gets the `p`th method type parameter. |
159 | | - /// </summary> |
160 | | - /// <param name="p">The index of the parameter.</param> |
161 | | - /// <returns> |
162 | | - /// For constructed types, the supplied type. |
163 | | - /// For unbound types, the type parameter. |
164 | | - /// </returns> |
165 | | - public Entities.Type GetGenericMethodParameter(int p) |
166 | | - { |
167 | | - return MethodParameters.ElementAt(p); |
168 | | - } |
169 | | - } |
170 | | - |
171 | | - /// <summary> |
172 | | - /// A generic context which does not contain any type parameters. |
173 | | - /// </summary> |
174 | | - public class EmptyContext : GenericContext |
175 | | - { |
176 | | - public EmptyContext(Context cx) : base(cx) |
177 | | - { |
178 | | - } |
179 | | - |
180 | | - public override IEnumerable<Entities.Type> TypeParameters { get { yield break; } } |
181 | | - |
182 | | - public override IEnumerable<Entities.Type> MethodParameters { get { yield break; } } |
183 | | - } |
184 | 118 | } |
0 commit comments