Skip to content

Commit

Permalink
Test Possible Corrections on "Cross Reference Not Found" for System.C…
Browse files Browse the repository at this point in the history
…ollection and "Found no member can be inherited by key"
  • Loading branch information
H-Yeo committed Feb 1, 2024
1 parent 0afee4c commit 0a56b25
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
43 changes: 24 additions & 19 deletions doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,17 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
</format>
</remarks>
</ctor2>
<BatchCommands>
<summary>The list of commands contained in the batch in a <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommandCollection" />.
</summary>
<remarks>
<format type="text/markdown">
<![CDATA[
## Examples
The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlBatch>, then adds multiple <xref:Microsoft.Data.SqlClient.SqlBatchCommand> objects to the batch. It then executes the batch, creating a <xref:Microsoft.Data.SqlClient.SqlDataReader>. The example reads through the results of the batch commands, writing them to the console. Finally, the example closes the <xref:Microsoft.Data.SqlClient.SqlDataReader> and then the <xref:Microsoft.Data.SqlClient.SqlConnection> as the `using` blocks fall out of scope.
[!code-csharp[SqlCommand Example#1](~/../sqlclient/doc/samples/SqlBatch_ExecuteReader.cs#1)]
]]>
</format>
</remarks>
</BatchCommands>
<timeout>
<inheritdoc cref="P:System.Common.DbBatch.Timeout" />
</timeout>
<Commands>
<summary>
The list of commands contained in the batch in a <see cref="T:System.Collection.Generic.List&lt;Microsoft.Data.SqlClient.SqlBatchCommand&gt;" />.
The list of commands contained in the batch in a
<see cref="T:System.Collection.Generic.List"/> of
<see cref="T:Microsoft.Data.SqlClient.SqlBatchCommand"/> objects.
</summary>
<remarks>
<format type="text/markdown">
<![CDATA[
]]>
</format>
<format type="text/markdown"></format>
</remarks>
</Commands>
<Connection>
Expand All @@ -101,6 +89,22 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
</format>
</remarks>
</Transaction>
<BatchCommands>
<summary>
The list of commands contained in the batch in a <see cref="T:Microsoft.Data.SqlClient.SqlBatchCommandCollection" />.
</summary>
<remarks>
<format type="text/markdown">
<![CDATA[
## Examples
The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> and a <xref:Microsoft.Data.SqlClient.SqlBatch>, then adds multiple <xref:Microsoft.Data.SqlClient.SqlBatchCommand> objects to the batch. It then executes the batch, creating a <xref:Microsoft.Data.SqlClient.SqlDataReader>. The example reads through the results of the batch commands, writing them to the console. Finally, the example closes the <xref:Microsoft.Data.SqlClient.SqlDataReader> and then the <xref:Microsoft.Data.SqlClient.SqlConnection> as the `using` blocks fall out of scope.
[!code-csharp[SqlCommand Example#1](~/../sqlclient/doc/samples/SqlBatch_ExecuteReader.cs#1)]
]]>
</format>
</remarks>
</BatchCommands>

<ExecuteReader>
<summary>
Sends the
Expand All @@ -122,6 +126,7 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
</format>
</remarks>
</ExecuteReader>

<ExecuteReaderAsync>
<summary>
An asynchronous version of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class SqlBatch : System.Data.Common.DbBatch
public SqlBatch() { throw null; }
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ctor2/*'/>
public SqlBatch(Microsoft.Data.SqlClient.SqlConnection connection, Microsoft.Data.SqlClient.SqlTransaction transaction = null) { throw null; }
/// <inheritdoc />
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/timeout/*'/>
public override int Timeout { get => throw null; set { } }
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Timeout/*'/>
public new Microsoft.Data.SqlClient.SqlConnection Connection { get => throw null; set { } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public SqlBatch(SqlConnection connection = null, SqlTransaction transaction = nu
Connection = connection;
Transaction = transaction;
}
/// <inheritdoc />
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/timeout/*'/>
public override int Timeout
{
get
Expand Down

0 comments on commit 0a56b25

Please sign in to comment.