Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
        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();
        }