Skip to content

Commit ab393a5

Browse files
committed
standard resets
1 parent 5eb1aab commit ab393a5

File tree

5 files changed

+103
-73
lines changed

5 files changed

+103
-73
lines changed

xml/System.Numerics.Tensors/ReadOnlyTensorSpan`1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@
724724
<param name="destination">To be added.</param>
725725
<summary>To be added.</summary>
726726
<remarks>To be added.</remarks>
727-
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@)" />
727+
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)" />
728728
</Docs>
729729
</Member>
730730
<Member MemberName="Empty">
@@ -1989,7 +1989,7 @@
19891989
<MemberSignature Language="C++ CLI" Value=" virtual void System.Numerics.Tensors.IReadOnlyTensor&lt;System.Numerics.Tensors.ReadOnlyTensorSpan&lt;T&gt;,T&gt;.CopyTo(System::Numerics::Tensors::TensorSpan&lt;T&gt; ^ destination) = System::Numerics::Tensors::IReadOnlyTensor&lt;System::Numerics::Tensors::ReadOnlyTensorSpan&lt;T&gt;, T&gt;::CopyTo;" />
19901990
<MemberType>Method</MemberType>
19911991
<Implements>
1992-
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@)</InterfaceMember>
1992+
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)</InterfaceMember>
19931993
</Implements>
19941994
<AssemblyInfo>
19951995
<AssemblyName>System.Numerics.Tensors</AssemblyName>
@@ -2052,7 +2052,7 @@
20522052
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Numerics.Tensors.IReadOnlyTensor&lt;System.Numerics.Tensors.ReadOnlyTensorSpan&lt;T&gt;,T&gt;.TryCopyTo(System::Numerics::Tensors::TensorSpan&lt;T&gt; ^ destination) = System::Numerics::Tensors::IReadOnlyTensor&lt;System::Numerics::Tensors::ReadOnlyTensorSpan&lt;T&gt;, T&gt;::TryCopyTo;" />
20532053
<MemberType>Method</MemberType>
20542054
<Implements>
2055-
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@)</InterfaceMember>
2055+
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)</InterfaceMember>
20562056
</Implements>
20572057
<AssemblyInfo>
20582058
<AssemblyName>System.Numerics.Tensors</AssemblyName>
@@ -2189,7 +2189,7 @@
21892189
<summary>To be added.</summary>
21902190
<returns>To be added.</returns>
21912191
<remarks>To be added.</remarks>
2192-
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@)" />
2192+
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)" />
21932193
</Docs>
21942194
</Member>
21952195
<Member MemberName="TryFlattenTo">

xml/System.Numerics.Tensors/TensorSpan`1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@
863863
<param name="destination">To be added.</param>
864864
<summary>To be added.</summary>
865865
<remarks>To be added.</remarks>
866-
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@)" />
866+
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)" />
867867
</Docs>
868868
</Member>
869869
<Member MemberName="Empty">
@@ -2059,7 +2059,7 @@
20592059
<MemberSignature Language="C++ CLI" Value=" virtual void System.Numerics.Tensors.IReadOnlyTensor&lt;System.Numerics.Tensors.TensorSpan&lt;T&gt;,T&gt;.CopyTo(System::Numerics::Tensors::TensorSpan&lt;T&gt; ^ destination) = System::Numerics::Tensors::IReadOnlyTensor&lt;System::Numerics::Tensors::TensorSpan&lt;T&gt;, T&gt;::CopyTo;" />
20602060
<MemberType>Method</MemberType>
20612061
<Implements>
2062-
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@)</InterfaceMember>
2062+
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)</InterfaceMember>
20632063
</Implements>
20642064
<AssemblyInfo>
20652065
<AssemblyName>System.Numerics.Tensors</AssemblyName>
@@ -2353,7 +2353,7 @@
23532353
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Numerics.Tensors.IReadOnlyTensor&lt;System.Numerics.Tensors.TensorSpan&lt;T&gt;,T&gt;.TryCopyTo(System::Numerics::Tensors::TensorSpan&lt;T&gt; ^ destination) = System::Numerics::Tensors::IReadOnlyTensor&lt;System::Numerics::Tensors::TensorSpan&lt;T&gt;, T&gt;::TryCopyTo;" />
23542354
<MemberType>Method</MemberType>
23552355
<Implements>
2356-
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@)</InterfaceMember>
2356+
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)</InterfaceMember>
23572357
</Implements>
23582358
<AssemblyInfo>
23592359
<AssemblyName>System.Numerics.Tensors</AssemblyName>
@@ -2939,7 +2939,7 @@
29392939
<summary>To be added.</summary>
29402940
<returns>To be added.</returns>
29412941
<remarks>To be added.</remarks>
2942-
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@)" />
2942+
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)" />
29432943
</Docs>
29442944
</Member>
29452945
<Member MemberName="TryFlattenTo">

