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