Skip to content

Commit 75ffbc4

Browse files
Automatic port of System.Reflection documentation (#4703)
* Automatic port of System.Reflection documentation * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: carlossanlop <[email protected]> Co-authored-by: Genevieve Warren <[email protected]>
1 parent d5fbb25 commit 75ffbc4

20 files changed

+311
-22
lines changed

xml/System.Reflection.Metadata.Ecma335/ArrayShapeEncoder.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="ArrayShapeEncoder" FullName="System.Reflection.Metadata.Ecma335.ArrayShapeEncoder">
1+
<Type Name="ArrayShapeEncoder" FullName="System.Reflection.Metadata.Ecma335.ArrayShapeEncoder">
22
<TypeSignature Language="C#" Value="public struct ArrayShapeEncoder" />
33
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit ArrayShapeEncoder extends System.ValueType" />
44
<TypeSignature Language="DocId" Value="T:System.Reflection.Metadata.Ecma335.ArrayShapeEncoder" />
@@ -113,6 +113,10 @@
113113
The array may be shorter than <paramref name="rank" /> but not longer.</param>
114114
<summary>Encodes array shape.</summary>
115115
<remarks>To be added.</remarks>
116+
<exception cref="T:System.ArgumentOutOfRangeException">
117+
<paramref name="rank" /> is outside of range [1, 0xffff], smaller than <see langword="sizes.Length" />, or smaller than <see langword="lowerBounds.Length" />.</exception>
118+
<exception cref="T:System.ArgumentNullException">
119+
<paramref name="sizes" /> is <see langword="null" />.</exception>
116120
</Docs>
117121
</Member>
118122
</Members>

xml/System.Reflection.Metadata.Ecma335/BlobEncoder.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="BlobEncoder" FullName="System.Reflection.Metadata.Ecma335.BlobEncoder">
1+
<Type Name="BlobEncoder" FullName="System.Reflection.Metadata.Ecma335.BlobEncoder">
22
<TypeSignature Language="C#" Value="public struct BlobEncoder" />
33
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit BlobEncoder extends System.ValueType" />
44
<TypeSignature Language="DocId" Value="T:System.Reflection.Metadata.Ecma335.BlobEncoder" />
@@ -110,6 +110,8 @@
110110
<param name="namedArguments">Called second, to encode named arguments.</param>
111111
<summary>Encodes custom attribute signature blob.</summary>
112112
<remarks>To be added.</remarks>
113+
<exception cref="T:System.ArgumentNullException">
114+
<paramref name="fixedArguments" /> or <paramref name="namedArguments" /> is <see langword="null" />.</exception>
113115
</Docs>
114116
</Member>
115117
<Member MemberName="CustomAttributeSignature">
@@ -199,6 +201,8 @@
199201
<summary>Encodes local variable signature.</summary>
200202
<returns>Encoder of a sequence of local variables.</returns>
201203
<remarks>To be added.</remarks>
204+
<exception cref="T:System.ArgumentOutOfRangeException">
205+
<paramref name="variableCount" /> is not in range [0, 0x1fffffff].</exception>
202206
</Docs>
203207
</Member>
204208
<Member MemberName="MethodSignature">
@@ -233,6 +237,8 @@
233237
<summary>Encodes method signature blob.</summary>
234238
<returns>An encoder of the rest of the signature including return value and parameters.</returns>
235239
<remarks>To be added.</remarks>
240+
<exception cref="T:System.ArgumentOutOfRangeException">
241+
<paramref name="genericParameterCount" /> is not in range [0, 0xffff].</exception>
236242
</Docs>
237243
</Member>
238244
<Member MemberName="MethodSpecificationSignature">
@@ -263,6 +269,8 @@
263269
<summary>Encodes method specification signature blob.</summary>
264270
<returns>Encoder of generic arguments.</returns>
265271
<remarks>To be added.</remarks>
272+
<exception cref="T:System.ArgumentOutOfRangeException">
273+
<paramref name="genericArgumentCount" /> is not in range [0, 0xffff].</exception>
266274
</Docs>
267275
</Member>
268276
<Member MemberName="PermissionSetArguments">
@@ -323,6 +331,8 @@
323331
<summary>Encodes a permission set blob.</summary>
324332
<returns>Permission set encoder.</returns>
325333
<remarks>To be added.</remarks>
334+
<exception cref="T:System.ArgumentOutOfRangeException">
335+
<paramref name="attributeCount" /> is not in range [0, 0x1fffffff].</exception>
326336
</Docs>
327337
</Member>
328338
<Member MemberName="PropertySignature">

xml/System.Reflection.Metadata.Ecma335/CodedIndex.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="CodedIndex" FullName="System.Reflection.Metadata.Ecma335.CodedIndex">
1+
<Type Name="CodedIndex" FullName="System.Reflection.Metadata.Ecma335.CodedIndex">
22
<TypeSignature Language="C#" Value="public static class CodedIndex" />
33
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit CodedIndex extends System.Object" />
44
<TypeSignature Language="DocId" Value="T:System.Reflection.Metadata.Ecma335.CodedIndex" />
@@ -52,6 +52,7 @@
5252
<summary>Calculates a CustomAttributeType coded index for the specified handle.</summary>
5353
<returns>To be added.</returns>
5454
<remarks>To be added.</remarks>
55+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
5556
</Docs>
5657
</Member>
5758
<Member MemberName="HasConstant">
@@ -83,6 +84,7 @@
8384
<summary>Calculates a HasConstant coded index for the specified handle.</summary>
8485
<returns>To be added.</returns>
8586
<remarks>To be added.</remarks>
87+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
8688
</Docs>
8789
</Member>
8890
<Member MemberName="HasCustomAttribute">
@@ -114,6 +116,7 @@
114116
<summary>Calculates a HasCustomAttribute coded index for the specified handle.</summary>
115117
<returns>To be added.</returns>
116118
<remarks>To be added.</remarks>
119+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
117120
</Docs>
118121
</Member>
119122
<Member MemberName="HasCustomDebugInformation">
@@ -145,6 +148,7 @@
145148
<summary>Calculates a HasCustomDebugInformation coded index for the specified handle.</summary>
146149
<returns>To be added.</returns>
147150
<remarks>To be added.</remarks>
151+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
148152
</Docs>
149153
</Member>
150154
<Member MemberName="HasDeclSecurity">
@@ -176,6 +180,7 @@
176180
<summary>Calculates a HasDeclSecurity coded index for the specified handle.</summary>
177181
<returns>To be added.</returns>
178182
<remarks>To be added.</remarks>
183+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
179184
</Docs>
180185
</Member>
181186
<Member MemberName="HasFieldMarshal">
@@ -207,6 +212,7 @@
207212
<summary>Calculates a HasFieldMarshal coded index for the specified handle.</summary>
208213
<returns>To be added.</returns>
209214
<remarks>To be added.</remarks>
215+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
210216
</Docs>
211217
</Member>
212218
<Member MemberName="HasSemantics">
@@ -238,6 +244,7 @@
238244
<summary>Calculates a HasSemantics coded index for the specified handle.</summary>
239245
<returns>To be added.</returns>
240246
<remarks>To be added.</remarks>
247+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
241248
</Docs>
242249
</Member>
243250
<Member MemberName="Implementation">
@@ -269,6 +276,7 @@
269276
<summary>Calculates an implementation coded index for the specified handle.</summary>
270277
<returns>To be added.</returns>
271278
<remarks>To be added.</remarks>
279+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
272280
</Docs>
273281
</Member>
274282
<Member MemberName="MemberForwarded">
@@ -300,6 +308,7 @@
300308
<summary>Calculates a MemberForwarded coded index for the specified handle.</summary>
301309
<returns>To be added.</returns>
302310
<remarks>To be added.</remarks>
311+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
303312
</Docs>
304313
</Member>
305314
<Member MemberName="MemberRefParent">
@@ -331,6 +340,7 @@
331340
<summary>Calculates a MemberRefParent coded index for the specified handle.</summary>
332341
<returns>To be added.</returns>
333342
<remarks>To be added.</remarks>
343+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
334344
</Docs>
335345
</Member>
336346
<Member MemberName="MethodDefOrRef">
@@ -362,6 +372,7 @@
362372
<summary>Calculates a MethodDefOrRef coded index for the specified handle.</summary>
363373
<returns>To be added.</returns>
364374
<remarks>To be added.</remarks>
375+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
365376
</Docs>
366377
</Member>
367378
<Member MemberName="ResolutionScope">
@@ -393,6 +404,7 @@
393404
<summary>Calculates a ResolutionScope coded index for the specified handle.</summary>
394405
<returns>To be added.</returns>
395406
<remarks>To be added.</remarks>
407+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
396408
</Docs>
397409
</Member>
398410
<Member MemberName="TypeDefOrRef">
@@ -424,6 +436,7 @@
424436
<summary>Calculates a TypeDefOrRef coded index for the specified handle.</summary>
425437
<returns>To be added.</returns>
426438
<remarks>To be added.</remarks>
439+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
427440
</Docs>
428441
</Member>
429442
<Member MemberName="TypeDefOrRefOrSpec">
@@ -455,6 +468,7 @@
455468
<summary>Calculates a TypeDefOrRefOrSpec coded index for the specified handle.</summary>
456469
<returns>To be added.</returns>
457470
<remarks>To be added.</remarks>
471+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
458472
</Docs>
459473
</Member>
460474
<Member MemberName="TypeOrMethodDef">
@@ -486,6 +500,7 @@
486500
<summary>Calculates a TypeOrMethodDef coded index for the specified handle.</summary>
487501
<returns>To be added.</returns>
488502
<remarks>To be added.</remarks>
503+
<exception cref="T:System.ArgumentException">The handle type is unexpected.</exception>
489504
</Docs>
490505
</Member>
491506
</Members>

xml/System.Reflection.Metadata.Ecma335/ControlFlowBuilder.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="ControlFlowBuilder" FullName="System.Reflection.Metadata.Ecma335.ControlFlowBuilder">
1+
<Type Name="ControlFlowBuilder" FullName="System.Reflection.Metadata.Ecma335.ControlFlowBuilder">
22
<TypeSignature Language="C#" Value="public sealed class ControlFlowBuilder" />
33
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ControlFlowBuilder extends System.Object" />
44
<TypeSignature Language="DocId" Value="T:System.Reflection.Metadata.Ecma335.ControlFlowBuilder" />
@@ -80,6 +80,13 @@
8080
<param name="catchType">The type of exception to be caught: <see cref="T:System.Reflection.Metadata.TypeDefinitionHandle" />, <see cref="T:System.Reflection.Metadata.TypeReferenceHandle" /> or <see cref="T:System.Reflection.Metadata.TypeSpecificationHandle" />.</param>
8181
<summary>Adds catch region.</summary>
8282
<remarks>To be added.</remarks>
83+
<exception cref="T:System.ArgumentException">A label was not defined by an instruction encoder this builder is associated with.
84+
85+
-or-
86+
87+
<paramref name="catchType" /> is not a valid type handle.
88+
</exception>
89+
<exception cref="T:System.ArgumentNullException">A label has default value.</exception>
8390
</Docs>
8491
</Member>
8592
<Member MemberName="AddFaultRegion">
@@ -115,6 +122,8 @@
115122
<param name="handlerEnd">Label marking the instruction immediately following the handler.</param>
116123
<summary>Adds fault region.</summary>
117124
<remarks>To be added.</remarks>
125+
<exception cref="T:System.ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception>
126+
<exception cref="T:System.ArgumentNullException">A label has default value.</exception>
118127
</Docs>
119128
</Member>
120129
<Member MemberName="AddFilterRegion">
@@ -152,6 +161,8 @@
152161
<param name="filterStart">Label marking the first instruction of the filter block.</param>
153162
<summary>Adds catch region.</summary>
154163
<remarks>To be added.</remarks>
164+
<exception cref="T:System.ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception>
165+
<exception cref="T:System.ArgumentNullException">A label has default value.</exception>
155166
</Docs>
156167
</Member>
157168
<Member MemberName="AddFinallyRegion">
@@ -187,6 +198,8 @@
187198
<param name="handlerEnd">Label marking the instruction immediately following the handler.</param>
188199
<summary>Adds finally region.</summary>
189200
<remarks>To be added.</remarks>
201+
<exception cref="T:System.ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception>
202+
<exception cref="T:System.ArgumentNullException">A label has default value.</exception>
190203
</Docs>
191204
</Member>
192205
</Members>

xml/System.Reflection.Metadata.Ecma335/CustomModifiersEncoder.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="CustomModifiersEncoder" FullName="System.Reflection.Metadata.Ecma335.CustomModifiersEncoder">
1+
<Type Name="CustomModifiersEncoder" FullName="System.Reflection.Metadata.Ecma335.CustomModifiersEncoder">
22
<TypeSignature Language="C#" Value="public struct CustomModifiersEncoder" />
33
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit CustomModifiersEncoder extends System.ValueType" />
44
<TypeSignature Language="DocId" Value="T:System.Reflection.Metadata.Ecma335.CustomModifiersEncoder" />
@@ -86,6 +86,8 @@
8686
<summary>Encodes a custom modifier.</summary>
8787
<returns>Encoder of subsequent modifiers.</returns>
8888
<remarks>To be added.</remarks>
89+
<exception cref="T:System.ArgumentException">
90+
<paramref name="type" /> is <see langword="null" /> or of an unexpected kind.</exception>
8991
</Docs>
9092
</Member>
9193
<Member MemberName="Builder">

xml/System.Reflection.Metadata.Ecma335/ExceptionRegionEncoder.xml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Type Name="ExceptionRegionEncoder" FullName="System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder">
1+
<Type Name="ExceptionRegionEncoder" FullName="System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder">
22
<TypeSignature Language="C#" Value="public struct ExceptionRegionEncoder" />
33
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit ExceptionRegionEncoder extends System.ValueType" />
44
<TypeSignature Language="DocId" Value="T:System.Reflection.Metadata.Ecma335.ExceptionRegionEncoder" />
@@ -69,6 +69,17 @@
6969
<summary>Adds an exception clause.</summary>
7070
<returns>Encoder for the next clause.</returns>
7171
<remarks>To be added.</remarks>
72+
<exception cref="T:System.ArgumentException">
73+
<paramref name="catchType" /> is invalid.</exception>
74+
<exception cref="T:System.ArgumentOutOfRangeException">
75+
<paramref name="kind" /> has an invalid value.
76+
77+
-or-
78+
79+
<paramref name="tryOffset" />, <paramref name="tryLength" />, <paramref name="handlerOffset" />, or <paramref name="handlerLength" /> is out of range.
80+
81+
</exception>
82+
<exception cref="T:System.InvalidOperationException">Method body was not declared to have exception regions.</exception>
7283
</Docs>
7384
</Member>
7485
<Member MemberName="AddCatch">
@@ -108,6 +119,11 @@
108119
<summary>Adds a fault clause.</summary>
109120
<returns>Encoder for the next clause.</returns>
110121
<remarks>To be added.</remarks>
122+
<exception cref="T:System.ArgumentException">
123+
<paramref name="catchType" /> is invalid.</exception>
124+
<exception cref="T:System.ArgumentOutOfRangeException">
125+
<paramref name="tryOffset" />, <paramref name="tryLength" />, <paramref name="handlerOffset" /> or <paramref name="handlerLength" /> is out of range.</exception>
126+
<exception cref="T:System.InvalidOperationException">Method body was not declared to have exception regions.</exception>
111127
</Docs>
112128
</Member>
113129
<Member MemberName="AddFault">
@@ -144,6 +160,9 @@
144160
<summary>Adds a fault clause.</summary>
145161
<returns>Encoder for the next clause.</returns>
146162
<remarks>To be added.</remarks>
163+
<exception cref="T:System.ArgumentOutOfRangeException">
164+
<paramref name="tryOffset" />, <paramref name="tryLength" />, <paramref name="handlerOffset" /> or <paramref name="handlerLength" /> is out of range.</exception>
165+
<exception cref="T:System.InvalidOperationException">Method body was not declared to have exception regions.</exception>
147166
</Docs>
148167
</Member>
149168
<Member MemberName="AddFilter">
@@ -182,6 +201,9 @@
182201
<summary>Adds a fault clause.</summary>
183202
<returns>Encoder for the next clause.</returns>
184203
<remarks>To be added.</remarks>
204+
<exception cref="T:System.ArgumentOutOfRangeException">
205+
<paramref name="tryOffset" />, <paramref name="tryLength" />, <paramref name="handlerOffset" /> or <paramref name="handlerLength" /> is out of range.</exception>
206+
<exception cref="T:System.InvalidOperationException">Method body was not declared to have exception regions.</exception>
185207
</Docs>
186208
</Member>
187209
<Member MemberName="AddFinally">
@@ -218,6 +240,9 @@
218240
<summary>Adds a finally clause.</summary>
219241
<returns>Encoder for the next clause.</returns>
220242
<remarks>To be added.</remarks>
243+
<exception cref="T:System.ArgumentOutOfRangeException">
244+
<paramref name="tryOffset" />, <paramref name="tryLength" />, <paramref name="handlerOffset" /> or <paramref name="handlerLength" /> is out of range.</exception>
245+
<exception cref="T:System.InvalidOperationException">Method body was not declared to have exception regions.</exception>
221246
</Docs>
222247
</Member>
223248
<Member MemberName="Builder">

0 commit comments

Comments
 (0)