xml/System.Numerics.Tensors/Tensor`1.xml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@
483483
<param name="destination">To be added.</param>
484484
<summary>To be added.</summary>
485485
<remarks>To be added.</remarks>
486-
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@)" />
486+
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)" />
487487
</Docs>
488488
</Member>
489489
<Member MemberName="Empty">
@@ -727,9 +727,7 @@
727727
<Parameters />
728728
<Docs>
729729
<summary>Pins and gets a <see cref="T:System.Buffers.MemoryHandle" /> to the backing memory.</summary>
730-
<returns>
731-
<see cref="T:System.Buffers.MemoryHandle" />
732-
</returns>
730+
<returns>A handle to the backing memory.</returns>
733731
<remarks>To be added.</remarks>
734732
</Docs>
735733
</Member>
@@ -1553,7 +1551,7 @@
15531551
<MemberSignature Language="C++ CLI" Value=" virtual void System.Numerics.Tensors.IReadOnlyTensor&lt;System.Numerics.Tensors.Tensor&lt;T&gt;,T&gt;.CopyTo(System::Numerics::Tensors::TensorSpan&lt;T&gt; ^ destination) = System::Numerics::Tensors::IReadOnlyTensor&lt;System::Numerics::Tensors::Tensor&lt;T&gt; ^, T&gt;::CopyTo;" />
15541552
<MemberType>Method</MemberType>
15551553
<Implements>
1556-
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@)</InterfaceMember>
1554+
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.CopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)</InterfaceMember>
15571555
</Implements>
15581556
<AssemblyInfo>
15591557
<AssemblyName>System.Numerics.Tensors</AssemblyName>
@@ -1835,7 +1833,7 @@
18351833
<MemberSignature Language="C++ CLI" Value=" virtual bool System.Numerics.Tensors.IReadOnlyTensor&lt;System.Numerics.Tensors.Tensor&lt;T&gt;,T&gt;.TryCopyTo(System::Numerics::Tensors::TensorSpan&lt;T&gt; ^ destination) = System::Numerics::Tensors::IReadOnlyTensor&lt;System::Numerics::Tensors::Tensor&lt;T&gt; ^, T&gt;::TryCopyTo;" />
18361834
<MemberType>Method</MemberType>
18371835
<Implements>
1838-
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@)</InterfaceMember>
1836+
<InterfaceMember>M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)</InterfaceMember>
18391837
</Implements>
18401838
<AssemblyInfo>
18411839
<AssemblyName>System.Numerics.Tensors</AssemblyName>
@@ -2304,7 +2302,7 @@
23042302
<summary>To be added.</summary>
23052303
<returns>To be added.</returns>
23062304
<remarks>To be added.</remarks>
2307-
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@)" />
2305+
<inheritdoc cref="M:System.Numerics.Tensors.IReadOnlyTensor`2.TryCopyTo(System.Numerics.Tensors.TensorSpan{`1}@|System.Runtime.InteropServices.InAttribute)" />
23082306
</Docs>
23092307
</Member>
23102308
<Member MemberName="TryFlattenTo">

xml/System/Index.xml

Lines changed: 52 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,21 @@
5454
</Attribute>
5555
</Attributes>
5656
<Docs>
57-
<summary>Represent a type can be used to index a collection either from the start or the end.</summary>
57+
<summary>Represents a type that can be used to index a collection either from the beginning or the end.</summary>
5858
<remarks>
59-
Index is used by the C# compiler to support the new index syntax
60-
<code>
61-
int[] someArray = new int[5] { 1, 2, 3, 4, 5 } ;
62-
int lastElement = someArray[^1]; // lastElement = 5
63-
</code></remarks>
59+
<format type="text/markdown"><![CDATA[
60+
61+
## Remarks
62+
63+
`Index` is used by the C# compiler to support the `^` or ["index from end" operator](/dotnet/csharp/language-reference/operators/member-access-operators#index-from-end-operator-):
64+
65+
```csharp
66+
int[] someArray = new int[5] { 1, 2, 3, 4, 5 };
67+
int lastElement = someArray[^1]; // lastElement = 5
68+
```
69+
70+
]]></format>
71+
</remarks>
6472
</Docs>
6573
<Members>
6674
<Member MemberName=".ctor">
@@ -97,12 +105,19 @@
97105
<Parameter Name="fromEnd" Type="System.Boolean" />
98106
</Parameters>
99107
<Docs>
100-
<param name="value">The index value. it has to be zero or positive number.</param>
101-
<param name="fromEnd">Indicating if the index is from the start or from the end.</param>
102-
<summary>Construct an Index using a value and indicating if the index is from the start or from the end.</summary>
108+
<param name="value">The index value. It has to be greater then or equal to zero.</param>
109+
<param name="fromEnd">
110+
<see langword="true" /> to index from the end of the collection, or <see langword="false" /> to index from the beginning of the collection.</param>
111+
<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 beginning or the end of a collection.</summary>
103112
<remarks>
104-
If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element.
105-
</remarks>
113+
<format type="text/markdown"><![CDATA[
114+
115+
## Remarks
116+
117+
If the <xref: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 the last element.
118+
119+
]]></format>
120+
</remarks>
106121
</Docs>
107122
</Member>
108123
<Member MemberName="End">
@@ -139,7 +154,7 @@
139154
<ReturnType>System.Index</ReturnType>
140155
</ReturnValue>
141156
<Docs>
142-
<summary>Create an Index pointing at beyond last element.</summary>
157+
<summary>Gets an <see cref="T:System.Index" /> that points beyond the last element.</summary>
143158
<value>An index that points beyond the last element.</value>
144159
<remarks>To be added.</remarks>
145160
</Docs>
@@ -184,8 +199,8 @@
184199
<Parameter Name="other" Type="System.Index" />
185200
</Parameters>
186201
<Docs>
187-
<param name="other">An object to compare with this object</param>
188-
<summary>Indicates whether the current Index object is equal to another Index object.</summary>
202+
<param name="other">The object to compare with this instance.</param>
203+
<summary>Returns a value that indicates whether the current object is equal to another <see cref="T:System.Index" /> object.</summary>
189204
<returns>
190205
<see langword="true" /> if the current Index object is equal to <paramref name="other" />; <see langword="false" /> otherwise.</returns>
191206
<remarks>To be added.</remarks>
@@ -236,8 +251,8 @@
236251
</Parameter>
237252
</Parameters>
238253
<Docs>
239-
<param name="value">An object to compare with this object</param>
240-
<summary>Indicates whether the current Index object is equal to another object of the same type.</summary>
254+
<param name="value">An object to compare with this instance.</param>
255+
<summary>Indicates whether the current Index object is equal to a specified object.</summary>
241256
<returns>
242257
<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>
243258
<remarks>To be added.</remarks>
@@ -280,8 +295,8 @@
280295
<Parameter Name="value" Type="System.Int32" />
281296
</Parameters>
282297
<Docs>
283-
<param name="value">The index value from the end.</param>
284-
<summary>Create an Index from the end at the position indicated by the value.</summary>
298+
<param name="value">The index value from the end of a collection.</param>
299+
<summary>Creates an <see cref="T:System.Index" /> from the end of a collection at a specified index position.</summary>
285300
<returns>The index value.</returns>
286301
<remarks>To be added.</remarks>
287302
</Docs>
@@ -323,8 +338,8 @@
323338
<Parameter Name="value" Type="System.Int32" />
324339
</Parameters>
325340
<Docs>
326-
<param name="value">The index value from the start.</param>
327-
<summary>Create an Index from the start at the position indicated by the value.</summary>
341+
<param name="value">The index position from the start of a collection.</param>
342+
<summary>Creates an <see cref="T:System.Index" /> from the specified index at the start of a collection.</summary>
328343
<returns>The index value.</returns>
329344
<remarks>To be added.</remarks>
330345
</Docs>
@@ -406,15 +421,20 @@
406421
<Parameter Name="length" Type="System.Int32" />
407422
</Parameters>
408423
<Docs>
409-
<param name="length">The length of the collection that the Index will be used with. length has to be a positive value</param>
410-
<summary>Calculate the offset from the start using the giving collection length.</summary>
424+
<param name="length">The length of the collection that the Index will be used with. Must be a positive value.</param>
425+
<summary>Calculates the offset from the start of the collection using the specified collection length.</summary>
411426
<returns>The offset.</returns>
412427
<remarks>
413-
For performance reason, we don't validate the input length parameter and the returned offset value against negative values.
414-
we don't validate either the returned offset is greater than the input length.
415-
It is expected Index will be used with collections which always have non negative length/count. If the returned offset is negative and
416-
then used to index a collection will get out of range exception which will be same affect as the validation.
417-
</remarks>
428+
<format type="text/markdown"><![CDATA[
429+
430+
## Remarks
431+
432+
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`.
433+
434+
Collections are not expected to have a 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.
435+
436+
]]></format>
437+
</remarks>
418438
</Docs>
419439
</Member>
420440
<Member MemberName="IsFromEnd">
@@ -451,7 +471,7 @@
451471
<ReturnType>System.Boolean</ReturnType>
452472
</ReturnValue>
453473
<Docs>
454-
<summary>Indicates whether the index is from the start or the end.</summary>
474+
<summary>Gets a value that indicates whether the index is from the start or the end.</summary>
455475
<value>
456476
<see langword="true" /> if the Index is from the end; otherwise, <see langword="false" />.</value>
457477
<remarks>To be added.</remarks>
@@ -495,7 +515,7 @@
495515
</Parameters>
496516
<Docs>
497517
<param name="value">The integer to convert.</param>
498-
<summary>Converts integer number to an Index.</summary>
518+
<summary>Converts an integer number to an <see cref="T:System.Index" />.</summary>
499519
<returns>An index representing the integer.</returns>
500520
<remarks>To be added.</remarks>
501521
</Docs>
@@ -534,7 +554,7 @@
534554
<ReturnType>System.Index</ReturnType>
535555
</ReturnValue>
536556
<Docs>
537-
<summary>Create an Index pointing at first element.</summary>
557+
<summary>Gets an <see cref="T:System.Index" /> that points to the first element of a collection.</summary>
538558
<value>An instance that points to the first element of a collection.</value>
539559
<remarks>To be added.</remarks>
540560
</Docs>
@@ -574,7 +594,7 @@
574594
</ReturnValue>
575595
<Parameters />
576596
<Docs>
577-
<summary>Converts the value of the current Index object to its equivalent string representation.</summary>
597+
<summary>Returns the string representation of the current <see cref="T:System.Index" /> instance.</summary>
578598
<returns>The string representation of the <see cref="T:System.Index" />.</returns>
579599
<remarks>To be added.</remarks>
580600
</Docs>
@@ -613,7 +633,7 @@
613633
<ReturnType>System.Int32</ReturnType>
614634
</ReturnValue>
615635
<Docs>
616-
<summary>Returns the index value.</summary>
636+
<summary>Gets the index value.</summary>
617637
<value>The index value.</value>
618638
<remarks>To be added.</remarks>
619639
</Docs>

0 commit comments

Comments
 (0)