Skip to content

Commit b799f10

Browse files
committed
Fix property ordering. Inherit doc comments.
1 parent aac03ad commit b799f10

File tree

2 files changed

+52
-22
lines changed

2 files changed

+52
-22
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/ChannelDbConnectionPool.cs

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,70 +19,100 @@ namespace Microsoft.Data.SqlClient.ConnectionPool
1919
/// </summary>
2020
internal sealed class ChannelDbConnectionPool : IDbConnectionPool
2121
{
22-
public int Id => throw new NotImplementedException();
22+
#region Properties
23+
/// <inheritdoc />
24+
public ConcurrentDictionary<DbConnectionPoolAuthenticationContextKey, DbConnectionPoolAuthenticationContext> AuthenticationContexts => throw new NotImplementedException();
2325

24-
public DbConnectionPoolState State { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
26+
/// <inheritdoc />
27+
public DbConnectionFactory ConnectionFactory => throw new NotImplementedException();
2528

29+
/// <inheritdoc />
2630
public int Count => throw new NotImplementedException();
2731

28-
public DbConnectionFactory ConnectionFactory => throw new NotImplementedException();
29-
32+
/// <inheritdoc />
3033
public bool ErrorOccurred => throw new NotImplementedException();
3134

32-
public TimeSpan LoadBalanceTimeout => throw new NotImplementedException();
35+
/// <inheritdoc />
36+
public int Id => throw new NotImplementedException();
3337

38+
/// <inheritdoc />
3439
public DbConnectionPoolIdentity Identity => throw new NotImplementedException();
3540

41+
/// <inheritdoc />
3642
public bool IsRunning => throw new NotImplementedException();
3743

44+
/// <inheritdoc />
45+
public TimeSpan LoadBalanceTimeout => throw new NotImplementedException();
46+
47+
/// <inheritdoc />
3848
public DbConnectionPoolGroup PoolGroup => throw new NotImplementedException();
3949

50+
/// <inheritdoc />
4051
public DbConnectionPoolGroupOptions PoolGroupOptions => throw new NotImplementedException();
4152

53+
/// <inheritdoc />
4254
public DbConnectionPoolProviderInfo ProviderInfo => throw new NotImplementedException();
4355

44-
public ConcurrentDictionary<DbConnectionPoolAuthenticationContextKey, DbConnectionPoolAuthenticationContext> AuthenticationContexts => throw new NotImplementedException();
56+
/// <inheritdoc />
57+
public DbConnectionPoolState State {
58+
get => throw new NotImplementedException();
59+
set => throw new NotImplementedException();
60+
}
4561

62+
/// <inheritdoc />
4663
public bool UseLoadBalancing => throw new NotImplementedException();
64+
#endregion
65+
66+
4767

68+
#region Methods
69+
/// <inheritdoc />
4870
public void Clear()
4971
{
5072
throw new NotImplementedException();
5173
}
5274

75+
/// <inheritdoc />
5376
public void PutObjectFromTransactedPool(DbConnectionInternal obj)
5477
{
5578
throw new NotImplementedException();
5679
}
5780

81+
/// <inheritdoc />
5882
public DbConnectionInternal ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
5983
{
6084
throw new NotImplementedException();
6185
}
6286

87+
/// <inheritdoc />
6388
public void ReturnInternalConnection(DbConnectionInternal obj, object owningObject)
6489
{
6590
throw new NotImplementedException();
6691
}
6792

93+
/// <inheritdoc />
6894
public void Shutdown()
6995
{
7096
throw new NotImplementedException();
7197
}
7298

99+
/// <inheritdoc />
73100
public void Startup()
74101
{
75102
throw new NotImplementedException();
76103
}
77104

105+
/// <inheritdoc />
78106
public void TransactionEnded(Transaction transaction, DbConnectionInternal transactedObject)
79107
{
80108
throw new NotImplementedException();
81109
}
82110

111+
/// <inheritdoc />
83112
public bool TryGetConnection(DbConnection owningObject, TaskCompletionSource<DbConnectionInternal> taskCompletionSource, DbConnectionOptions userOptions, out DbConnectionInternal connection)
84113
{
85114
throw new NotImplementedException();
86115
}
116+
#endregion
87117
}
88118
}

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/IDbConnectionPool.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,37 +21,31 @@ internal interface IDbConnectionPool
2121
{
2222
#region Properties
2323
/// <summary>
24-
/// An id that uniqely identifies this connection pool.
24+
/// Gets the authentication contexts cached by the pool.
2525
/// </summary>
26-
int Id { get; }
26+
ConcurrentDictionary<DbConnectionPoolAuthenticationContextKey, DbConnectionPoolAuthenticationContext> AuthenticationContexts { get; }
2727

2828
/// <summary>
29-
/// The current state of the connection pool.
29+
/// Gets the factory used to create database connections.
3030
/// </summary>
31-
DbConnectionPoolState State { get; set; }
31+
DbConnectionFactory ConnectionFactory { get; }
3232

3333
/// <summary>
3434
/// The number of connections currently managed by the pool.
3535
/// May be larger than the number of connections currently sitting idle in the pool.
3636
/// </summary>
3737
int Count { get; }
3838

39-
/// <summary>
40-
/// Gets the factory used to create database connections.
41-
/// </summary>
42-
DbConnectionFactory ConnectionFactory { get; }
43-
4439
/// <summary>
4540
/// Indicates whether an error has occurred in the pool.
4641
/// Primarily used to support the pool blocking period feature.
4742
/// </summary>
4843
bool ErrorOccurred { get; }
4944

5045
/// <summary>
51-
/// Gets the duration of time to wait before reassigning a connection to a different server in a load-balanced
52-
/// environment.
46+
/// An id that uniqely identifies this connection pool.
5347
/// </summary>
54-
TimeSpan LoadBalanceTimeout { get; }
48+
int Id { get; }
5549

5650
/// <summary>
5751
/// Gets the identity used by the connection pool when establishing connections.
@@ -63,6 +57,12 @@ internal interface IDbConnectionPool
6357
/// </summary>
6458
bool IsRunning { get; }
6559

60+
/// <summary>
61+
/// Gets the duration of time to wait before reassigning a connection to a different server in a load-balanced
62+
/// environment.
63+
/// </summary>
64+
TimeSpan LoadBalanceTimeout { get; }
65+
6666
/// <summary>
6767
/// Gets a reference to the connection pool group that this pool belongs to.
6868
/// </summary>
@@ -79,9 +79,9 @@ internal interface IDbConnectionPool
7979
DbConnectionPoolProviderInfo ProviderInfo { get; }
8080

8181
/// <summary>
82-
/// Gets the authentication contexts cached by the pool.
82+
/// The current state of the connection pool.
8383
/// </summary>
84-
ConcurrentDictionary<DbConnectionPoolAuthenticationContextKey, DbConnectionPoolAuthenticationContext> AuthenticationContexts { get; }
84+
DbConnectionPoolState State { get; set; }
8585

8686
/// <summary>
8787
/// Indicates whether the connection pool is using load balancing.
@@ -103,7 +103,7 @@ internal interface IDbConnectionPool
103103
/// The internal connection will be set on completion source rather than passed out via the out parameter.</param>
104104
/// <param name="userOptions">The user options to use if a new connection must be opened.</param>
105105
/// <param name="connection">The retrieved connection will be passed out via this parameter.</param>
106-
/// <returns>Returns true if a connection was set in the out parameter, otherwise returns false.</returns>
106+
/// <returns>True if a connection was set in the out parameter, otherwise returns false.</returns>
107107
bool TryGetConnection(DbConnection owningObject, TaskCompletionSource<DbConnectionInternal> taskCompletionSource, DbConnectionOptions userOptions, out DbConnectionInternal connection);
108108

109109
/// <summary>
@@ -112,7 +112,7 @@ internal interface IDbConnectionPool
112112
/// <param name="owningObject">The connection whos internal connection should be replaced.</param>
113113
/// <param name="userOptions">The user options to use if a new connection must be opened.</param>
114114
/// <param name="oldConnection">The internal connection currently associated with the owning object.</param>
115-
/// <returns></returns>
115+
/// <returns>A reference to the new DbConnectionInternal.</returns>
116116
DbConnectionInternal ReplaceConnection(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection);
117117

118118
/// <summary>

0 commit comments

Comments
 (0)