Skip to content

Commit 4aed795

Browse files
authored
Merge pull request #3623 from dotnet/master
Update live with current master
2 parents 98802e6 + d8f40c0 commit 4aed795

File tree

9 files changed

+81
-37
lines changed

9 files changed

+81
-37
lines changed

xml/System.Buffers/ReadOnlySpanAction`2.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
<ReturnType>System.Void</ReturnType>
3333
</ReturnValue>
3434
<Docs>
35-
<typeparam name="T">To be added.</typeparam>
36-
<typeparam name="TArg">To be added.</typeparam>
37-
<param name="span">To be added.</param>
38-
<param name="arg">To be added.</param>
39-
<summary>To be added.</summary>
35+
<typeparam name="T">The type of the objects in the read-only span.</typeparam>
36+
<typeparam name="TArg">The type of the object that represents the state.</typeparam>
37+
<param name="span">A read-only span of objects of type <typeparamref name="T" />.</param>
38+
<param name="arg">A state object of type <typeparamref name="TArg" />.</param>
39+
<summary>Encapsulates a method that receives a read-only span of objects of type <typeparamref name="T" /> and a state object of type <typeparamref name="TArg" />.</summary>
4040
<remarks>To be added.</remarks>
4141
</Docs>
4242
</Type>

xml/System.Buffers/SpanAction`2.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
<ReturnType>System.Void</ReturnType>
3333
</ReturnValue>
3434
<Docs>
35-
<typeparam name="T">To be added.</typeparam>
36-
<typeparam name="TArg">To be added.</typeparam>
37-
<param name="span">To be added.</param>
38-
<param name="arg">To be added.</param>
39-
<summary>To be added.</summary>
35+
<typeparam name="T">The type of the objects in the span.</typeparam>
36+
<typeparam name="TArg">The type of the object that represents the state.</typeparam>
37+
<param name="span">A span of objects of type <typeparamref name="T" />.</param>
38+
<param name="arg">A state object of type <typeparamref name="TArg" />.</param>
39+
<summary>Encapsulates a method that receives a span of objects of type <typeparamref name="T" /> and a state object of type <typeparamref name="TArg" />.</summary>
4040
<remarks>To be added.</remarks>
4141
</Docs>
4242
</Type>

