Skip to content

Commit

Permalink
Share SqlCredential (#1038)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 authored Apr 28, 2021
1 parent 2f19bc4 commit ff821cf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlConnectionPoolProviderInfo.cs">
<Link>Microsoft\Data\SqlClient\SqlConnectionPoolProviderInfo.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlCredential.cs">
<Link>Microsoft\Data\SqlClient\SqlCredential.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs">
<Link>Microsoft\Data\SqlClient\SqlInfoMessageEventHandler.cs</Link>
</Compile>
Expand Down Expand Up @@ -530,7 +533,6 @@
<Compile Include="Microsoft\Data\SqlClient\SNI\SSRP.cs" />
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectManaged.cs" />
<Compile Include="Interop\SNINativeMethodWrapper.Common.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlCredential.cs" />
<Compile Include="Microsoft\Data\SqlClient\AlwaysEncryptedHelperClasses.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlQueryMetadataCache.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionEnclaveProvider.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,9 @@
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionString.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionStringBuilder.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionTimeoutErrorInternal.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlCredential.cs" />
<Compile Include="..\..\src\Microsoft\Data\SqlClient\SqlCredential.cs">
<Link>Microsoft\Data\SqlClient\SqlCredential.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\SqlDataAdapter.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDataReader.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlDataReaderSmi.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@

namespace Microsoft.Data.SqlClient
{
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/SqlCredential/*' />
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/SqlCredential/*' />
public sealed class SqlCredential
{
string _userId;
SecureString _password;

/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/ctor/*' />
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/ctor/*' />
public SqlCredential(string userId, SecureString password)
{
if (userId == null)
Expand Down Expand Up @@ -45,10 +45,10 @@ public SqlCredential(string userId, SecureString password)
_password = password;
}

/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/UserId/*' />
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/UserId/*' />
public string UserId => _userId;

/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/Password/*' />
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCredential.xml' path='docs/members[@name="SqlCredential"]/Password/*' />
public SecureString Password => _password;

}
Expand Down

0 comments on commit ff821cf

Please sign in to comment.