104 references to ConnectionOptions
System.Data (104)
fx\src\data\System\Data\SqlClient\SqlCommand.cs (1)
3030
identityUserName = new SqlDependency.IdentityUserNamePair(null, internalConnection.
ConnectionOptions
.UserID);
fx\src\data\System\Data\SqlClient\SqlConnection.cs (2)
1161
if ((innerConnection != null) && (!innerConnection.
ConnectionOptions
.Pooling)) {
1587
if (!tdsInnerConnection.
ConnectionOptions
.Pooling) {
fx\src\data\System\Data\SqlClient\SqlInternalConnectionSmi.cs (1)
199
return
ConnectionOptions
.TransactionBinding == SqlConnectionString.TransactionBindingEnum.ImplicitUnbind;
fx\src\data\System\Data\SqlClient\SqlInternalConnectionTds.cs (70)
671
Threading.Tasks.Task executeTask = _parser.TdsExecuteSQLBatch("use " + database,
ConnectionOptions
.ConnectTimeout, null, _parser._physicalStateObj, sync: true);
761
bool requireExplicitTransactionUnbind =
ConnectionOptions
.TransactionBinding == SqlConnectionString.TransactionBindingEnum.ExplicitUnbind;
829
if (
ConnectionOptions
.Enlist) {
1032
Threading.Tasks.Task executeTask = _parser.TdsExecuteSQLBatch(sqlBatch.ToString(),
ConnectionOptions
.ConnectTimeout, null, _parser._physicalStateObj, sync: true);
1163
ConnectionOptions
.ConnectTimeout, internalTransaction, stateObj, isDelegateControlRequest);
1187
byte[] dtcAddress = _parser.GetDTCAddress(
ConnectionOptions
.ConnectTimeout, _parser.GetSession(this));
1193
_parser.PropagateDistributedTransaction(cookie,
ConnectionOptions
.ConnectTimeout, _parser._physicalStateObj);
1248
if(enlistOK &&
ConnectionOptions
.Enlist) {
1263
_currentPacketSize =
ConnectionOptions
.PacketSize;
1264
_currentLanguage =
ConnectionOptions
.CurrentLanguage;
1285
login.authentication =
ConnectionOptions
.Authentication;
1287
login.userInstance =
ConnectionOptions
.UserInstance;
1288
login.hostName =
ConnectionOptions
.ObtainWorkstationId();
1289
login.userName =
ConnectionOptions
.UserID;
1290
login.password =
ConnectionOptions
.Password;
1291
login.applicationName =
ConnectionOptions
.ApplicationName;
1296
login.attachDBFilename =
ConnectionOptions
.AttachDBFilename;
1304
login.useReplication =
ConnectionOptions
.Replication;
1305
login.useSSPI =
ConnectionOptions
.IntegratedSecurity
1306
|| (
ConnectionOptions
.Authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated && !_fedAuthRequired);
1309
login.readOnlyIntent =
ConnectionOptions
.ApplicationIntent == ApplicationIntent.ReadOnly;
1316
if (
ConnectionOptions
.ConnectRetryCount>0) {
1324
if (
ConnectionOptions
.Authentication == SqlAuthenticationMethod.ActiveDirectoryPassword
1325
||
ConnectionOptions
.Authentication == SqlAuthenticationMethod.ActiveDirectoryInteractive
1326
|| (
ConnectionOptions
.Authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated && _fedAuthRequired)) {
1332
authentication =
ConnectionOptions
.Authentication,
1351
if (
ConnectionOptions
.ApplicationIntent == ApplicationIntent.ReadOnly) {
1385
failoverPartner =
ConnectionOptions
.FailoverPartner;
1416
if (
ConnectionOptions
.ApplicationIntent == ApplicationIntent.ReadOnly) {
1417
if (!String.IsNullOrEmpty(
ConnectionOptions
.FailoverPartner)) {
1466
Debug.Assert(object.ReferenceEquals(connectionOptions, this.
ConnectionOptions
), "ConnectionOptions argument and property must be the same"); // consider removing the argument
1541
_parser = new TdsParser(
ConnectionOptions
.MARS,
ConnectionOptions
.Asynchronous);
1577
serverInfo = new ServerInfo(
ConnectionOptions
, _routingInfo, serverInfo.ResolvedServerName);
1583
_currentPacketSize =
ConnectionOptions
.PacketSize;
1584
_currentLanguage = _originalLanguage =
ConnectionOptions
.CurrentLanguage;
1585
CurrentDatabase = _originalDatabase =
ConnectionOptions
.InitialCatalog;
1626
Debug.Assert(
ConnectionOptions
.ApplicationIntent != ApplicationIntent.ReadOnly, "FAILOVER+AppIntent=RO: Should already fail (at LOGSHIPNODE in OnEnvChange)");
1737
string protocol =
ConnectionOptions
.NetworkLibrary;
1780
_parser = new TdsParser(
ConnectionOptions
.MARS,
ConnectionOptions
.Asynchronous);
1829
_parser = new TdsParser(
ConnectionOptions
.MARS,
ConnectionOptions
.Asynchronous);
1832
currentServerInfo = new ServerInfo(
ConnectionOptions
, _routingInfo, currentServerInfo.ResolvedServerName);
1838
_currentPacketSize =
ConnectionOptions
.PacketSize;
1839
_currentLanguage = _originalLanguage =
ConnectionOptions
.CurrentLanguage;
1840
CurrentDatabase = _originalDatabase =
ConnectionOptions
.InitialCatalog;
1968
ConnectionOptions
.Encrypt,
1969
ConnectionOptions
.TrustServerCertificate,
1970
ConnectionOptions
.IntegratedSecurity,
1973
ConnectionOptions
.Authentication,
1986
CompleteLogin(!
ConnectionOptions
.Pooling);
2201
Debug.Assert((
ConnectionOptions
.HasUserIdKeyword &&
ConnectionOptions
.HasPasswordKeyword)
2203
||
ConnectionOptions
.Authentication == SqlAuthenticationMethod.ActiveDirectoryInteractive
2204
|| (
ConnectionOptions
.Authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated && _fedAuthRequired),
2376
var authProvider = _sqlAuthenticationProviderManager.GetProvider(
ConnectionOptions
.Authentication);
2377
if (authProvider == null) throw SQL.CannotFindAuthProvider(
ConnectionOptions
.Authentication.ToString());
2383
authenticationMethod:
ConnectionOptions
.Authentication,
2386
serverName:
ConnectionOptions
.DataSource,
2387
databaseName:
ConnectionOptions
.InitialCatalog)
2389
switch (
ConnectionOptions
.Authentication) {
2403
authParamsBuilder.WithUserId(
ConnectionOptions
.UserID);
2417
username =
ConnectionOptions
.UserID;
2418
authParamsBuilder.WithUserId(username).WithPassword(
ConnectionOptions
.Password);
2425
throw new InvalidOperationException($"Failed to get a token with unsupported auth method {
ConnectionOptions
.Authentication}.");
2452
sqlErs.Add(new SqlError(0, (byte)0x00, (byte)TdsEnums.MIN_ERROR_CLASS,
ConnectionOptions
.DataSource, Res.GetString(Res.SQL_ADALFailure, username,
ConnectionOptions
.Authentication.ToString("G")), ActiveDirectoryAuthentication.AdalGetAccessTokenFunctionName, 0));
2456
sqlErs.Add(new SqlError(0, (byte)0x00, (byte)TdsEnums.MIN_ERROR_CLASS,
ConnectionOptions
.DataSource, errorMessage1, ActiveDirectoryAuthentication.AdalGetAccessTokenFunctionName, 0));
2460
sqlErs.Add(new SqlError(0, (byte)0x00, (byte)TdsEnums.MIN_ERROR_CLASS,
ConnectionOptions
.DataSource, adalException.Message, ActiveDirectoryAuthentication.AdalGetAccessTokenFunctionName, 0));
fx\src\data\System\Data\SqlClient\TdsParser.cs (28)
424
if (connHandler.
ConnectionOptions
.LocalDBInstance != null)
425
LocalDBAPI.CreateLocalDBInstance(connHandler.
ConnectionOptions
.LocalDBInstance);
455
bool fParallel = _connHandler.
ConnectionOptions
.MultiSubnetFailover;
458
if (_connHandler.
ConnectionOptions
.TransparentNetworkIPResolution && !disableTnir)
468
int totalTimeout = _connHandler.
ConnectionOptions
.ConnectTimeout;
1075
if ((_connHandler.
ConnectionOptions
!= null
1076
&& _connHandler.
ConnectionOptions
.Authentication != SqlAuthenticationMethod.NotSpecified)
1254
if ((_state == TdsParserState.OpenNotLoggedIn) && (_connHandler.
ConnectionOptions
.TransparentNetworkIPResolution || _connHandler.
ConnectionOptions
.MultiSubnetFailover || _loginWithFailover) && (temp.Count == 1) && ((temp[0].Number == TdsEnums.TIMEOUT_EXPIRED) || (temp[0].Number == TdsEnums.SNI_WAIT_TIMEOUT))) {
2901
&& _connHandler.
ConnectionOptions
.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled
2908
&& (!string.IsNullOrWhiteSpace(_connHandler.
ConnectionOptions
.EnclaveAttestationUrl))
2915
&& (!string.IsNullOrWhiteSpace(_connHandler.
ConnectionOptions
.EnclaveAttestationUrl))
3117
if ( _connHandler.
ConnectionOptions
.UserInstance &&
3642
_connHandler != null && _connHandler.
ConnectionOptions
!= null &&
3643
_connHandler.
ConnectionOptions
.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled)) {
4773
return (connection != null && connection.
ConnectionOptions
!= null &&
4774
connection.
ConnectionOptions
.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled);
5347
&& _connHandler != null && _connHandler.
ConnectionOptions
!= null
5348
&& _connHandler.
ConnectionOptions
.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled))) {
5351
byte[] unencryptedBytes = SqlSecurityUtility.DecryptWithKey(b, md.cipherMD, _connHandler.
ConnectionOptions
.DataSource);
7623
if (_connHandler.
ConnectionOptions
!= null)
7625
authentication = _connHandler.
ConnectionOptions
.Authentication;
8271
encryptedValue = SqlSecurityUtility.EncryptWithKey(serializedValue, param.CipherMetadata, _connHandler.
ConnectionOptions
.DataSource);
9382
null != _connHandler.
ConnectionOptions
&&
9383
SqlConnectionColumnEncryptionSetting.Enabled == _connHandler.
ConnectionOptions
.ColumnEncryptionSetting) {
9486
_connHandler.
ConnectionOptions
.DataSource);
11451
null == _connHandler ? "(null)" : _connHandler.
ConnectionOptions
.MultiSubnetFailover.ToString((IFormatProvider)null),
11452
null == _connHandler ? "(null)" : _connHandler.
ConnectionOptions
.TransparentNetworkIPResolution.ToString((IFormatProvider)null));
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (2)
2370
else if ((_parser.State == TdsParserState.OpenNotLoggedIn) && (_parser.Connection.
ConnectionOptions
.MultiSubnetFailover || _parser.Connection.
ConnectionOptions
.TransparentNetworkIPResolution))