Skip to content

Commit f1abff3

Browse files
carlossanlopRon Petrusha
authored andcommitted
coreclr: Automatic port of triple slash from System (#2729)
* Automatic port of triple slash from System * Various fixes * Update Range.xml * Update SequencePosition.xml * Update Single.xml * Update Span`1.xml * Update ValueTuple.xml * Update ValueTuple`2.xml * Corrected malformed xml. * corrected malformed xml * Update xml/System/AggregateException.xml Co-Authored-By: Ron Petrusha <[email protected]> * Double.xml Co-Authored-By: Ron Petrusha <[email protected]> * FormattableString.xml Co-Authored-By: Ron Petrusha <[email protected]> * Index.xml Co-Authored-By: Ron Petrusha <[email protected]> * Progress.xml Co-Authored-By: Ron Petrusha <[email protected]> * ReadOnlySpan.xml Co-Authored-By: Ron Petrusha <[email protected]> * String.xml * varied suggestions * Minor changes.
1 parent f2cac88 commit f1abff3

14 files changed

+285
-134
lines changed

xml/System/AggregateException.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,8 @@
728728
<ReturnType>System.String</ReturnType>
729729
</ReturnValue>
730730
<Docs>
731-
<summary>To be added.</summary>
732-
<value>To be added.</value>
731+
<summary>Gets a message that describes the exception.</summary>
732+
<value>The message that describes the exception.</value>
733733
<remarks>To be added.</remarks>
734734
</Docs>
735735
</Member>
@@ -772,4 +772,4 @@
772772
</Docs>
773773
</Member>
774774
</Members>
775-
</Type>
775+
</Type>

xml/System/Double.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,9 @@
850850
<Parameter Name="d" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
851851
</Parameters>
852852
<Docs>
853-
<param name="d">To be added.</param>
854-
<summary>To be added.</summary>
855-
<returns>To be added.</returns>
853+
<param name="d">A double-precision floating-point number.</param>
854+
<summary>Determines whether the specified value is finite (zero, subnormal, or normal).</summary>
855+
<returns><see langword="true" /> if the value is finite (zero, subnormal or normal); <see langword="false" /> otherwise.</returns>
856856
<remarks>To be added.</remarks>
857857
</Docs>
858858
</Member>
@@ -1021,9 +1021,9 @@
10211021
<Parameter Name="d" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
10221022
</Parameters>
10231023
<Docs>
1024-
<param name="d">To be added.</param>
1025-
<summary>To be added.</summary>
1026-
<returns>To be added.</returns>
1024+
<param name="d">A double-precision floating-point number.</param>
1025+
<summary>Determines whether the specified value is negative.</summary>
1026+
<returns><see langword="true" /> if the value is negative; <see langword="false" /> otherwise.</returns>
10271027
<remarks>To be added.</remarks>
10281028
</Docs>
10291029
</Member>
@@ -1122,9 +1122,9 @@
11221122
<Parameter Name="d" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
11231123
</Parameters>
11241124
<Docs>
1125-
<param name="d">To be added.</param>
1126-
<summary>To be added.</summary>
1127-
<returns>To be added.</returns>
1125+
<param name="d">A double-precision floating-point number.</param>
1126+
<summary>Determines whether the specified value is normal.</summary>
1127+
<returns><see langword="true" /> if the value is normal; <see langword="false" /> otherwise.</returns>
11281128
<remarks>To be added.</remarks>
11291129
</Docs>
11301130
</Member>
@@ -1217,9 +1217,9 @@
12171217
<Parameter Name="d" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
12181218
</Parameters>
12191219
<Docs>
1220-
<param name="d">To be added.</param>
1221-
<summary>To be added.</summary>
1222-
<returns>To be added.</returns>
1220+
<param name="d">A double-precision floating-point number.</param>
1221+
<summary>Determines whether the specified value is subnormal.</summary>
1222+
<returns><see langword="true" /> if the value is subnormal; <see langword="false" /> otherwise.</returns>
12231223
<remarks>To be added.</remarks>
12241224
</Docs>
12251225
</Member>
@@ -3915,4 +3915,4 @@
39153915
</Docs>
39163916
</Member>
39173917
</Members>
3918-
</Type>
3918+
</Type>

xml/System/Environment.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2085,8 +2085,8 @@ The following example creates environment variables for the <xref:System.Environ
20852085
<ReturnType>System.Int64</ReturnType>
20862086
</ReturnValue>
20872087
<Docs>
2088-
<summary>To be added.</summary>
2089-
<value>To be added.</value>
2088+
<summary>Gets the number of milliseconds elapsed since the system started.</summary>
2089+
<value>The elapsed milliseconds since the system started.</value>
20902090
<remarks>To be added.</remarks>
20912091
</Docs>
20922092
</Member>

xml/System/FormattableString.xml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,28 @@
142142
<Parameter Name="formattable" Type="System.FormattableString" Index="0" FrameworkAlternate="netcore-3.0" />
143143
</Parameters>
144144
<Docs>
145-
<param name="formattable">To be added.</param>
146-
<summary>To be added.</summary>
147-
<returns>To be added.</returns>
148-
<remarks>To be added.</remarks>
145+
<param name="formattable">The string to be formatted.</param>
146+
<summary>Returns a result string in which arguments are formatted by using the conventions of the current culture.</summary>
147+
<returns>The string that results from formatting the current instance by using the conventions of the current culture.</returns>
148+
<remarks>
149+
<format type="text/markdown">
150+
<![CDATA[
151+
152+
### Remarks
153+
154+
This static method may be imported in C# by:
155+
156+
```csharp
157+
using static System.FormattableString;
158+
```
159+
160+
Within the scope of that import directive, an interpolated string may be formatted in the current culture by writing, for example:
161+
162+
```csharp
163+
CurrentCulture($"{{ lat = {latitude}; lon = {longitude} }}");
164+
```
165+
166+
]]></format>.</remarks>
149167
</Docs>
150168
</Member>
151169
<Member MemberName="Format">
@@ -468,4 +486,4 @@ Invariant($"{{ lat = {latitude}; lon = {longitude} }}")
468486
</Docs>
469487
</Member>
470488
</Members>
471-
</Type>
489+
</Type>

xml/System/Index.xml

Lines changed: 73 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,21 @@
2727
</Attribute>
2828
</Attributes>
2929
<Docs>
30-
<summary>To be added.</summary>
31-
<remarks>To be added.</remarks>
30+
<summary>Represent a type can be used to index a collection either from the start or the end.</summary>
31+
<remarks>
32+
<format type="text/markdown"><![CDATA[
33+
34+
### Remarks
35+
36+
`Index` is used by the C# compiler to support the new index syntax:
37+
38+
```csharp
39+
int[] someArray = new int[5] { 1, 2, 3, 4, 5 };
40+
int lastElement = someArray[^1]; // lastElement = 5
41+
```
42+
43+
]]></format>
44+
</remarks>
3245
</Docs>
3346
<Members>
3447
<Member MemberName=".ctor">
@@ -52,10 +65,20 @@
5265
<Parameter Name="fromEnd" Type="System.Boolean" />
5366
</Parameters>
5467
<Docs>
55-
<param name="value">To be added.</param>
56-
<param name="fromEnd">To be added.</param>
57-
<summary>To be added.</summary>
58-
<remarks>To be added.</remarks>
68+
<param name="value">The index value. It has to be greater or equal than zero.</param>
69+
<param name="fromEnd">A boolean indicating if the index is from the start (<see langword="false" />) or from the end (<see langword="true" />) of a collection.</param>
70+
<summary>Initializes a new <see cref="T:System.Index" /> with a specified index position and a value that indicates if the index is from the start or the end of a collection.</summary>
71+
<remarks>
72+
<format type="text/markdown">
73+
<![CDATA[
74+
75+
### Remarks
76+
77+
If the <see cref="T:System.Index" /> is constructed from the end, an index value of 1 points to the last element, and an index value of 0 points beyond last element.
78+
79+
]]>
80+
</format>
81+
</remarks>
5982
</Docs>
6083
</Member>
6184
<Member MemberName="End">
@@ -78,8 +101,8 @@
78101
<ReturnType>System.Index</ReturnType>
79102
</ReturnValue>
80103
<Docs>
81-
<summary>To be added.</summary>
82-
<value>To be added.</value>
104+
<summary>Gets an <see cref="T:System.Index" /> that points beyond the last element.</summary>
105+
<value>an <see cref="T:System.Index" /> that points beyond the last element.</value>
83106
<remarks>To be added.</remarks>
84107
</Docs>
85108
</Member>
@@ -109,9 +132,9 @@
109132
<Parameter Name="other" Type="System.Index" />
110133
</Parameters>
111134
<Docs>
112-
<param name="other">To be added.</param>
113-
<summary>To be added.</summary>
114-
<returns>To be added.</returns>
135+
<param name="other">The object to compare with this instance.</param>
136+
<summary>Returns a value that indicates whether the current object is equal to another <see cref="T:System.Index" /> object.</summary>
137+
<returns><see langword="true" /> if the current Index object is equal to <paramref name="other" />; <see langword="false" /> otherwise.</returns>
115138
<remarks>To be added.</remarks>
116139
</Docs>
117140
</Member>
@@ -138,9 +161,9 @@
138161
<Parameter Name="value" Type="System.Object" />
139162
</Parameters>
140163
<Docs>
141-
<param name="value">To be added.</param>
142-
<summary>To be added.</summary>
143-
<returns>To be added.</returns>
164+
<param name="value">An object to compare with this instance.</param>
165+
<summary>Indicates whether the current Index object is equal to a specified object.</summary>
166+
<returns><see langword="true" /> if <paramref name="value" /> is of type <see cref="T:System.Index" /> and is equal to the current instance; <see langword="false" /> otherwise.</returns>
144167
<remarks>To be added.</remarks>
145168
</Docs>
146169
</Member>
@@ -167,9 +190,9 @@
167190
<Parameter Name="value" Type="System.Int32" />
168191
</Parameters>
169192
<Docs>
170-
<param name="value">To be added.</param>
171-
<summary>To be added.</summary>
172-
<returns>To be added.</returns>
193+
<param name="value">The index value from the end of a collection.</param>
194+
<summary>Creates an <see cref="T:System.Index" /> from the end of a collection at a specified index position.</summary>
195+
<returns>The Index value.</returns>
173196
<remarks>To be added.</remarks>
174197
</Docs>
175198
</Member>
@@ -196,9 +219,9 @@
196219
<Parameter Name="value" Type="System.Int32" />
197220
</Parameters>
198221
<Docs>
199-
<param name="value">To be added.</param>
200-
<summary>To be added.</summary>
201-
<returns>To be added.</returns>
222+
<param name="value">The index position from the start of a collection.</param>
223+
<summary>Create an <see cref="T:System.Index" /> from the specified index at the start of a collection.</summary>
224+
<returns>The index value.</returns>
202225
<remarks>To be added.</remarks>
203226
</Docs>
204227
</Member>
@@ -223,8 +246,8 @@
223246
</ReturnValue>
224247
<Parameters />
225248
<Docs>
226-
<summary>To be added.</summary>
227-
<returns>To be added.</returns>
249+
<summary>Returns the hash code for this instance.</summary>
250+
<returns>The hash code.</returns>
228251
<remarks>To be added.</remarks>
229252
</Docs>
230253
</Member>
@@ -251,10 +274,22 @@
251274
<Parameter Name="length" Type="System.Int32" />
252275
</Parameters>
253276
<Docs>
254-
<param name="length">To be added.</param>
255-
<summary>To be added.</summary>
256-
<returns>To be added.</returns>
257-
<remarks>To be added.</remarks>
277+
<param name="length">The length of the collection that the Index will be used with. Must be a positive value.</param>
278+
<summary>Calculates the offset from the start using the given collection length.</summary>
279+
<returns>The offset.</returns>
280+
<remarks>
281+
<format type="text/markdown">
282+
<![CDATA[
283+
284+
## Remarks
285+
286+
For performance reasons, this method does not validate if `length` or the returned value are negative. It also doesn't validate if the returned value is greater than `length`.
287+
288+
Collections are not expected to have a non-negative length/count. If this method's returned offset is negative and is then used to index a collection, the runtime will throw <xref:System.ArgumentOutOfRangeException>, which will have the same effect as validation.
289+
290+
]]>
291+
</format>
292+
</remarks>
258293
</Docs>
259294
</Member>
260295
<Member MemberName="IsFromEnd">
@@ -277,8 +312,8 @@
277312
<ReturnType>System.Boolean</ReturnType>
278313
</ReturnValue>
279314
<Docs>
280-
<summary>To be added.</summary>
281-
<value>To be added.</value>
315+
<summary>Gets a value that indicates whether the index is from the start or the end.</summary>
316+
<value><see langword="true" /> if the Index is from the end; otherwise, <see. langword="false" />.</value>
282317
<remarks>To be added.</remarks>
283318
</Docs>
284319
</Member>
@@ -305,9 +340,9 @@
305340
<Parameter Name="value" Type="System.Int32" />
306341
</Parameters>
307342
<Docs>
308-
<param name="value">To be added.</param>
309-
<summary>To be added.</summary>
310-
<returns>To be added.</returns>
343+
<param name="value">The integer to convert.</param>
344+
<summary>Converts integer number to an Index.</summary>
345+
<returns>An Index representing the integer.</returns>
311346
<remarks>To be added.</remarks>
312347
</Docs>
313348
</Member>
@@ -331,8 +366,8 @@
331366
<ReturnType>System.Index</ReturnType>
332367
</ReturnValue>
333368
<Docs>
334-
<summary>To be added.</summary>
335-
<value>To be added.</value>
369+
<summary>Gets an <see cref="T:System.Index" /> that points to the first element of a collection.</summary>
370+
<value>An instance that points to the first element of a collection.</value>
336371
<remarks>To be added.</remarks>
337372
</Docs>
338373
</Member>
@@ -357,8 +392,8 @@
357392
</ReturnValue>
358393
<Parameters />
359394
<Docs>
360-
<summary>To be added.</summary>
361-
<returns>To be added.</returns>
395+
<summary>Returns the string representation of the current <see cref="T:System.Index" /> instance.</summary>
396+
<returns>The string representation of the <see cref="T:System.Index" />.</returns>
362397
<remarks>To be added.</remarks>
363398
</Docs>
364399
</Member>
@@ -382,10 +417,10 @@
382417
<ReturnType>System.Int32</ReturnType>
383418
</ReturnValue>
384419
<Docs>
385-
<summary>To be added.</summary>
386-
<value>To be added.</value>
420+
<summary>Gets the index value.</summary>
421+
<value>The index value.</value>
387422
<remarks>To be added.</remarks>
388423
</Docs>
389424
</Member>
390425
</Members>
391-
</Type>
426+
</Type>

xml/System/Progress`1.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
<param name="handler">A handler to invoke for each reported progress value. This handler will be invoked in addition to any delegates registered with the <see cref="E:System.Progress`1.ProgressChanged" /> event. Depending on the <see cref="T:System.Threading.SynchronizationContext" /> instance captured by the <see cref="T:System.Progress`1" /> at construction, it is possible that this handler instance could be invoked concurrently with itself.</param>
126126
<summary>Initializes the <see cref="T:System.Progress`1" /> object with the specified callback.</summary>
127127
<remarks>To be added.</remarks>
128+
<exception cref="T:System.ArgumentNullException"><paramref name="handler" /> is <see langword="null" /> (<see langword="Nothing" /> in Visual Basic).</exception>
128129
</Docs>
129130
</Member>
130131
<Member MemberName="OnReport">
@@ -247,4 +248,4 @@
247248
</Docs>
248249
</Member>
249250
</Members>
250-
</Type>
251+
</Type>

0 commit comments

Comments
 (0)