Skip to content

Commit dc0b100

Browse files
carlossanlopRon Petrusha
authored andcommitted
Automatically port Reflection.Metadata.Ecma335 N-S APIs (#3213)
* Automatically port Reflection.Metadata.Ecma335 N-S APIs * Update NamedArgumentsEncoder.xml * Update PortablePdbBuilder.xml * Update ScalarEncoder.xml * Update SignatureDecoder`2.xml * suggestion by rpetrusha * Fixed broken link.
1 parent 3a9625f commit dc0b100

File tree

5 files changed

+91
-76
lines changed

5 files changed

+91
-76
lines changed

xml/System.Reflection.Metadata.Ecma335/NamedArgumentsEncoder.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
<Parameter Name="builder" Type="System.Reflection.Metadata.BlobBuilder" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
4646
</Parameters>
4747
<Docs>
48-
<param name="builder">To be added.</param>
49-
<summary>To be added.</summary>
48+
<param name="builder">A builder for encoding the named argument.</param>
49+
<summary>Initializes a new instance of the <see cref="T:System.Reflection.Metadata.Ecma335.NamedArgumentsEncoder" /> structure.</summary>
5050
<remarks>To be added.</remarks>
5151
</Docs>
5252
</Member>
@@ -75,11 +75,11 @@
7575
<Parameter Name="literal" Type="System.Action&lt;System.Reflection.Metadata.Ecma335.LiteralEncoder&gt;" Index="3" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
7676
</Parameters>
7777
<Docs>
78-
<param name="isField">To be added.</param>
79-
<param name="type">To be added.</param>
80-
<param name="name">To be added.</param>
81-
<param name="literal">To be added.</param>
82-
<summary>To be added.</summary>
78+
<param name="isField"><see langword="true" /> to encode a field, <see langword="false" /> to encode a property.</param>
79+
<param name="type">The method to call first to encode the type of the argument.</param>
80+
<param name="name">The method to call second to encode the name of the field or property.</param>
81+
<param name="literal">The method to call third to encode the literal value of the argument.</param>
82+
<summary>Encodes a named argument (a field or property).</summary>
8383
<remarks>To be added.</remarks>
8484
</Docs>
8585
</Member>
@@ -108,11 +108,11 @@
108108
<Parameter Name="literal" Type="System.Reflection.Metadata.Ecma335.LiteralEncoder" RefType="out" Index="3" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
109109
</Parameters>
110110
<Docs>
111-
<param name="isField">To be added.</param>
112-
<param name="type">To be added.</param>
113-
<param name="name">To be added.</param>
114-
<param name="literal">To be added.</param>
115-
<summary>To be added.</summary>
111+
<param name="isField"><see langword="true" /> to encode a field, <see langword="false" /> to encode a property.</param>
112+
<param name="type">The method to call first to encode the type of the argument.</param>
113+
<param name="name">The method to call second to encode the name of the field or property.</param>
114+
<param name="literal">The method to call third to encode the literal value of the argument.</param>
115+
<summary>Encodes a named argument (a field or property) and returns three encoders that must be used in the order they appear in the parameter list.</summary>
116116
<remarks>To be added.</remarks>
117117
</Docs>
118118
</Member>

xml/System.Reflection.Metadata.Ecma335/PortablePdbBuilder.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</Base>
1818
<Interfaces />
1919
<Docs>
20-
<summary>To be added.</summary>
20+
<summary>Represents the builder of a Portable PDB image.</summary>
2121
<remarks>To be added.</remarks>
2222
</Docs>
2323
<Members>
@@ -42,11 +42,11 @@
4242
<Parameter Name="idProvider" Type="System.Func&lt;System.Collections.Generic.IEnumerable&lt;System.Reflection.Metadata.Blob&gt;,System.Reflection.Metadata.BlobContentId&gt;" />
4343
</Parameters>
4444
<Docs>
45-
<param name="tablesAndHeaps">To be added.</param>
46-
<param name="typeSystemRowCounts">To be added.</param>
47-
<param name="entryPoint">To be added.</param>
48-
<param name="idProvider">To be added.</param>
49-
<summary>To be added.</summary>
45+
<param name="tablesAndHeaps">A builder populated with debug metadata entities stored in tables and values stored in heaps. The entities and values are enumerated when serializing the Portable PDB image.</param>
46+
<param name="typeSystemRowCounts">The row counts of all tables that the associated type system metadata contain. Each slot in the array corresponds to a table (<see cref="T:System.Reflection.Metadata.Ecma335.TableIndex" />). The length of the array must be equal <see cref="F:System.Reflection.Metadata.Ecma335.MetadataTokens.TableCount" />.</param>
47+
<param name="entryPoint">An entry point method definition handle.</param>
48+
<param name="idProvider">A function that calculates the ID of content represented as a sequence of blobs. If not specified, a default function that ignores the content and returns a content ID based on the current time is used (<see cref="M:System.Reflection.Metadata.BlobContentId.GetTimeBasedProvider" />). You must specify a deterministic function to produce a deterministic Portable PDB image.</param>
49+
<summary>Creates a builder of a Portable PDB image.</summary>
5050
<remarks>To be added.</remarks>
5151
</Docs>
5252
</Member>
@@ -144,9 +144,9 @@
144144
<Parameter Name="builder" Type="System.Reflection.Metadata.BlobBuilder" />
145145
</Parameters>
146146
<Docs>
147-
<param name="builder">To be added.</param>
148-
<summary>To be added.</summary>
149-
<returns>To be added.</returns>
147+
<param name="builder">The builder to write to.</param>
148+
<summary>Serializes portable PDB content into the given <see cref="T:System.Reflection.Metadata.BlobBuilder" />.</summary>
149+
<returns>The ID of the serialized content.</returns>
150150
<remarks>To be added.</remarks>
151151
</Docs>
152152
</Member>

xml/System.Reflection.Metadata.Ecma335/ScalarEncoder.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
<Parameter Name="value" Type="System.Object" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
9797
</Parameters>
9898
<Docs>
99-
<param name="value">To be added.</param>
100-
<summary>To be added.</summary>
99+
<param name="value">A constant of type <see cref="T:System.Boolean" />, <see cref="T:System.Byte" />, <see cref="T:System.SByte" />, <see cref="T:System.Int16" />, <see cref="T:System.UInt16" />, <see cref="T:System.Int32" />, <see cref="T:System.UInt32" />, <see cref="T:System.Int64" />, <see cref="T:System.UInt64" />, <see cref="T:System.Single" />, <see cref="T:System.Double" />, <see cref="T:System.Char" /> (encoded as a two-byte Unicode character), <see cref="T:System.String" /> (encoded as SerString), or <see cref="T:System.Enum" /> (encoded as the underlying integer value).</param>
100+
<summary>Encodes a constant literal.</summary>
101101
<remarks>To be added.</remarks>
102102
</Docs>
103103
</Member>
@@ -121,7 +121,7 @@
121121
</ReturnValue>
122122
<Parameters />
123123
<Docs>
124-
<summary>To be added.</summary>
124+
<summary>Encodes a <see langword="null" /> literal of type <see cref="T:System.Array" />.</summary>
125125
<remarks>To be added.</remarks>
126126
</Docs>
127127
</Member>
@@ -147,8 +147,8 @@
147147
<Parameter Name="serializedTypeName" Type="System.String" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
148148
</Parameters>
149149
<Docs>
150-
<param name="serializedTypeName">To be added.</param>
151-
<summary>To be added.</summary>
150+
<param name="serializedTypeName">The name of the type, or <see langword="null" />.</param>
151+
<summary>Encodes a literal of type <see cref="T:System.Type" /> (which can possibly be <see langword="null" />).</summary>
152152
<remarks>To be added.</remarks>
153153
</Docs>
154154
</Member>

xml/System.Reflection.Metadata.Ecma335/SignatureDecoder`2.xml

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,17 @@
2727
<Docs>
2828
<typeparam name="TType">To be added.</typeparam>
2929
<typeparam name="TGenericContext">To be added.</typeparam>
30-
<summary>To be added.</summary>
31-
<remarks>To be added.</remarks>
30+
<summary>Decodes signature blobs.</summary>
31+
<remarks>
32+
<format type="text/markdown">
33+
<![CDATA[
34+
35+
## Remarks
36+
37+
For more information, see the Metadata Specification section II.23.2: Blobs and signatures.
38+
39+
]]></format>
40+
</remarks>
3241
</Docs>
3342
<Members>
3443
<Member MemberName=".ctor">
@@ -50,10 +59,10 @@
5059
<Parameter Name="genericContext" Type="TGenericContext" />
5160
</Parameters>
5261
<Docs>
53-
<param name="provider">To be added.</param>
54-
<param name="metadataReader">To be added.</param>
55-
<param name="genericContext">To be added.</param>
56-
<summary>To be added.</summary>
62+
<param name="provider">The provider used to obtain type symbols as the signature is decoded.</param>
63+
<param name="metadataReader">The metadata reader from which the signature was obtained. It may be <see langword="null" /> if the given provider allows it.</param>
64+
<param name="genericContext">Additional context needed to resolve generic parameters.</param>
65+
<summary>Creates a new <see cref="T:System.Reflection.Metadata.Ecma335.SignatureDecoder`2" />.</summary>
5766
<remarks>To be added.</remarks>
5867
</Docs>
5968
</Member>
@@ -78,9 +87,9 @@
7887
<Parameter Name="blobReader" Type="System.Reflection.Metadata.BlobReader" RefType="ref" />
7988
</Parameters>
8089
<Docs>
81-
<param name="blobReader">To be added.</param>
82-
<summary>To be added.</summary>
83-
<returns>To be added.</returns>
90+
<param name="blobReader">The blob reader positioned at a field signature.</param>
91+
<summary>Decodes a field signature blob and advances the reader past the signature.</summary>
92+
<returns>The decoded field type.</returns>
8493
<remarks>To be added.</remarks>
8594
</Docs>
8695
</Member>
@@ -105,9 +114,9 @@
105114
<Parameter Name="blobReader" Type="System.Reflection.Metadata.BlobReader" RefType="ref" />
106115
</Parameters>
107116
<Docs>
108-
<param name="blobReader">To be added.</param>
109-
<summary>To be added.</summary>
110-
<returns>To be added.</returns>
117+
<param name="blobReader">The blob reader positioned at a local variable signature.</param>
118+
<summary>Decodes a local variable signature blob and advances the reader past the signature.</summary>
119+
<returns>The local variable types.</returns>
111120
<remarks>To be added.</remarks>
112121
</Docs>
113122
</Member>
@@ -132,9 +141,9 @@
132141
<Parameter Name="blobReader" Type="System.Reflection.Metadata.BlobReader" RefType="ref" />
133142
</Parameters>
134143
<Docs>
135-
<param name="blobReader">To be added.</param>
136-
<summary>To be added.</summary>
137-
<returns>To be added.</returns>
144+
<param name="blobReader">A blob reader positioned at a method signature.</param>
145+
<summary>Decodes a method (definition, reference, or standalone) or a property signature blob.</summary>
146+
<returns>The decoded method signature.</returns>
138147
<remarks>To be added.</remarks>
139148
</Docs>
140149
</Member>
@@ -159,9 +168,9 @@
159168
<Parameter Name="blobReader" Type="System.Reflection.Metadata.BlobReader" RefType="ref" />
160169
</Parameters>
161170
<Docs>
162-
<param name="blobReader">To be added.</param>
163-
<summary>To be added.</summary>
164-
<returns>To be added.</returns>
171+
<param name="blobReader">A blob reader positioned at a valid method specification signature.</param>
172+
<summary>Decodes a method specification signature blob and advances the reader past the signature.</summary>
173+
<returns>The types used to instantiate a generic method via the method specification.</returns>
165174
<remarks>To be added.</remarks>
166175
</Docs>
167176
</Member>
@@ -186,11 +195,17 @@
186195
<Parameter Name="allowTypeSpecifications" Type="System.Boolean" />
187196
</Parameters>
188197
<Docs>
189-
<param name="blobReader">To be added.</param>
190-
<param name="allowTypeSpecifications">To be added.</param>
191-
<summary>To be added.</summary>
192-
<returns>To be added.</returns>
193-
<remarks>To be added.</remarks>
198+
<param name="blobReader">The blob reader positioned at the leading <see cref="T:System.Reflection.Metadata.SignatureTypeCode" />.</param>
199+
<param name="allowTypeSpecifications"><see langword="true" /> to allow a <see cref="T:System.Reflection.Metadata.TypeSpecificationHandle" /> to follow a (CLASS | VALUETYPE) in the signature; <see langword="false" /> otherwise.</param>
200+
<summary>Decodes a type embedded in a signature and advances the reader past the type.</summary>
201+
<returns>The decoded type.</returns>
202+
<remarks>
203+
<format type="text/markdown"><![CDATA[
204+
205+
At present, the only context where `allowTypeSpecifications` might be `true` is in a LocalConstantSig as defined by the Portable PDB specification.
206+
207+
]]></format>
208+
</remarks>
194209
</Docs>
195210
</Member>
196211
</Members>

xml/System.Reflection.Metadata.Ecma335/SignatureTypeEncoder.xml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@
7373
<Parameter Name="arrayShape" Type="System.Action&lt;System.Reflection.Metadata.Ecma335.ArrayShapeEncoder&gt;" Index="1" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
7474
</Parameters>
7575
<Docs>
76-
<param name="elementType">To be added.</param>
77-
<param name="arrayShape">To be added.</param>
78-
<summary>To be added.</summary>
76+
<param name="elementType">Called first, to encode the type of the element.</param>
77+
<param name="arrayShape">Called second, to encode the shape of the array.</param>
78+
<summary>Encodes an array type.</summary>
7979
<remarks>To be added.</remarks>
8080
</Docs>
8181
</Member>
@@ -102,9 +102,9 @@
102102
<Parameter Name="arrayShape" Type="System.Reflection.Metadata.Ecma335.ArrayShapeEncoder" RefType="out" Index="1" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
103103
</Parameters>
104104
<Docs>
105-
<param name="elementType">To be added.</param>
106-
<param name="arrayShape">To be added.</param>
107-
<summary>To be added.</summary>
105+
<param name="elementType">Use first, to encode the type of the element.</param>
106+
<param name="arrayShape">Use second, to encode the shape of the array.</param>
107+
<summary>Encodes an array type. Returns a pair of encoders that must be used in the order they appear in the parameter list.</summary>
108108
<remarks>To be added.</remarks>
109109
</Docs>
110110
</Member>
@@ -224,7 +224,7 @@
224224
</ReturnValue>
225225
<Parameters />
226226
<Docs>
227-
<summary>To be added.</summary>
227+
<summary>Starts a signature of a type with custom modifiers.</summary>
228228
<returns>To be added.</returns>
229229
<remarks>To be added.</remarks>
230230
</Docs>
@@ -276,10 +276,10 @@
276276
<Parameter Name="genericParameterCount" Type="System.Int32" Index="2" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
277277
</Parameters>
278278
<Docs>
279-
<param name="convention">To be added.</param>
280-
<param name="attributes">To be added.</param>
281-
<param name="genericParameterCount">To be added.</param>
282-
<summary>To be added.</summary>
279+
<param name="convention">Calling convention.</param>
280+
<param name="attributes">Function pointer attributes.</param>
281+
<param name="genericParameterCount">Generic parameter count.</param>
282+
<summary>Starts a function pointer signature.</summary>
283283
<returns>To be added.</returns>
284284
<remarks>To be added.</remarks>
285285
</Docs>
@@ -308,10 +308,10 @@
308308
<Parameter Name="isValueType" Type="System.Boolean" Index="2" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
309309
</Parameters>
310310
<Docs>
311-
<param name="genericType">To be added.</param>
312-
<param name="genericArgumentCount">To be added.</param>
313-
<param name="isValueType">To be added.</param>
314-
<summary>To be added.</summary>
311+
<param name="genericType"><see cref="T:System.Reflection.Metadata.TypeDefinitionHandle" /> or <see cref="T:System.Reflection.Metadata.TypeReferenceHandle" />.</param>
312+
<param name="genericArgumentCount">Generic argument count.</param>
313+
<param name="isValueType"><see langword="true" /> to mark the type as value type, <see langword="false" /> to mark it as a reference type in the signature.</param>
314+
<summary>Starts a generic instantiation signature.</summary>
315315
<returns>To be added.</returns>
316316
<remarks>To be added.</remarks>
317317
</Docs>
@@ -338,8 +338,8 @@
338338
<Parameter Name="parameterIndex" Type="System.Int32" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
339339
</Parameters>
340340
<Docs>
341-
<param name="parameterIndex">To be added.</param>
342-
<summary>To be added.</summary>
341+
<param name="parameterIndex">Parameter index.</param>
342+
<summary>Encodes a reference to type parameter of a containing generic method.</summary>
343343
<remarks>To be added.</remarks>
344344
</Docs>
345345
</Member>
@@ -365,8 +365,8 @@
365365
<Parameter Name="parameterIndex" Type="System.Int32" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
366366
</Parameters>
367367
<Docs>
368-
<param name="parameterIndex">To be added.</param>
369-
<summary>To be added.</summary>
368+
<param name="parameterIndex">Parameter index.</param>
369+
<summary>Encodes a reference to type parameter of a containing generic type.</summary>
370370
<remarks>To be added.</remarks>
371371
</Docs>
372372
</Member>
@@ -510,7 +510,7 @@
510510
</ReturnValue>
511511
<Parameters />
512512
<Docs>
513-
<summary>To be added.</summary>
513+
<summary>Starts pointer signature.</summary>
514514
<returns>To be added.</returns>
515515
<remarks>To be added.</remarks>
516516
</Docs>
@@ -537,8 +537,8 @@
537537
<Parameter Name="type" Type="System.Reflection.Metadata.PrimitiveTypeCode" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
538538
</Parameters>
539539
<Docs>
540-
<param name="type">To be added.</param>
541-
<summary>To be added.</summary>
540+
<param name="type">Any primitive type code except for <see cref="F:System.Reflection.Metadata.PrimitiveTypeCode.TypedReference" /> and <see cref="F:System.Reflection.Metadata.PrimitiveTypeCode.Void" />.</param>
541+
<summary>Writes primitive type code.</summary>
542542
<remarks>To be added.</remarks>
543543
</Docs>
544544
</Member>
@@ -634,7 +634,7 @@
634634
</ReturnValue>
635635
<Parameters />
636636
<Docs>
637-
<summary>To be added.</summary>
637+
<summary>Starts SZ array (vector) signature.</summary>
638638
<returns>To be added.</returns>
639639
<remarks>To be added.</remarks>
640640
</Docs>
@@ -662,9 +662,9 @@
662662
<Parameter Name="isValueType" Type="System.Boolean" Index="1" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
663663
</Parameters>
664664
<Docs>
665-
<param name="type">To be added.</param>
666-
<param name="isValueType">To be added.</param>
667-
<summary>To be added.</summary>
665+
<param name="type"><see cref="T:System.Reflection.Metadata.TypeDefinitionHandle" /> or <see cref="T:System.Reflection.Metadata.TypeReferenceHandle" />.</param>
666+
<param name="isValueType"><see langword="true" /> to mark the type as value type, <see langword="false" /> to mark it as a reference type in the signature.</param>
667+
<summary>Encodes a reference to a type.</summary>
668668
<remarks>To be added.</remarks>
669669
</Docs>
670670
</Member>
@@ -784,7 +784,7 @@
784784
</ReturnValue>
785785
<Parameters />
786786
<Docs>
787-
<summary>To be added.</summary>
787+
<summary>Encodes a void pointer (<code>void*</code>).</summary>
788788
<remarks>To be added.</remarks>
789789
</Docs>
790790
</Member>

0 commit comments

Comments
 (0)