xml/System.Collections.Generic/List`1.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3618,9 +3618,12 @@ Public Function StartsWith(e As Employee) As Boolean
36183618
36193619
36203620
## Examples
3621+
3622+
[!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)]
3623+
36213624
The following example adds some names to a `List<String>` object, displays the list in unsorted order, calls the <xref:System.Collections.Generic.List%601.Sort%2A> method, and then displays the sorted list.
36223625
3623-
[!code-csharp[System.Collections.Generic.List.Sort#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.sort/cs/Sort1.cs#2)]
3626+
[!code-csharp-interactive[System.Collections.Generic.List.Sort#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.sort/cs/Sort1.cs#2)]
36243627
[!code-vb[System.Collections.Generic.List.Sort#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.list.sort/vb/Sort1.vb#2)]
36253628
36263629
The following code demonstrates the <xref:System.Collections.Generic.List%601.Sort> and <xref:System.Collections.Generic.List%601.Sort%28System.Comparison%7B%600%7D%29> method overloads on a simple business object. Calling the <xref:System.Collections.Generic.List%601.Sort> method results in the use of the default comparer for the Part type, and the <xref:System.Collections.Generic.List%601.Sort%28System.Comparison%7B%600%7D%29> method is implemented by using an anonymous method.
@@ -3633,7 +3636,7 @@ Public Function StartsWith(e As Employee) As Boolean
36333636
The <xref:System.Collections.Generic.List%601.BinarySearch%28%600%29> method overload is then used to search for two strings that are not in the list, and the <xref:System.Collections.Generic.List%601.Insert%2A> method is used to insert them. The return value of the <xref:System.Collections.Generic.List%601.BinarySearch%2A> method is negative in each case, because the strings are not in the list. Taking the bitwise complement (the ~ operator in C# and Visual C++, `Xor` -1 in Visual Basic) of this negative number produces the index of the first element in the list that is larger than the search string, and inserting at this location preserves the sort order. The second search string is larger than any element in the list, so the insertion position is at the end of the list.
36343637
36353638
[!code-cpp[List\`1_SortSearch#1](~/samples/snippets/cpp/VS_Snippets_CLR/List`1_SortSearch/cpp/source.cpp#1)]
3636-
[!code-csharp[List\`1_SortSearch#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearch/cs/source.cs#1)]
3639+
[!code-csharp-interactive[List\`1_SortSearch#1](~/samples/snippets/csharp/VS_Snippets_CLR/List`1_SortSearch/cs/source.cs#1)]
36373640
[!code-vb[List\`1_SortSearch#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/List`1_SortSearch/vb/source.vb#1)]
36383641
36393642
]]></format>

xml/System.Collections.Generic/SortedSet`1.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,14 @@
13791379
<Docs>
13801380
<summary>Gets the maximum value in the <see cref="T:System.Collections.Generic.SortedSet`1" />, as defined by the comparer.</summary>
13811381
<value>The maximum value in the set.</value>
1382-
<remarks>To be added.</remarks>
1382+
<remarks>
1383+
<format type="text/markdown"><![CDATA[
1384+
1385+
## Remarks
1386+
If the <xref:System.Collections.Generic.SortedSet%601> has no elements, then the <xref:System.Collections.Generic.SortedSet%601.Max%2A> property returns the default value of `T`.
1387+
1388+
]]></format>
1389+
</remarks>
13831390
</Docs>
13841391
</Member>
13851392
<Member MemberName="Min">
@@ -1413,7 +1420,14 @@
14131420
<Docs>
14141421
<summary>Gets the minimum value in the <see cref="T:System.Collections.Generic.SortedSet`1" />, as defined by the comparer.</summary>
14151422
<value>The minimum value in the set.</value>
1416-
<remarks>To be added.</remarks>
1423+
<remarks>
1424+
<format type="text/markdown"><![CDATA[
1425+
1426+
## Remarks
1427+
If the <xref:System.Collections.Generic.SortedSet%601> has no elements, then the <xref:System.Collections.Generic.SortedSet%601.Min%2A> property returns the default value of `T`.
1428+
1429+
]]></format>
1430+
</remarks>
14171431
</Docs>
14181432
</Member>
14191433
<Member MemberName="OnDeserialization">

xml/System.Diagnostics/Process.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4723,8 +4723,10 @@ There is a similar issue when you read all text from both the standard output an
47234723
]]></format>
47244724
</remarks>
47254725
<exception cref="T:System.InvalidOperationException">No file name was specified in the <see cref="T:System.Diagnostics.Process" /> component's <see cref="P:System.Diagnostics.Process.StartInfo" />.
4726-
-or-
4727-
The <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> member of the <see cref="P:System.Diagnostics.Process.StartInfo" /> property is <see langword="true" /> while <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput" />, <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" />, or <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> is <see langword="true" />.</exception>
4726+
4727+
-or-
4728+
4729+
The <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> member of the <see cref="P:System.Diagnostics.Process.StartInfo" /> property is <see langword="true" /> while <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput" />, <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" />, or <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> is <see langword="true" />.</exception>
47284730
<exception cref="T:System.ComponentModel.Win32Exception">There was an error in opening the associated file.</exception>
47294731
<exception cref="T:System.ObjectDisposedException">The process object has already been disposed.</exception>
47304732
<exception cref="T:System.PlatformNotSupportedException">Method not supported on operating systems without shell support such as Nano Server (.NET Core only).</exception>

