public Database(string name, Guid id, List <Table> tables, DbSchema schema, List <Participant> acceptedParticipants, List <Participant> pendingParticipants, Contract contract, Process process) : this(name, process) { _id = id; _tables = tables; _schema = schema; if (acceptedParticipants is null) { acceptedParticipants = new List <Participant>(); } if (pendingParticipants is null) { pendingParticipants = new List <Participant>(); } if (contract is null) { contract = new Contract(_process, this); } _participantManager = new ParticipantManager(this, acceptedParticipants, pendingParticipants, _process); _contract = contract; _process = process; SetProcessForParticipants(); }
public Database(string name, Guid id, List <Table> tables, DbSchema schema, Process process) : this(name, process) { _id = id; _tables = tables; _schema = schema; SetProcessForParticipants(); }
public static DbSchemaInfo Map(DbSchema schema) { var info = new DbSchemaInfo(); MapDatabaseInformation(schema, info); MapTableInformation(schema, info); return(info); }
public Database(string name, Guid id, List <Table> tables, DbSchema schema, List <Participant> acceptedParticipants, Process process) : this(name, process) { _id = id; _tables = tables; _schema = schema; _participantManager = new ParticipantManager(this, acceptedParticipants, new List <Participant>(), _process); SetProcessForParticipants(); }
private static void MapTableInformation(DbSchema schema, DbSchemaInfo info) { foreach (var table in schema.Tables) { var tSchema = new TableSchemaInfo(); tSchema.TableName = table.TableName; MapColumnInformation(table, tSchema); info.Tables.Add(tSchema); } }
public PartialDatabase(Process process) { _id = Guid.NewGuid(); _process = process; _tables = new List <Table>(); if (_schema is null) { _schema = new DbSchema(this, _process); } if (_contract is null) { _contract = new Contract(_process); } }
public Database(Process process) { Tables2 = new List <Table2>(); _process = process; _id = Guid.NewGuid(); _tables = new List <Table>(); _participantManager = new ParticipantManager(this, new List <Participant>(), new List <Participant>(), _process); if (_schema is null) { _schema = new DbSchema(this, _process); } if (_contract is null) { _contract = new Contract(_process); } SetProcessForParticipants(); }
private static void MapDatabaseInformation(DbSchema schema, DbSchemaInfo info) { info.DatabaseId = schema.DatabaseId; info.DatabaseName = schema.DatabaseName; }
public void UpdateSchema() { _schema = new DbSchema(this, _process); }