Skip to content

Commit a894493

Browse files
committed
Update Batch documentation with InheritDoc and Resolved Paths
Re-generate NuGet API Documentation with InheritDoc Changes for cref References
1 parent 040df88 commit a894493

File tree

3 files changed

+27
-79
lines changed

3 files changed

+27
-79
lines changed

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

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
5252
</format>
5353
</remarks>
5454
</ctor2>
55-
<Timeout>
56-
<inheritdoc cref="P:System.Data.Common.DbBatch.Timeout"/>
57-
</Timeout>
5855
<Connection>
5956
<summary>
6057
Gets or sets the
@@ -94,39 +91,6 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
9491
</format>
9592
</remarks>
9693
</BatchCommands>
97-
<DbBatchCommands>
98-
<inheritdoc cref="P:Microsoft.Data.SqlClient.SqlBatch.DbBatchCommands"/>
99-
</DbBatchCommands>
100-
<DbConnection>
101-
<inheritdoc cref="P:Microsoft.Data.SqlClient.SqlBatch.DbConnection"/>
102-
</DbConnection>
103-
<DbTransaction>
104-
<inheritdoc cref="P:Microsoft.Data.SqlClient.SqlBatch.DbTransaction"/>
105-
</DbTransaction>
106-
<Cancel>
107-
<inheritdoc cref="P:Microsoft.Data.SqlClient.SqlBatch.Cancel"/>
108-
</Cancel>
109-
<ExecuteNonQuery>
110-
<inheritdoc cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQuery"/>
111-
</ExecuteNonQuery>
112-
<ExecuteNonQueryAsync>
113-
<inheritdoc cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteNonQueryAsync"/>
114-
</ExecuteNonQueryAsync>
115-
<ExecuteScalar>
116-
<inheritdoc cref="M:Microsoft.Data.SqlClient.SqlBatch.ExecuteScalar"/>
117-
</ExecuteScalar>
118-
<ExecuteScalarAsync>
119-
<inheritdoc cref="M:System.Data.Common.DbBatch.ExecuteScalarAsync"/>
120-
</ExecuteScalarAsync>
121-
<Prepare>
122-
<inheritdoc cref="M:System.Data.Common.DbBatch.Prepare"/>
123-
</Prepare>
124-
<PrepareAsync>
125-
<inheritdoc cref="M:System.Data.Common.DbBatch.PrepareAsync"/>
126-
</PrepareAsync>
127-
<ExecuteDbDataReader>
128-
<inheritdoc cref="M:System.Data.Common.DbBatch.ExecuteDbDataReader"/>
129-
</ExecuteDbDataReader>
13094
<Commands>
13195
<summary>
13296
The list of commands contained in the batch in a
@@ -177,8 +141,5 @@ The following example creates a <xref:Microsoft.Data.SqlClient.SqlConnection> an
177141
</format>
178142
</remarks>
179143
</ExecuteReaderAsync>
180-
<CreateDbBatchCommand>
181-
<inheritdoc/>
182-
</CreateDbBatchCommand>
183144
</members>
184145
</docs>

