mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-07 17:25:04 -05:00
Optional application name parameter for connection string (#1380)
* optional application name parameter for connection string
This commit is contained in:
@@ -1327,9 +1327,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
{
|
||||
connStringBuilder.Password = ConnectionService.PasswordPlaceholder;
|
||||
}
|
||||
|
||||
connStringBuilder.ApplicationName = "sqlops-connection-string";
|
||||
|
||||
// default connection string application name to always be included unless set to false
|
||||
if (!connStringParams.IncludeApplicationName.HasValue || connStringParams.IncludeApplicationName.Value == true)
|
||||
{
|
||||
connStringBuilder.ApplicationName = "sqlops-connection-string";
|
||||
}
|
||||
connectionString = connStringBuilder.ConnectionString;
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
@@ -17,7 +17,14 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the password should be return in the connection string
|
||||
/// default is set to false
|
||||
/// </summary>
|
||||
public bool IncludePassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether the application name should be return in the connection string
|
||||
/// default is set to true
|
||||
/// </summary>
|
||||
public bool? IncludeApplicationName { get; set;}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user