Skip to content

Commit e472d4d

Browse files
Trim XML documentation for reference project + fix Note tags (#3233)
1 parent 7f30536 commit e472d4d

36 files changed

+2096
-9230
lines changed

doc/snippets/Microsoft.Data.Sql/SqlDataSourceEnumerator.xml

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,47 +18,25 @@
1818
<returns>
1919
A <see cref="T:System.Data.DataTable" /> containing information about the visible SQL Server instances.
2020
</returns>
21-
<remarks>
22-
<para>
23-
The table returned by this method contains the following columns, all of which contain strings:
24-
</para>
25-
<para>
26-
<list type="table">
27-
<listheader>
28-
<term>Column</term>
29-
<description>Description</description>
30-
</listheader>
31-
<item>
32-
<term><b>ServerName</b></term>
33-
<description>Name of the server.</description>
34-
</item>
35-
<item>
36-
<term><b>InstanceName</b></term>
37-
<description>Name of the server instance. Blank if the server is running as the default instance.</description>
38-
</item>
39-
<item>
40-
<term><b>IsClustered</b></term>
41-
<description>Indicates whether the server is part of a cluster.</description>
42-
</item>
43-
<item>
44-
<term><b>Version</b></term>
45-
<description>
46-
Version of the server:
47-
<list type="bullet">
48-
<item>10.0.xx for SQL Server 2008</item>
49-
<item>10.50.x for SQL Server 2008 R2</item>
50-
<item>11.0.xx for SQL Server 2012 </item>
51-
<item>12.0.xx for SQL Server 2014</item>
52-
<item>13.0.xx for SQL Server 2016</item>
53-
<item>14.0.xx for SQL Server 2017</item>
54-
</list>
55-
</description>
56-
</item>
57-
</list>
58-
<note type="note">
59-
Due to the nature of the mechanism used by <see cref="T:Microsoft.Data.Sql.SqlDataSourceEnumerator" /> to locate data sources on a network, the method will not always return a complete list of the available servers, and the list might not be the same on every call. If you plan to use this function to let users select a server from a list, make sure that you always also supply an option to type in a name that is not in the list, in case the server enumeration does not return all the available servers. In addition, this method may take a significant amount of time to execute, so be careful about calling it when performance is critical.
60-
</note>
61-
</para>
21+
<remarks>
22+
<format type="text/markdown">
23+
<![CDATA[
24+
25+
## Remarks
26+
The table returned by this method contains the following columns, all of which contain strings:
27+
28+
|Column|Description|
29+
|------------|-----------------|
30+
|**ServerName**|Name of the server.|
31+
|**InstanceName**|Name of the server instance. Blank if the server is running as the default instance.|
32+
|**IsClustered**|Indicates whether the server is part of a cluster.|
33+
|**Version**|Version of the server:<ul><li>10.0.xx for SQL Server 2008</li><li>10.50.x for SQL Server 2008 R2</li><li>11.0.xx for SQL Server 2012</li><li>12.0.xx for SQL Server 2014</li><li>13.0.xx for SQL Server 2016</li><li>14.0.xx for SQL Server 2017</li></ul>|
34+
35+
> [!NOTE]
36+
> Due to the nature of the mechanism used by <xref:Microsoft.Data.Sql.SqlDataSourceEnumerator> to locate data sources on a network, the method will not always return a complete list of the available servers, and the list might not be the same on every call. If you plan to use this function to let users select a server from a list, make sure that you always also supply an option to type in a name that is not in the list, in case the server enumeration does not return all the available servers. In addition, this method may take a significant amount of time to execute, so be careful about calling it when performance is critical.
37+
38+
]]>
39+
</format>
6240
</remarks>
6341
<example>
6442
<para>

doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</example>
5252
</SqlBatch>
5353
<ctor1>
54-
<summary>Initializes a new <see cref="T:SqlBatch" />.</summary>
54+
<summary>Initializes a new <see cref="T:Microsoft.Data.SqlClient.SqlBatch" />.</summary>
5555
<example>
5656
<para>
5757
The following example creates a <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> and a <see cref="T:Microsoft.Data.SqlClient.SqlBatch" />, then adds multiple <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" /> objects to the batch. It then executes the batch, creating a <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" />. The example reads through the results of the batch commands, writing them to the console. Finally, the example closes the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> and then the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> as the <c>using</c> blocks fall out of scope.
@@ -103,7 +103,7 @@
103103
</example>
104104
</ctor1>
105105
<ctor2>
106-
<summary>Initializes a new <see cref="T:SqlBatch" />.</summary>
106+
<summary>Initializes a new <see cref="T:Microsoft.Data.SqlClient.SqlBatch" />.</summary>
107107
<param name="connection">
108108
A <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> that represents the connection to an instance of SQL Server.
109109
</param>
@@ -176,7 +176,7 @@
176176
</BatchCommands>
177177
<Commands>
178178
<summary>
179-
The list of commands contained in the batch in a <see cref="T:System.Collections.Generic.List{Microsoft.Data.SqlClient.SqlBatchCommand}" />.
179+
The list of <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" /> contained in the batch in a <see cref="T:System.Collections.Generic.List`1" />.
180180
</summary>
181181
</Commands>
182182
<ExecuteReader>
@@ -309,10 +309,14 @@
309309
</summary>
310310
<returns>A <see cref="T:System.Data.Common.DbDataReader" /> object.</returns>
311311
<remarks>
312-
When the batch returns multiple result sets from different commands, <see cref="P:Microsoft.Data.SqlClient.SqlDataReader.NextResult" /> can be used to advance the reader to the next result set.
313-
<note type="note">
314-
This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)" />, and all the expected exceptions of that method also apply here.
315-
</note>
312+
<format type="text/markdown">
313+
<![CDATA[
314+
When the batch returns multiple result sets from different commands, <xref:Microsoft.Data.SqlClient.SqlDataReader.NextResult> can be used to advance the reader to the next result set.
315+
316+
> [!NOTE]
317+
> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior)>, and all the expected exceptions of that method also apply here.
318+
]]>
319+
</format>
316320
</remarks>
317321
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
318322
An error occurred while executing the batch.
@@ -329,15 +333,16 @@
329333
</summary>
330334
<returns>A task representing the asynchronous operation.</returns>
331335
<remarks>
332-
<para>
333-
For more information about asynchronous programming, see <see href="https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming">Asynchronous Programming</see>.
334-
</para>
335-
<para>
336-
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.Data.Common.DbBatch.ExecuteDbDataReader(System.Data.CommandBehavior)" />.
337-
</para>
338-
<note type="note">
339-
This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Threading.CancellationToken)" />, and all the expected exceptions of that method also apply here.
340-
</note>
336+
<format type="text/markdown">
337+
<![CDATA[
338+
For more information about asynchronous programming, see [Asynchronous Programming](https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming).
339+
340+
This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <xref:System.ArgumentException>, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <xref:System.Data.Common.DbBatch.ExecuteDbDataReader(System.Data.CommandBehavior)>.
341+
342+
> [!NOTE]
343+
> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteReaderAsync(System.Threading.CancellationToken)>, and all the expected exceptions of that method also apply here.
344+
]]>
345+
</format>
341346
</remarks>
342347
<exception cref="T:System.OperationCanceledException">
343348
The cancellation token was canceled. This exception is stored into the returned task.
@@ -349,10 +354,14 @@
349354
</summary>
350355
<returns>The total number of rows affected across all the batch commands.</returns>
351356
<remarks>
352-
You can use <see cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery" /> to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to change the data in a database by executing UPDATE, INSERT, or DELETE statements. Although <see cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery" /> does not return any rows, any output parameters or return values mapped to parameters are populated with data. For UPDATE, INSERT, and DELETE statements, the return value is the total number of rows affected by the batch. If no UPDATE, INSERT, or DELETE statements are included in the batch, the return value is -1.
353-
<note type="note">
354-
This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery" />, and all the expected exceptions of that method also apply here.
355-
</note>
357+
<format type="text/markdown">
358+
<![CDATA[
359+
You can use <xref:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery> to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables), or to change the data in a database by executing UPDATE, INSERT, or DELETE statements. Although <xref:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery> does not return any rows, any output parameters or return values mapped to parameters are populated with data. For UPDATE, INSERT, and DELETE statements, the return value is the total number of rows affected by the batch. If no UPDATE, INSERT, or DELETE statements are included in the batch, the return value is -1.
360+
361+
> [!NOTE]
362+
> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery>, and all the expected exceptions of that method also apply here.
363+
]]>
364+
</format>
356365
</remarks>
357366
</ExecuteNonQuery>
358367
<ExecuteNonQueryAsync>
@@ -364,15 +373,16 @@
364373
</summary>
365374
<returns>A task representing the asynchronous operation.</returns>
366375
<remarks>
367-
<para>
368-
For more information about asynchronous programming, see <see href="https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming">Asynchronous Programming</see>.
369-
</para>
370-
<para>
371-
If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously.
372-
</para>
373-
<note type="note">
374-
This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)" />, and all the expected exceptions of that method also apply here.
375-
</note>
376+
<format type="text/markdown">
377+
<![CDATA[
378+
For more information about asynchronous programming, see [Asynchronous Programming](https://learn.microsoft.com/sql/connect/ado-net/asynchronous-programming).
379+
380+
If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <xref:System.ArgumentException>, are still thrown synchronously.
381+
382+
> [!NOTE]
383+
> This method benefits from <xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQueryAsync(System.Threading.CancellationToken)>, and all the expected exceptions of that method also apply here.
384+
]]>
385+
</format>
376386
</remarks>
377387
<exception cref="T:Microsoft.Data.SqlClient.SqlException">An error occurred while executing the batch.</exception>
378388
<related type="Article" href="https://learn.microsoft.com/sql/connect/ado-net/overview-sqlclient-driver">Overview of the SqlClient driver</related>
@@ -396,7 +406,7 @@
396406
</summary>
397407
<returns>The first column of the first row in the first result set.</returns>
398408
<remarks>
399-
This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync" />, and all the expected exceptions of that method also apply here. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously.
409+
This method benefits from <see cref="M:Microsoft.Data.SqlClient.SqlCommand.ExecuteScalarAsync(System.Threading.CancellationToken)" />, and all the expected exceptions of that method also apply here. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously.
400410
</remarks>
401411
<exception cref="T:Microsoft.Data.SqlClient.SqlException">
402412
An error occurred while executing the batch.

doc/snippets/Microsoft.Data.SqlClient/SqlBatchCommand.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</SqlBatchCommand>
88
<ctor1>
99
<summary>
10-
Initializes a new <see cref="T:SqlBatchCommand" />.
10+
Initializes a new <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" />.
1111
</summary>
1212
<example>
1313
The following example creates a <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> and a SqlBatch, then adds multiple <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" /> objects to the batch. It then executes the batch, creating a <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> . The example reads through the results of the batch commands, writing them to the console. Finally, the example closes the <see cref="T:Microsoft.Data.SqlClient.SqlDataReader" /> and then the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> as the <c>using</c> blocks fall out of scope.
@@ -62,7 +62,7 @@
6262
</ctor1>
6363
<ctor2>
6464
<summary>
65-
Initializes a new <see cref="T:SqlBatchCommand" />.
65+
Initializes a new <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" />.
6666
</summary>
6767
<param name="commandText">
6868
The text of the <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand" />.

0 commit comments

Comments
 (0)