xml/System.IO/StringReader.xml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,11 @@ This implementation of `Close` calls the <xref:System.IO.StringReader.Dispose%2A
461461
<Parameter Name="buffer" Type="System.Span&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
462462
</Parameters>
463463
<Docs>
464-
<param name="buffer">To be added.</param>
465-
<summary>To be added.</summary>
466-
<returns>To be added.</returns>
464+
<param name="buffer">When this method returns, contains the characters read from the current source. If the total number of characters read is zero, the span remains unmodified.</param>
465+
<summary>Reads all the characters from the input string, starting at the current position, and advances the current position to the end of the input string.</summary>
466+
<returns>The total number of characters read into the buffer.</returns>
467467
<remarks>To be added.</remarks>
468+
<exception cref="T:System.ObjectDisposedException">The current string reader instance is closed.</exception>
468469
</Docs>
469470
</Member>
470471
<Member MemberName="Read">
@@ -577,10 +578,10 @@ This implementation of `Close` calls the <xref:System.IO.StringReader.Dispose%2A
577578
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
578579
</Parameters>
579580
<Docs>
580-
<param name="buffer">To be added.</param>
581-
<param name="cancellationToken">To be added.</param>
582-
<summary>To be added.</summary>
583-
<returns>To be added.</returns>
581+
<param name="buffer">When this method returns, contains the characters read from the current source.</param>
582+
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
583+
<summary>Asynchronously reads all the characters from the input string, starting at the current position, and advances the current position to the end of the input string.</summary>
584+
<returns>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of characters read into the buffer.</returns>
584585
<remarks>To be added.</remarks>
585586
</Docs>
586587
</Member>
@@ -686,10 +687,19 @@ This implementation of `Close` calls the <xref:System.IO.StringReader.Dispose%2A
686687
<Parameter Name="buffer" Type="System.Span&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
687688
</Parameters>
688689
<Docs>
689-
<param name="buffer">To be added.</param>
690-
<summary>To be added.</summary>
691-
<returns>To be added.</returns>
692-
<remarks>To be added.</remarks>
690+
<param name="buffer">When this method returns, contains the characters read from the current source. If the total number of characters read is zero, the span remains unmodified.</param>
691+
<summary>Reads all the characters from the input string starting at the current position and advances the current position to the end of the input string.</summary>
692+
<returns>The total number of characters read into the buffer.</returns>
693+
<remarks>
694+
<format type="text/markdown"><![CDATA[
695+
696+
## Remarks
697+
698+
<xref:System.IO.StringReader.ReadBlock(System.Span{System.Char})> internally calls <xref:System.IO.StringReader.Read(System.Span{System.Char})> directly.
699+
700+
]]></format>
701+
</remarks>
702+
<exception cref="T:System.ObjectDisposedException">The current string reader instance is closed.</exception>
693703
</Docs>
694704
</Member>
695705
<Member MemberName="ReadBlockAsync">
@@ -720,11 +730,20 @@ This implementation of `Close` calls the <xref:System.IO.StringReader.Dispose%2A
720730
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
721731
</Parameters>
722732
<Docs>
723-
<param name="buffer">To be added.</param>
724-
<param name="cancellationToken">To be added.</param>
725-
<summary>To be added.</summary>
726-
<returns>To be added.</returns>
727-
<remarks>To be added.</remarks>
733+
<param name="buffer">When this method returns, contains the characters read from the current source. If the total number of characters read is zero, the span remains unmodified.</param>
734+
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
735+
<summary>Asynchronously reads all the characters from the input string starting at the current position and advances the current position to the end of the input string.</summary>
736+
<returns>A task representing the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of characters read into the buffer.</returns>
737+
<remarks>
738+
<format type="text/markdown">
739+
<![CDATA[
740+
741+
## Remarks
742+
743+
<xref:System.IO.StringReader.ReadBlockAsync(System.Memory{System.Char},System.Threading.CancellationToken)> calls <xref:System.IO.StringReader.ReadBlock(System.Span{System.Char})> asynchronously, which in turn calls <xref:System.IO.StringReader.Read(System.Span{System.Char})> directly.
744+
745+
]]></format>
746+
</remarks>
728747
</Docs>
729748
</Member>
730749
<Member MemberName="ReadBlockAsync">

