/// <summary> /// Creates a deep copy of the passed object. /// </summary> /// <param name="old">A <b>Database Definition</b> object to create the deep copy from.</param> private void CopyMembers(RemoteDatabase old) { this.providerName = old.providerName; this.connectionString = old.connectionString; this.integratedSecurity = old.integratedSecurity; this.username = old.username; this.password = old.password; this.requiresSshTunnel = old.requiresSshTunnel; this.sshHostName = old.sshHostName; this.sshPortNumber = old.sshPortNumber; this.sshUsername = old.sshUsername; this.sshPassword = old.sshPassword; }
public static DatasetBase CreateDataset(RemoteDatabase rd) { switch (rd.ProviderName) { case Schema.SqlServer.Constants.SqlServerProviderName: return CreateSqlServerDataset(rd); case Schema.MySql.Constants.MySqlProviderName: return CreateMySqlDataset(rd); case Schema.PostgreSql.Constants.PostgreSqlProviderName: return CreatePostgreSqlDataset(rd); default: throw new NotImplementedException(); } }
private static Schema.MySql.MySqlDataset CreateMySqlDataset(RemoteDatabase rd) { var ds = new Schema.MySql.MySqlDataset() { Name = rd.Name, IsCacheable = true, }; ds.ConnectionString = ds.GetSpecializedConnectionString( rd.ConnectionString, rd.IntegratedSecurity, rd.Username, rd.Password, false); return ds; }
/// <summary> /// Copy contructor for doing deep copy of the <b>Remote Database</b> objects. /// </summary> /// <param name="old">The <b>Remote Database</b> to copy from.</param> public RemoteDatabase(RemoteDatabase old) : base(old) { CopyMembers(old); }