Skip to content

Commit

Permalink
Add missing HostNameInCertificate property in NetFx Ref (#1776)
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra authored Oct 4, 2022
1 parent 871c0d2 commit 0eeb135
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,10 @@ public SqlConnectionStringBuilder(string connectionString) { }
[System.ComponentModel.DisplayNameAttribute("Encrypt")]
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
public SqlConnectionEncryptOption Encrypt { get { throw null; } set { } }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionStringBuilder.xml' path='docs/members[@name="SqlConnectionStringBuilder"]/HostNameInCertificate/*'/>
[System.ComponentModel.DisplayNameAttribute("Host Name In Certificate")]
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
public string HostNameInCertificate { get { throw null; } set { } }
/// <include file='../../../../doc/snippets/Microsoft.Data.SqlClient/SqlConnectionStringBuilder.xml' path='docs/members[@name="SqlConnectionStringBuilder"]/Enlist/*'/>
[System.ComponentModel.DisplayNameAttribute("Enlist")]
[System.ComponentModel.RefreshPropertiesAttribute(System.ComponentModel.RefreshProperties.All)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ public void SetEncryptOnConnectionBuilderMapsToString()
}
}

[Fact]
public void AbleToSetHostNameInCertificate()
{
var testhostname = "somedomain.net";
var builder = new SqlConnectionStringBuilder
{
HostNameInCertificate = testhostname
};
Assert.Equal(testhostname, builder.HostNameInCertificate);
}

[Fact]
public void ConnectionBuilderEncryptBackwardsCompatibility()
{
Expand Down

0 comments on commit 0eeb135

Please sign in to comment.