public DBSettings Copy() { DBSettings result = new DBSettings(); result.Connection = this.Connection; return(result); }
public static DBSettings Load(DBSettings defaultSettings = null) { DBSettings settings = defaultSettings; if (ExistFileSettings()) { BinaryFormatter formatter = new BinaryFormatter(); using (FileStream fs = new FileStream(Path.Combine(Environment.CurrentDirectory, "dbsettings.cpf"), FileMode.Open)) { settings = (DBSettings)formatter.Deserialize(fs); } } return(settings); }