src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,46 @@ public class SqlBatch : System.Data.Common.DbBatch
1111
public SqlBatch() { throw null; }
1212
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ctor2/*'/>
1313
public SqlBatch(Microsoft.Data.SqlClient.SqlConnection connection, Microsoft.Data.SqlClient.SqlTransaction transaction = null) { throw null; }
14-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Timeout/*'/>
14+
/// <inheritdoc cref="System.Data.Common.DbBatch.Timeout"/>
1515
public override int Timeout { get => throw null; set { } }
1616
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Connection/*'/>
1717
public new Microsoft.Data.SqlClient.SqlConnection Connection { get => throw null; set { } }
1818
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Transaction/*'/>
1919
public new Microsoft.Data.SqlClient.SqlTransaction Transaction { get => throw null; set { } }
2020
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/BatchCommands/*'/>
2121
public new SqlBatchCommandCollection BatchCommands { get => throw null; }
22-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/DbBatchCommands/*'/>
22+
/// <inheritdoc cref="System.Data.Common.DbBatch.DbBatchCommands"/>
2323
protected override System.Data.Common.DbBatchCommandCollection DbBatchCommands { get => throw null; }
24-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/DbConnection/*'/>
24+
/// <inheritdoc cref="System.Data.Common.DbBatch.DbConnection"/>
2525
protected override System.Data.Common.DbConnection DbConnection { get => throw null; set { } }
26-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/DbTransaction/*'/>
27-
protected override System.Data.Common.DbTransaction DbTransaction { get => throw null; set { } }
28-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Cancel/*'/>
26+
/// <inheritdoc cref="System.Data.Common.DbBatch.DbTransaction"/>
27+
protected override System.Data.Common.DbTransaction DbTransaction { get => throw null; set { } }
28+
/// <inheritdoc cref="System.Data.Common.DbBatch.Cancel"/>
2929
public override void Cancel() => throw null;
30-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteNonQuery/*'/>
30+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteNonQuery"/>
3131
public override int ExecuteNonQuery() => throw null;
32-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteNonQueryAsync/*'/>
32+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteNonQueryAsync(System.Threading.CancellationToken)"/>
3333
public override System.Threading.Tasks.Task<int> ExecuteNonQueryAsync(System.Threading.CancellationToken cancellationToken = default) => throw null;
34-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteScalar/*'/>
34+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteScalar"/>
3535
public override object ExecuteScalar() => throw null;
36-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteScalarAsync/*'/>
36+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteScalarAsync(System.Threading.CancellationToken)"/>
3737
public override System.Threading.Tasks.Task<object> ExecuteScalarAsync(System.Threading.CancellationToken cancellationToken = default) => throw null;
38-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Prepare/*'/>
38+
/// <inheritdoc cref="System.Data.Common.DbBatch.Prepare"/>
3939
public override void Prepare() => throw null;
40-
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/PrepareAsync/*'/>
40+
/// <inheritdoc cref="System.Data.Common.DbBatch.PrepareAsync(System.Threading.CancellationToken)"/>
4141
public override System.Threading.Tasks.Task PrepareAsync(System.Threading.CancellationToken cancellationToken = default) => throw null;
42-
43-
4442
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteDbDataReader(System.Data.CommandBehavior)"/>
4543
protected override System.Data.Common.DbDataReader ExecuteDbDataReader(System.Data.CommandBehavior behavior) => throw null;
46-
4744
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteDbDataReaderAsync(System.Data.CommandBehavior, System.Threading.CancellationToken)"/>
4845
protected override System.Threading.Tasks.Task<System.Data.Common.DbDataReader> ExecuteDbDataReaderAsync(System.Data.CommandBehavior behavior, System.Threading.CancellationToken cancellationToken) => throw null;
49-
50-
5146
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Commands/*'/>
5247
public System.Collections.Generic.List<Microsoft.Data.SqlClient.SqlBatchCommand> Commands { get { throw null; } }
5348
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteReader/*'/>
54-
public Microsoft.Data.SqlClient.SqlDataReader ExecuteReader() => throw null;
49+
public Microsoft.Data.SqlClient.SqlDataReader ExecuteReader() => throw null;
5550
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteReaderAsync/*'/>
5651
public Microsoft.Data.SqlClient.SqlDataReader ExecuteReaderAsync() => throw null;
57-
58-
/// <inheritdoc/>
52+
/// <inheritdoc cref="System.Data.Common.DbBatch.CreateDbBatchCommand"/>
5953
protected override System.Data.Common.DbBatchCommand CreateDbBatchCommand() => throw null;
60-
6154
}
6255
/// <include file='../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatchCommand.xml' path='docs/members[@name="SqlBatchCommand"]/SqlBatchCommand/*'/>
6356
public partial class SqlBatchCommand : System.Data.Common.DbBatchCommand

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlBatch.cs

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#if NET6_0_OR_GREATER
66

7-
87
using System.Collections.Generic;
98
using System.Data;
109
using System.Data.Common;
@@ -33,7 +32,7 @@ public SqlBatch(SqlConnection connection = null, SqlTransaction transaction = nu
3332
Connection = connection;
3433
Transaction = transaction;
3534
}
36-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Timeout/*'/>
35+
/// <inheritdoc cref="System.Data.Common.DbBatch.Timeout"/>
3736
public override int Timeout
3837
{
3938
get
@@ -47,11 +46,11 @@ public override int Timeout
4746
_batchCommand.CommandTimeout = value;
4847
}
4948
}
50-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/DbBatchCommands/*'/>
49+
/// <inheritdoc cref="System.Data.Common.DbBatch.DbBatchCommands"/>
5150
protected override DbBatchCommandCollection DbBatchCommands => BatchCommands;
5251
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/BatchCommands/*'/>
5352
public new SqlBatchCommandCollection BatchCommands => _providerCommands != null ? _providerCommands : _providerCommands = new SqlBatchCommandCollection(Commands); // Commands call will check disposed
54-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/DbConnection/*'/>
53+
/// <inheritdoc cref="System.Data.Common.DbBatch.DbConnection"/>
5554
protected override DbConnection DbConnection
5655
{
5756
get
@@ -65,7 +64,7 @@ protected override DbConnection DbConnection
6564
Connection = (SqlConnection)value;
6665
}
6766
}
68-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/DbTransaction/*'/>
67+
/// <inheritdoc cref="System.Data.Common.DbBatch.DbTransaction"/>
6968
protected override DbTransaction DbTransaction
7069
{
7170
get
@@ -79,46 +78,46 @@ protected override DbTransaction DbTransaction
7978
Transaction = (SqlTransaction)value;
8079
}
8180
}
82-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Cancel/*'/>
81+
/// <inheritdoc cref="System.Data.Common.DbBatch.Cancel"/>
8382
public override void Cancel()
8483
{
8584
CheckDisposed();
8685
_batchCommand.Cancel();
8786
}
88-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteNonQuery/*'/>
87+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteNonQuery"/>
8988
public override int ExecuteNonQuery()
9089
{
9190
CheckDisposed();
9291
SetupBatchCommandExecute();
9392
return _batchCommand.ExecuteNonQuery();
9493
}
95-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteNonQueryAsync/*'/>
94+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteNonQueryAsync(System.Threading.CancellationToken)"/>
9695
public override Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken = default)
9796
{
9897
CheckDisposed();
9998
SetupBatchCommandExecute();
10099
return _batchCommand.ExecuteNonQueryAsync(cancellationToken);
101100
}
102-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteScalar/*'/>
101+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteScalar"/>
103102
public override object ExecuteScalar()
104103
{
105104
CheckDisposed();
106105
SetupBatchCommandExecute();
107106
return _batchCommand.ExecuteScalar();
108107
}
109-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/ExecuteScalarAsync/*'/>
108+
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteScalarAsync(System.Threading.CancellationToken)"/>
110109
public override Task<object> ExecuteScalarAsync(CancellationToken cancellationToken = default)
111110
{
112111
CheckDisposed();
113112
SetupBatchCommandExecute();
114113
return _batchCommand.ExecuteScalarBatchAsync(cancellationToken);
115114
}
116-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/Prepare/*'/>
115+
/// <inheritdoc cref="System.Data.Common.DbBatch.Prepare"/>
117116
public override void Prepare()
118117
{
119118
CheckDisposed();
120119
}
121-
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlBatch.xml' path='docs/members[@name="SqlBatch"]/PrepareAsync/*'/>
120+
/// <inheritdoc cref="System.Data.Common.DbBatch.PrepareAsync(System.Threading.CancellationToken)"/>
122121
public override Task PrepareAsync(CancellationToken cancellationToken = default)
123122
{
124123
CheckDisposed();
@@ -183,9 +182,7 @@ public SqlDataReader ExecuteReader()
183182
CheckDisposed();
184183
SetupBatchCommandExecute();
185184
return _batchCommand.ExecuteReaderAsync(cancellationToken);
186-
}
187-
188-
185+
}
189186
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteDbDataReader(System.Data.CommandBehavior)"/>
190187
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior) => ExecuteReader();
191188
/// <inheritdoc cref="System.Data.Common.DbBatch.ExecuteDbDataReaderAsync(System.Data.CommandBehavior, System.Threading.CancellationToken)"/>
@@ -207,21 +204,18 @@ protected override Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior b
207204
TaskScheduler.Default
208205
);
209206
}
210-
211-
/// <inheritdoc />
207+
/// <inheritdoc cref="System.Data.Common.DbBatch.CreateDbBatchCommand"/>
212208
protected override DbBatchCommand CreateDbBatchCommand()
213209
{
214210
return new SqlBatchCommand();
215211
}
216-
217212
private void CheckDisposed()
218213
{
219214
if (_batchCommand is null)
220215
{
221216
throw ADP.ObjectDisposed(this);
222217
}
223218
}
224-
225219
private void SetupBatchCommandExecute()
226220
{
227221
SqlConnection connection = Connection;

0 commit comments

Comments
 (0)