Esempio n. 1
0
 ///<inheritdoc/>
 public void Reset()
 {
     Tables.Clear();
     Columns.Clear();
     Views.Clear();
     StoredProcedures.Clear();
     SchemaNames.Clear();
 }
Esempio n. 2
0
        public void AssignPhaseData(DatabaseObjectInfo source, DatabaseAnalysePhase phase)
        {
            var src = (DatabaseInfo)source;

            if ((phase & DatabaseAnalysePhase.Tables) != 0)
            {
                Tables.Clear();
                foreach (var obj in src.Tables)
                {
                    Tables.Add(obj.CloneTable(this));
                }
            }
            if ((phase & DatabaseAnalysePhase.Views) != 0)
            {
                Views.Clear();
                foreach (var obj in src.Views)
                {
                    Views.Add(obj.CloneView(this));
                }
            }
            if ((phase & DatabaseAnalysePhase.Functions) != 0)
            {
                StoredProcedures.Clear();
                Functions.Clear();
                Triggers.Clear();
                foreach (var obj in src.StoredProcedures)
                {
                    StoredProcedures.Add(obj.CloneStoredProcedure(this));
                }
                foreach (var obj in src.Functions)
                {
                    Functions.Add(obj.CloneFunction(this));
                }
                foreach (var obj in src.Triggers)
                {
                    Triggers.Add(obj.CloneTrigger(this));
                }
            }
            if ((phase & DatabaseAnalysePhase.Settings) != 0)
            {
                Schemas.Clear();
                foreach (var obj in src.Schemas)
                {
                    Schemas.Add(obj.CloneSchema(this));
                }
                DefaultSchema = src.DefaultSchema;
            }
        }