Skip to content

Commit e449296

Browse files
committed
Misc cleanup.
1 parent 2174f9e commit e449296

6 files changed

Lines changed: 8 additions & 7 deletions

File tree

PSql.Engine/SqlConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ protected SqlCommand SetUpCommand(
169169
/// </summary>
170170
protected void AutoOpen(CancellationToken cancellation)
171171
{
172-
if (Connection.State == ConnectionState.Closed)
172+
if (Connection.State is ConnectionState.Closed)
173173
Connection.OpenAsync(cancellation).GetAwaiter().GetResult();
174174
}
175175

PSql/Data/SqlConnection.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ internal SqlConnection(string connectionString, NetworkCredential? credential, I
2626
/// </summary>
2727
internal E.SqlConnection InnerConnection => _connection;
2828

29-
/// <inheritdoc cref="E.SqlConnection.Dispose"/>
29+
/// <summary>
30+
/// Closes the connection and frees resources owned by it.
31+
/// </summary>
3032
public void Dispose()
3133
{
3234
_connection.Dispose();

PSql/Data/SqlContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace PSql;
1616
public class SqlContext : ICloneable
1717
{
1818
// Connection string defaults are here:
19-
// https://github.com/dotnet/SqlClient/blob/v2.1.1/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/Common/DbConnectionStringCommon.cs#L690-L731
19+
// https://github.com/dotnet/SqlClient/blob/v6.1.3/src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionStringDefaults.cs
2020

2121
protected const string
2222
LocalServerName = ".",

PSql/Utilities/CmdletSqlMessageLogger.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Copyright Subatomix Research Inc.
22
// SPDX-License-Identifier: MIT
33

4+
using PSql.Commands;
5+
46
namespace PSql;
57

6-
using PSql.Commands;
78
using static E.SqlMessageConstants;
89

910
internal class CmdletSqlMessageLogger : E.ISqlMessageLogger

PSql/Utilities/PSCredentialExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright Subatomix Research Inc.
22
// SPDX-License-Identifier: MIT
33

4-
using System.Diagnostics.CodeAnalysis;
5-
64
namespace PSql;
75

86
internal static class PSCredentialExtensions

PSql/Utilities/SqlConnectionStringBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace PSql;
1212
/// A simple, append-only connection string builder that supportes multiple
1313
/// SqlClient versions.
1414
/// </summary>
15-
public readonly ref struct SqlConnectionStringBuilder
15+
internal readonly ref struct SqlConnectionStringBuilder
1616
{
1717
private readonly StringBuilder _builder;
1818

0 commit comments

Comments
 (0)