private object GetAt(Keywords index) { switch (index) { case Keywords.Dsn: return this.Dsn; case Keywords.Driver: return this.Driver; } throw ADP.KeywordNotSupported(_validKeywords[(int) index]); }
private void Reset(Keywords index) { switch(index) { case Keywords.ApplicationIntent: _applicationIntent = DbConnectionStringDefaults.ApplicationIntent; break; case Keywords.ApplicationName: _applicationName = DbConnectionStringDefaults.ApplicationName; break; case Keywords.AsynchronousProcessing: _asynchronousProcessing = DbConnectionStringDefaults.AsynchronousProcessing; break; case Keywords.AttachDBFilename: _attachDBFilename = DbConnectionStringDefaults.AttachDBFilename; break; case Keywords.Authentication: _authentication = DbConnectionStringDefaults.Authentication; break; case Keywords.ConnectTimeout: _connectTimeout = DbConnectionStringDefaults.ConnectTimeout; break; case Keywords.ConnectionReset: _connectionReset = DbConnectionStringDefaults.ConnectionReset; break; case Keywords.ContextConnection: _contextConnection = DbConnectionStringDefaults.ContextConnection; break; case Keywords.CurrentLanguage: _currentLanguage = DbConnectionStringDefaults.CurrentLanguage; break; case Keywords.DataSource: _dataSource = DbConnectionStringDefaults.DataSource; break; case Keywords.Encrypt: _encrypt = DbConnectionStringDefaults.Encrypt; break; case Keywords.Enlist: _enlist = DbConnectionStringDefaults.Enlist; break; case Keywords.FailoverPartner: _failoverPartner = DbConnectionStringDefaults.FailoverPartner; break; case Keywords.InitialCatalog: _initialCatalog = DbConnectionStringDefaults.InitialCatalog; break; case Keywords.IntegratedSecurity: _integratedSecurity = DbConnectionStringDefaults.IntegratedSecurity; break; case Keywords.LoadBalanceTimeout: _loadBalanceTimeout = DbConnectionStringDefaults.LoadBalanceTimeout; break; case Keywords.MultipleActiveResultSets: _multipleActiveResultSets = DbConnectionStringDefaults.MultipleActiveResultSets; break; case Keywords.MaxPoolSize: _maxPoolSize = DbConnectionStringDefaults.MaxPoolSize; break; case Keywords.MinPoolSize: _minPoolSize = DbConnectionStringDefaults.MinPoolSize; break; case Keywords.MultiSubnetFailover: _multiSubnetFailover = DbConnectionStringDefaults.MultiSubnetFailover; break; // case Keywords.NamedConnection: // _namedConnection = DbConnectionStringDefaults.NamedConnection; // break; case Keywords.NetworkLibrary: _networkLibrary = DbConnectionStringDefaults.NetworkLibrary; break; case Keywords.PacketSize: _packetSize = DbConnectionStringDefaults.PacketSize; break; case Keywords.Password: _password = DbConnectionStringDefaults.Password; break; case Keywords.PersistSecurityInfo: _persistSecurityInfo = DbConnectionStringDefaults.PersistSecurityInfo; break; case Keywords.Pooling: _pooling = DbConnectionStringDefaults.Pooling; break; case Keywords.ConnectRetryCount: _connectRetryCount = DbConnectionStringDefaults.ConnectRetryCount; break; case Keywords.ConnectRetryInterval: _connectRetryInterval = DbConnectionStringDefaults.ConnectRetryInterval; break; case Keywords.Replication: _replication = DbConnectionStringDefaults.Replication; break; case Keywords.TransactionBinding: _transactionBinding = DbConnectionStringDefaults.TransactionBinding; break; case Keywords.TrustServerCertificate: _trustServerCertificate = DbConnectionStringDefaults.TrustServerCertificate; break; case Keywords.TypeSystemVersion: _typeSystemVersion = DbConnectionStringDefaults.TypeSystemVersion; break; case Keywords.UserID: _userID = DbConnectionStringDefaults.UserID; break; case Keywords.UserInstance: _userInstance = DbConnectionStringDefaults.UserInstance; break; case Keywords.WorkstationID: _workstationID = DbConnectionStringDefaults.WorkstationID; break; case Keywords.ColumnEncryptionSetting: _columnEncryptionSetting = DbConnectionStringDefaults.ColumnEncryptionSetting; break; default: Debug.Assert(false, "unexpected keyword"); throw ADP.KeywordNotSupported(_validKeywords[(int)index]); } }
private object GetAt(Keywords index) { switch(index) { case Keywords.ApplicationIntent: return this.ApplicationIntent; case Keywords.ApplicationName: return ApplicationName; case Keywords.AsynchronousProcessing: return AsynchronousProcessing; case Keywords.AttachDBFilename: return AttachDBFilename; case Keywords.ConnectTimeout: return ConnectTimeout; #pragma warning disable 618 // Obsolete ConnectionReset case Keywords.ConnectionReset: return ConnectionReset; #pragma warning restore 618 case Keywords.ContextConnection: return ContextConnection; case Keywords.CurrentLanguage: return CurrentLanguage; case Keywords.DataSource: return DataSource; case Keywords.Encrypt: return Encrypt; case Keywords.Enlist: return Enlist; case Keywords.FailoverPartner: return FailoverPartner; case Keywords.InitialCatalog: return InitialCatalog; case Keywords.IntegratedSecurity: return IntegratedSecurity; case Keywords.LoadBalanceTimeout: return LoadBalanceTimeout; case Keywords.MultipleActiveResultSets: return MultipleActiveResultSets; case Keywords.MaxPoolSize: return MaxPoolSize; case Keywords.MinPoolSize: return MinPoolSize; case Keywords.MultiSubnetFailover: return MultiSubnetFailover; // case Keywords.NamedConnection: return NamedConnection; case Keywords.NetworkLibrary: return NetworkLibrary; case Keywords.PacketSize: return PacketSize; case Keywords.Password: return Password; case Keywords.PersistSecurityInfo: return PersistSecurityInfo; case Keywords.Pooling: return Pooling; case Keywords.Replication: return Replication; case Keywords.TransactionBinding: return TransactionBinding; case Keywords.TrustServerCertificate: return TrustServerCertificate; case Keywords.TypeSystemVersion: return TypeSystemVersion; case Keywords.UserID: return UserID; case Keywords.UserInstance: return UserInstance; case Keywords.WorkstationID: return WorkstationID; case Keywords.ConnectRetryCount: return ConnectRetryCount; case Keywords.ConnectRetryInterval: return ConnectRetryInterval; case Keywords.Authentication: return Authentication; case Keywords.ColumnEncryptionSetting: return ColumnEncryptionSetting; default: Debug.Assert(false, "unexpected keyword"); throw ADP.KeywordNotSupported(_validKeywords[(int)index]); } }
private void Reset(Keywords index) { switch(index) { case Keywords.Driver: _driver = DbConnectionStringDefaults.Driver; break; case Keywords.Dsn: _dsn = DbConnectionStringDefaults.Dsn; break; // case Keywords.NamedConnection: // _namedConnection = DbConnectionStringDefaults.NamedConnection; // break; default: Debug.Assert(false, "unexpected keyword"); throw ADP.KeywordNotSupported(_validKeywords[(int)index]); } }
private void Reset(Keywords index) { switch (index) { case Keywords.Dsn: this._dsn = ""; return; case Keywords.Driver: this._driver = ""; return; } throw ADP.KeywordNotSupported(_validKeywords[(int) index]); }
private void Reset(Keywords index) { switch(index) { case Keywords.DataSource: _dataSource = DbConnectionStringDefaults.DataSource; break; case Keywords.FileName: _fileName = DbConnectionStringDefaults.FileName; RestartProvider(); break; // case Keywords.NamedConnection: // _namedConnection = DbConnectionStringDefaults.NamedConnection; // break; case Keywords.OleDbServices: _oleDbServices = DbConnectionStringDefaults.OleDbServices; break; case Keywords.PersistSecurityInfo: _persistSecurityInfo = DbConnectionStringDefaults.PersistSecurityInfo; break; case Keywords.Provider: _provider = DbConnectionStringDefaults.Provider; RestartProvider(); break; default: Debug.Assert(false, "unexpected keyword"); throw ADP.KeywordNotSupported(_validKeywords[(int)index]); } }
private object GetAt(Keywords index) { switch(index) { case Keywords.Driver: return Driver; case Keywords.Dsn: return Dsn; // case Keywords.NamedConnection: return NamedConnection; default: Debug.Assert(false, "unexpected keyword"); throw ADP.KeywordNotSupported(_validKeywords[(int)index]); } }
private object GetAt(Keywords index) { switch(index) { case Keywords.DataSource: return DataSource; case Keywords.FileName: return FileName; // case Keywords.NamedConnection: return NamedConnection; case Keywords.OleDbServices: return OleDbServices; case Keywords.PersistSecurityInfo: return PersistSecurityInfo; case Keywords.Provider: return Provider; default: Debug.Assert(false, "unexpected keyword"); throw ADP.KeywordNotSupported(_validKeywords[(int)index]); } }
private void Reset(Keywords index) { switch (index) { case Keywords.FileName: this._fileName = ""; this.RestartProvider(); return; case Keywords.Provider: this._provider = ""; this.RestartProvider(); return; case Keywords.DataSource: this._dataSource = ""; return; case Keywords.PersistSecurityInfo: this._persistSecurityInfo = false; return; case Keywords.OleDbServices: this._oleDbServices = -13; return; } throw ADP.KeywordNotSupported(_validKeywords[(int) index]); }
private object GetAt(Keywords index) { switch (index) { case Keywords.FileName: return this.FileName; case Keywords.Provider: return this.Provider; case Keywords.DataSource: return this.DataSource; case Keywords.PersistSecurityInfo: return this.PersistSecurityInfo; case Keywords.OleDbServices: return this.OleDbServices; } throw ADP.KeywordNotSupported(_validKeywords[(int) index]); }
private void Reset(Keywords index) { switch (index) { case Keywords.DataSource: this._dataSource = ""; return; case Keywords.FailoverPartner: this._failoverPartner = ""; return; case Keywords.AttachDBFilename: this._attachDBFilename = ""; return; case Keywords.InitialCatalog: this._initialCatalog = ""; return; case Keywords.IntegratedSecurity: this._integratedSecurity = false; return; case Keywords.PersistSecurityInfo: this._persistSecurityInfo = false; return; case Keywords.UserID: this._userID = ""; return; case Keywords.Password: this._password = ""; return; case Keywords.Enlist: this._enlist = true; return; case Keywords.Pooling: this._pooling = true; return; case Keywords.MinPoolSize: this._minPoolSize = 0; return; case Keywords.MaxPoolSize: this._maxPoolSize = 100; return; case Keywords.AsynchronousProcessing: this._asynchronousProcessing = false; return; case Keywords.ConnectionReset: this._connectionReset = true; return; case Keywords.MultipleActiveResultSets: this._multipleActiveResultSets = false; return; case Keywords.Replication: this._replication = false; return; case Keywords.ConnectTimeout: this._connectTimeout = 15; return; case Keywords.Encrypt: this._encrypt = false; return; case Keywords.TrustServerCertificate: this._trustServerCertificate = false; return; case Keywords.LoadBalanceTimeout: this._loadBalanceTimeout = 0; return; case Keywords.NetworkLibrary: this._networkLibrary = ""; return; case Keywords.PacketSize: this._packetSize = 0x1f40; return; case Keywords.TypeSystemVersion: this._typeSystemVersion = "Latest"; return; case Keywords.ApplicationName: this._applicationName = ".Net SqlClient Data Provider"; return; case Keywords.CurrentLanguage: this._currentLanguage = ""; return; case Keywords.WorkstationID: this._workstationID = ""; return; case Keywords.UserInstance: this._userInstance = false; return; case Keywords.ContextConnection: this._contextConnection = false; return; case Keywords.TransactionBinding: this._transactionBinding = "Implicit Unbind"; return; case Keywords.MultiSubnetFailover: this._multiSubnetFailover = false; return; case Keywords.ApplicationIntent: this._applicationIntent = System.Data.SqlClient.ApplicationIntent.ReadWrite; return; } throw ADP.KeywordNotSupported(_validKeywords[(int) index]); }
private object GetAt(Keywords index) { switch (index) { case Keywords.DataSource: return this.DataSource; case Keywords.FailoverPartner: return this.FailoverPartner; case Keywords.AttachDBFilename: return this.AttachDBFilename; case Keywords.InitialCatalog: return this.InitialCatalog; case Keywords.IntegratedSecurity: return this.IntegratedSecurity; case Keywords.PersistSecurityInfo: return this.PersistSecurityInfo; case Keywords.UserID: return this.UserID; case Keywords.Password: return this.Password; case Keywords.Enlist: return this.Enlist; case Keywords.Pooling: return this.Pooling; case Keywords.MinPoolSize: return this.MinPoolSize; case Keywords.MaxPoolSize: return this.MaxPoolSize; case Keywords.AsynchronousProcessing: return this.AsynchronousProcessing; case Keywords.ConnectionReset: return this.ConnectionReset; case Keywords.MultipleActiveResultSets: return this.MultipleActiveResultSets; case Keywords.Replication: return this.Replication; case Keywords.ConnectTimeout: return this.ConnectTimeout; case Keywords.Encrypt: return this.Encrypt; case Keywords.TrustServerCertificate: return this.TrustServerCertificate; case Keywords.LoadBalanceTimeout: return this.LoadBalanceTimeout; case Keywords.NetworkLibrary: return this.NetworkLibrary; case Keywords.PacketSize: return this.PacketSize; case Keywords.TypeSystemVersion: return this.TypeSystemVersion; case Keywords.ApplicationName: return this.ApplicationName; case Keywords.CurrentLanguage: return this.CurrentLanguage; case Keywords.WorkstationID: return this.WorkstationID; case Keywords.UserInstance: return this.UserInstance; case Keywords.ContextConnection: return this.ContextConnection; case Keywords.TransactionBinding: return this.TransactionBinding; case Keywords.MultiSubnetFailover: return this.MultiSubnetFailover; case Keywords.ApplicationIntent: return this.ApplicationIntent; } throw ADP.KeywordNotSupported(_validKeywords[(int) index]); }