public bool Equals( ConnectionString obj ) { foreach (string key in elements.Keys) { if (! obj.Contains(key)) return false; if ( ! this[key].Equals( obj[key] )) return false; } return true; }
public bool Equals(ConnectionString obj) { foreach (string key in elements.Keys) { if (!obj.Contains(key)) { return(false); } if (!this[key].Equals(obj[key])) { return(false); } } return(true); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public bool PoolingEquals(ConnectionString obj) { foreach (string key in elements.Keys) { // these connection string elements only affect pooling // so we don't check them when making sure connection strings // are alike if (key.Equals("connection lifetime")) { continue; } if (key.Equals("connection reset")) { continue; } if (key.Equals("enlist")) { continue; } if (key.Equals("max pool size")) { continue; } if (key.Equals("min pool size")) { continue; } if (key.Equals("pooling")) { continue; } if (!obj.Contains(key)) { return(false); } if (!this[key].Equals(obj[key])) { return(false); } } return(true); }
/// <summary> /// /// </summary> /// <param name="obj"></param> /// <returns></returns> public bool PoolingEquals( ConnectionString obj ) { foreach (string key in elements.Keys) { // these connection string elements only affect pooling // so we don't check them when making sure connection strings // are alike if (key.Equals("connection lifetime")) continue; if (key.Equals("connection reset")) continue; if (key.Equals("enlist")) continue; if (key.Equals("max pool size")) continue; if (key.Equals("min pool size")) continue; if (key.Equals("pooling")) continue; if (! obj.Contains(key)) return false; if ( ! this[key].Equals( obj[key] )) return false; } return true; }