xml/System.Linq/ParallelEnumerable.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10268,14 +10268,14 @@
1026810268
<Docs>
1026910269
<typeparam name="TSource">The type of elements of <paramref name="source" />.</typeparam>
1027010270
<param name="source">A ParallelQuery on which to set the limit on the degrees of parallelism.</param>
10271-
<param name="degreeOfParallelism">The degree of parallelism for the query. The default value is Math.Min(<see cref="P:System.Environment.ProcessorCount" />, <see langword="MAX_SUPPORTED_DOP" />) where <see langword="MAX_SUPPORTED_DOP" /> is 512.</param>
10271+
<param name="degreeOfParallelism">The degree of parallelism for the query.</param>
1027210272
<summary>Sets the degree of parallelism to use in a query. Degree of parallelism is the maximum number of concurrently executing tasks that will be used to process the query.</summary>
1027310273
<returns>ParallelQuery representing the same query as source, with the limit on the degrees of parallelism set.</returns>
1027410274
<remarks>To be added.</remarks>
1027510275
<exception cref="T:System.ArgumentNullException">
1027610276
<paramref name="source" /> is a null reference (Nothing in Visual Basic).</exception>
1027710277
<exception cref="T:System.ArgumentOutOfRangeException">
10278-
<paramref name="degreeOfParallelism" /> is less than 1 or greater than 511.</exception>
10278+
<paramref name="degreeOfParallelism" /> is less than 1 or greater than 512.</exception>
1027910279
<exception cref="T:System.InvalidOperationException">WithDegreeOfParallelism is used multiple times in the query.</exception>
1028010280
<related type="Article" href="~/docs/standard/parallel-programming/parallel-linq-plinq.md">Parallel LINQ (PLINQ)</related>
1028110281
</Docs>

xml/System/Array.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@
9292

9393

9494
## Examples
95+
96+
[!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)]
97+
9598
The following code example shows how <xref:System.Array.Copy%2A?displayProperty=nameWithType> copies elements between an array of type integer and an array of type <xref:System.Object>.
9699

97100
[!code-cpp[Classic Array Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array Example/CPP/source.cpp#1)]
@@ -101,7 +104,7 @@
101104
The following code example creates and initializes an <xref:System.Array> and displays its properties and its elements.
102105

103106
[!code-cpp[Classic Array Example#2](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array Example/CPP/source3.cpp#2)]
104-
[!code-csharp[Classic Array Example#2](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs#2)]
107+
[!code-csharp-interactive[Classic Array Example#2](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source3.cs#2)]
105108
[!code-vb[Classic Array Example#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array Example/VB/source3.vb#2)]
106109

107110
]]></format>

xml/System/Object.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,22 +762,25 @@ and the <xref:System.IDisposable> interface. The <xref:System.IDisposable.Dispos
762762
763763
For two objects `x` and `y` that have identical runtime types, `Object.ReferenceEquals(x.GetType(),y.GetType())` returns `true`. The following example uses the <xref:System.Object.GetType%2A> method with the <xref:System.Object.ReferenceEquals%2A> method to determine whether one numeric value is the same type as two other numeric values.
764764
765-
[!code-csharp[System.Object.GetType#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/gettype1.cs#1)]
765+
[!code-csharp-interactive[System.Object.GetType#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/gettype1.cs#1)]
766766
[!code-vb[System.Object.GetType#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.object.gettype/vb/gettype1.vb#1)]
767767
768768
> [!NOTE]
769769
> To determine whether an object is a specific type, you can use your language's type comparison keyword or construct. For example, you can use the `TypeOf…Is` construct in Visual Basic or the `is` keyword in C#.
770770
771771
The <xref:System.Object.GetType%2A> method is inherited by all types that derive from <xref:System.Object>. This means that, in addition to using your own language's comparison keyword, you can use the <xref:System.Object.GetType%2A> method to determine the type of a particular object, as the following example shows.
772772
773-
[!code-csharp[System.Object.GetType#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/GetTypeEx2.cs#2)]
773+
[!code-csharp-interactive[System.Object.GetType#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.object.gettype/cs/GetTypeEx2.cs#2)]
774774
[!code-vb[System.Object.GetType#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.object.gettype/vb/GetTypeEx2.vb#2)]
775775
776776
The <xref:System.Type> object exposes the metadata associated with the class of the current <xref:System.Object>.
777777
778778
779779
780780
## Examples
781+
782+
[!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)]
783+
781784
The following code example demonstrates that <xref:System.Object.GetType%2A> returns the runtime type of the current instance.
782785
783786
[!code-cpp[ECMA-System.Object.GetType#1](~/samples/snippets/cpp/VS_Snippets_CLR/ECMA-System.Object.GetType/CPP/gettype.cpp#1)]

0 commit comments

Comments
 (0)