Skip to content

Commit 5fa526e

Browse files
carlossanlopRon Petrusha
andcommitted
Port System.Reflection.Metadata source code comments to Docs (F-I files) (#2332)
* Port System.Reflection.Metadata source code comments to Docs (F-I files) * Port System.Reflection.Metadata source code comments to Docs (F-I files) - Fix some &gt; and &lt; * Port System.Reflection.Metadata source code comments to Docs (F-I files) - Fix extra dot * Apply suggestions from code review Suggestions by rpetrusha Co-Authored-By: Ron Petrusha <[email protected]>
1 parent 1fe281b commit 5fa526e

12 files changed

+119
-92
lines changed

xml/System.Reflection.Metadata/FieldDefinition.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@
248248
</ReturnValue>
249249
<Parameters />
250250
<Docs>
251-
<summary>To be added.</summary>
252-
<returns>To be added.</returns>
251+
<summary>Returns the field layout offset, or -1 if it is not available.</summary>
252+
<returns>The field definition offset, or -1 if it is not available.</returns>
253253
<remarks>To be added.</remarks>
254254
</Docs>
255255
</Member>
@@ -333,4 +333,4 @@
333333
</Docs>
334334
</Member>
335335
</Members>
336-
</Type>
336+
</Type>

xml/System.Reflection.Metadata/GenericParameter.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<ReturnType>System.Reflection.GenericParameterAttributes</ReturnType>
5050
</ReturnValue>
5151
<Docs>
52-
<summary>To be added.</summary>
52+
<summary>Gets the attributes specifying variance and constraints.</summary>
5353
<value>To be added.</value>
5454
<remarks>To be added.</remarks>
5555
</Docs>
@@ -129,7 +129,7 @@
129129
<ReturnType>System.Int32</ReturnType>
130130
</ReturnValue>
131131
<Docs>
132-
<summary>To be added.</summary>
132+
<summary>Gets the zero-based index of the parameter within the declaring generic type or method declaration.</summary>
133133
<value>To be added.</value>
134134
<remarks>To be added.</remarks>
135135
</Docs>
@@ -155,7 +155,7 @@
155155
<ReturnType>System.Reflection.Metadata.StringHandle</ReturnType>
156156
</ReturnValue>
157157
<Docs>
158-
<summary>To be added.</summary>
158+
<summary>Gets the name of the generic parameter.</summary>
159159
<value>To be added.</value>
160160
<remarks>To be added.</remarks>
161161
</Docs>
@@ -181,10 +181,10 @@
181181
<ReturnType>System.Reflection.Metadata.EntityHandle</ReturnType>
182182
</ReturnValue>
183183
<Docs>
184-
<summary>To be added.</summary>
184+
<summary>Gets a <see cref="T:System.Reflection.Metadata.TypeDefinitionHandle" /> or <see cref="T:System.Reflection.Metadata.MethodDefinitionHandle" /> that represents the parent of this generic parameter.</summary>
185185
<value>To be added.</value>
186186
<remarks>To be added.</remarks>
187187
</Docs>
188188
</Member>
189189
</Members>
190-
</Type>
190+
</Type>

xml/System.Reflection.Metadata/GenericParameterConstraint.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<ReturnType>System.Reflection.Metadata.GenericParameterHandle</ReturnType>
7777
</ReturnValue>
7878
<Docs>
79-
<summary>To be added.</summary>
79+
<summary>Gets the constrained <see cref="T:System.Reflection.Metadata.GenericParameterHandle" />.</summary>
8080
<value>To be added.</value>
8181
<remarks>To be added.</remarks>
8282
</Docs>
@@ -102,10 +102,12 @@
102102
<ReturnType>System.Reflection.Metadata.EntityHandle</ReturnType>
103103
</ReturnValue>
104104
<Docs>
105-
<summary>To be added.</summary>
106-
<value>To be added.</value>
105+
<summary>Gets a handle (<see cref="T:System.Reflection.Metadata.TypeDefinitionHandle" />, <see cref="T:System.Reflection.Metadata.TypeReferenceHandle" />, or <see cref="T:System.Reflection.Metadata.TypeSpecificationHandle" />)
106+
specifying from which type this generic parameter is constrained to derive,
107+
or which interface this generic parameter is constrained to implement.</summary>
108+
<value>An <see cref="T:System.Reflection.Metadata.EntityHandle" /> instance.</value>
107109
<remarks>To be added.</remarks>
108110
</Docs>
109111
</Member>
110112
</Members>
111-
</Type>
113+
</Type>

xml/System.Reflection.Metadata/HandleComparer.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
<Parameter Name="y" Type="System.Reflection.Metadata.EntityHandle" />
6565
</Parameters>
6666
<Docs>
67-
<param name="x">To be added.</param>
68-
<param name="y">To be added.</param>
69-
<summary>To be added.</summary>
70-
<returns>To be added.</returns>
67+
<param name="x">The first entity handle to compare.</param>
68+
<param name="y">The second entity handle to compare.</param>
69+
<summary>Compares two entity handles.</summary>
70+
<returns>Zero if the two entity handles are equal, and a non-zero value of they are not.</returns>
7171
<remarks>To be added.</remarks>
7272
</Docs>
7373
</Member>
@@ -99,10 +99,10 @@
9999
<Parameter Name="y" Type="System.Reflection.Metadata.Handle" />
100100
</Parameters>
101101
<Docs>
102-
<param name="x">To be added.</param>
103-
<param name="y">To be added.</param>
104-
<summary>To be added.</summary>
105-
<returns>To be added.</returns>
102+
<param name="x">The first handle to compare.</param>
103+
<param name="y">The second handle to compare.</param>
104+
<summary>Compares two handles.</summary>
105+
<returns>Zero if the two handles are equal, and a non-zero value if they are not.</returns>
106106
<remarks>To be added.</remarks>
107107
</Docs>
108108
</Member>
@@ -269,4 +269,4 @@
269269
</Docs>
270270
</Member>
271271
</Members>
272-
</Type>
272+
</Type>

xml/System.Reflection.Metadata/IConstructedTypeProvider`1.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
<Parameter Name="shape" Type="System.Reflection.Metadata.ArrayShape" Index="1" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
5050
</Parameters>
5151
<Docs>
52-
<param name="elementType">To be added.</param>
53-
<param name="shape">To be added.</param>
54-
<summary>To be added.</summary>
52+
<param name="elementType">The type of the elements in the array.</param>
53+
<param name="shape">The shape (rank, sizes, and lower bounds) of the array.</param>
54+
<summary>Gets the type symbol for a generalized array of the given element type and shape.</summary>
5555
<returns>To be added.</returns>
5656
<remarks>To be added.</remarks>
5757
</Docs>
@@ -79,7 +79,7 @@
7979
</Parameters>
8080
<Docs>
8181
<param name="elementType">To be added.</param>
82-
<summary>To be added.</summary>
82+
<summary>Gets the type symbol for a managed pointer to the given element type.</summary>
8383
<returns>To be added.</returns>
8484
<remarks>To be added.</remarks>
8585
</Docs>
@@ -135,7 +135,7 @@
135135
<Docs>
136136
<param name="genericType">To be added.</param>
137137
<param name="typeArguments">To be added.</param>
138-
<summary>To be added.</summary>
138+
<summary>Gets the type symbol for a generic instantiation of the given generic type with the given type arguments.</summary>
139139
<returns>To be added.</returns>
140140
<remarks>To be added.</remarks>
141141
</Docs>
@@ -163,10 +163,10 @@
163163
</Parameters>
164164
<Docs>
165165
<param name="elementType">To be added.</param>
166-
<summary>To be added.</summary>
166+
<summary>Gets the type symbol for an unmanaged pointer to the given element type.</summary>
167167
<returns>To be added.</returns>
168168
<remarks>To be added.</remarks>
169169
</Docs>
170170
</Member>
171171
</Members>
172-
</Type>
172+
</Type>

xml/System.Reflection.Metadata/ICustomAttributeTypeProvider`1.xml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</ReturnValue>
5050
<Parameters />
5151
<Docs>
52-
<summary>To be added.</summary>
52+
<summary>Gets the <typeparamref name="TType" /> representation for <see cref="T:System.Type" />.</summary>
5353
<returns>To be added.</returns>
5454
<remarks>To be added.</remarks>
5555
</Docs>
@@ -76,10 +76,11 @@
7676
<Parameter Name="name" Type="System.String" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
7777
</Parameters>
7878
<Docs>
79-
<param name="name">To be added.</param>
80-
<summary>To be added.</summary>
81-
<returns>To be added.</returns>
79+
<param name="name">The serialized type name in so-called "reflection notation" format (as understood by the <see cref="M:System.Type.GetType(System.String)" /> method.)</param>
80+
<summary>Gets the type symbol for the given serialized type name.</summary>
81+
<returns>A <typeparamref name="TType" /> instance.</returns>
8282
<remarks>To be added.</remarks>
83+
<exception cref="T:System.BadImageFormatException">The name is malformed.</exception>
8384
</Docs>
8485
</Member>
8586
<Member MemberName="GetUnderlyingEnumType">
@@ -104,10 +105,11 @@
104105
<Parameter Name="type" Type="TType" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
105106
</Parameters>
106107
<Docs>
107-
<param name="type">To be added.</param>
108-
<summary>To be added.</summary>
109-
<returns>To be added.</returns>
108+
<param name="type">An enum type.</param>
109+
<summary>Gets the underlying type of the given enum type symbol.</summary>
110+
<returns>A type code that indicates the underlying type of the enumeration.</returns>
110111
<remarks>To be added.</remarks>
112+
<exception cref="T:System.BadImageFormatException">The given type symbol does not represent an enum.</exception>
111113
</Docs>
112114
</Member>
113115
<Member MemberName="IsSystemType">
@@ -132,11 +134,11 @@
132134
<Parameter Name="type" Type="TType" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
133135
</Parameters>
134136
<Docs>
135-
<param name="type">To be added.</param>
136-
<summary>To be added.</summary>
137-
<returns>To be added.</returns>
137+
<param name="type">The type to verify.</param>
138+
<summary>Verifies if the given type represents <see cref="T:System.Type" />.</summary>
139+
<returns><see langword="true" /> if the given type is a <see cref="T:System.Type" />, <see langword="false" /> otherwise.</returns>
138140
<remarks>To be added.</remarks>
139141
</Docs>
140142
</Member>
141143
</Members>
142-
</Type>
144+
</Type>

xml/System.Reflection.Metadata/ILOpCodeExtensions.xml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@
4343
<Parameter Name="opCode" Type="System.Reflection.Metadata.ILOpCode" RefType="this" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
4444
</Parameters>
4545
<Docs>
46-
<param name="opCode">To be added.</param>
47-
<summary>To be added.</summary>
48-
<returns>To be added.</returns>
46+
<param name="opCode">The branch op-code.</param>
47+
<summary>Calculates the size of the specified branch instruction operand.</summary>
48+
<returns>1 if <paramref name="opCode" /> is a short branch, or 4 if it is a long branch.</returns>
4949
<remarks>To be added.</remarks>
50+
<exception cref="T:System.ArgumentException">The specified <paramref name="opCode" /> is not a branch op-code.</exception>
5051
</Docs>
5152
</Member>
5253
<Member MemberName="GetLongBranch">
@@ -71,10 +72,11 @@
7172
<Parameter Name="opCode" Type="System.Reflection.Metadata.ILOpCode" RefType="this" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
7273
</Parameters>
7374
<Docs>
74-
<param name="opCode">To be added.</param>
75-
<summary>To be added.</summary>
76-
<returns>To be added.</returns>
75+
<param name="opCode">The branch op-code.</param>
76+
<summary>Gets a long form of the specified branch op-code.</summary>
77+
<returns>The long form of the branch op-code.</returns>
7778
<remarks>To be added.</remarks>
79+
<exception cref="T:System.ArgumentException">The specified <paramref name="opCode" /> is not a branch op-code.</exception>
7880
</Docs>
7981
</Member>
8082
<Member MemberName="GetShortBranch">
@@ -99,10 +101,11 @@
99101
<Parameter Name="opCode" Type="System.Reflection.Metadata.ILOpCode" RefType="this" Index="0" FrameworkAlternate="netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0" />
100102
</Parameters>
101103
<Docs>
102-
<param name="opCode">To be added.</param>
103-
<summary>To be added.</summary>
104-
<returns>To be added.</returns>
104+
<param name="opCode">The branch op-code.</param>
105+
<summary>Gets a short form of the specified branch op-code.</summary>
106+
<returns>The short form of the branch op-code.</returns>
105107
<remarks>To be added.</remarks>
108+
<exception cref="T:System.ArgumentException">The specified <paramref name="opCode" /> is not a branch op-code.</exception>
106109
</Docs>
107110
</Member>
108111
<Member MemberName="IsBranch">
@@ -128,10 +131,10 @@
128131
</Parameters>
129132
<Docs>
130133
<param name="opCode">To be added.</param>
131-
<summary>To be added.</summary>
132-
<returns>To be added.</returns>
134+
<summary>Verifies if the specified op-code is a branch to a label.</summary>
135+
<returns><see langword="true" /> if the specified op-code is a branch to a label, <see langword="false" /> otherwise.</returns>
133136
<remarks>To be added.</remarks>
134137
</Docs>
135138
</Member>
136139
</Members>
137-
</Type>
140+
</Type>

xml/System.Reflection.Metadata/ISZArrayTypeProvider`1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
</Parameters>
4646
<Docs>
4747
<param name="elementType">To be added.</param>
48-
<summary>To be added.</summary>
49-
<returns>To be added.</returns>
48+
<summary>Gets the type symbol for a single-dimensional array of the given element type with a lower bounds of zero.</summary>
49+
<returns>A <typeparamref name="TType" /> instance.</returns>
5050
<remarks>To be added.</remarks>
5151
</Docs>
5252
</Member>
5353
</Members>
54-
</Type>
54+
</Type>

xml/System.Reflection.Metadata/ISignatureTypeProvider`2.xml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
</Parameters>
5656
<Docs>
5757
<param name="signature">To be added.</param>
58-
<summary>To be added.</summary>
59-
<returns>To be added.</returns>
58+
<summary>Gets the type symbol for the function pointer type of the given method <paramref name="signature" />.</summary>
59+
<returns>The type symbol for the function pointer type.</returns>
6060
<remarks>To be added.</remarks>
6161
</Docs>
6262
</Member>
@@ -84,8 +84,8 @@
8484
<Docs>
8585
<param name="genericContext">To be added.</param>
8686
<param name="index">To be added.</param>
87-
<summary>To be added.</summary>
88-
<returns>To be added.</returns>
87+
<summary>Gets the type symbol for the generic method parameter at the given zero-based <paramref name="index" />.</summary>
88+
<returns>The type symbol for the generic method parameter at <paramref name="index" />.</returns>
8989
<remarks>To be added.</remarks>
9090
</Docs>
9191
</Member>
@@ -113,8 +113,8 @@
113113
<Docs>
114114
<param name="genericContext">To be added.</param>
115115
<param name="index">To be added.</param>
116-
<summary>To be added.</summary>
117-
<returns>To be added.</returns>
116+
<summary>Gets the type symbol for the generic type parameter at the given zero-based <paramref name="index" />.</summary>
117+
<returns>The type symbol for the generic type parameter at the given zero-based <paramref name="index" />.</returns>
118118
<remarks>To be added.</remarks>
119119
</Docs>
120120
</Member>
@@ -141,11 +141,11 @@
141141
<Parameter Name="isRequired" Type="System.Boolean" />
142142
</Parameters>
143143
<Docs>
144-
<param name="modifier">To be added.</param>
145-
<param name="unmodifiedType">To be added.</param>
146-
<param name="isRequired">To be added.</param>
147-
<summary>To be added.</summary>
148-
<returns>To be added.</returns>
144+
<param name="modifier">The modifier type applied.</param>
145+
<param name="unmodifiedType">The type symbol of the underlying type without modifiers applied.</param>
146+
<param name="isRequired"><see langword="true" /> if the modifier is required, <see langword="false" /> if it's optional.</param>
147+
<summary>Gets the type symbol for a type with a custom modifier applied.</summary>
148+
<returns>The type symbol.</returns>
149149
<remarks>To be added.</remarks>
150150
</Docs>
151151
</Member>
@@ -171,8 +171,8 @@
171171
</Parameters>
172172
<Docs>
173173
<param name="elementType">To be added.</param>
174-
<summary>To be added.</summary>
175-
<returns>To be added.</returns>
174+
<summary>Gets the type symbol for a local variable type that is marked as pinned.</summary>
175+
<returns>The type symbol for the local variable type.</returns>
176176
<remarks>To be added.</remarks>
177177
</Docs>
178178
</Member>
@@ -200,14 +200,20 @@
200200
<Parameter Name="rawTypeKind" Type="System.Byte" />
201201
</Parameters>
202202
<Docs>
203-
<param name="reader">To be added.</param>
204-
<param name="genericContext">To be added.</param>
205-
<param name="handle">To be added.</param>
206-
<param name="rawTypeKind">To be added.</param>
207-
<summary>To be added.</summary>
208-
<returns>To be added.</returns>
209-
<remarks>To be added.</remarks>
203+
<param name="reader">The metadata reader that was passed to the signature decoder. It may be <see langword="null" />.</param>
204+
<param name="genericContext">The context that was passed to the signature decoder.</param>
205+
<param name="handle">The type specification handle.</param>
206+
<param name="rawTypeKind">The kind of the type, as specified in the signature. To interpret this value, use <see cref="M:System.Reflection.Metadata.Ecma335.MetadataReaderExtensions.ResolveSignatureTypeKind(System.Reflection.Metadata.MetadataReader,System.Reflection.Metadata.EntityHandle,System.Byte)" />.</param>
207+
<summary>Gets the type symbol for a type specification.</summary>
208+
<returns>The type symbol for the type specification.</returns>
209+
<remarks>
210+
<format type="text/markdown">
211+
<![CDATA[
212+
## Remarks
213+
When the signature comes from a WinMD file, additional processing is needed to determine whether the target type is a value type or a reference type.
214+
]]></format>
215+
</remarks>
210216
</Docs>
211217
</Member>
212218
</Members>
213-
</Type>
219+
</Type>

0 commit comments

Comments
 (0)