public DevelopmentInstallationLogic(
            GeneralInstallationLogic generalInstallationLogic, ExistingInstallationLogic existingInstallationLogic,
            RecognizedInstallationLogic recognizedInstallationLogic)
        {
            this.generalInstallationLogic  = generalInstallationLogic;
            this.existingInstallationLogic = existingInstallationLogic;

            database = recognizedInstallationLogic != null
                                           ? recognizedInstallationLogic.Database
                                           : DatabaseAbstraction.DatabaseOps.CreateDatabase(existingInstallationLogic.RuntimeConfiguration.PrimaryDatabaseInfo, new List <string>());

            var developmentConfiguration = existingInstallationLogic.RuntimeConfiguration.SystemDevelopmentConfiguration;

            databasesForCodeGeneration = new List <DatabaseAbstraction.Database>();
            if (developmentConfiguration.database != null)
            {
                DatabasesForCodeGeneration.Add(database);
            }
            if (developmentConfiguration.secondaryDatabases != null)
            {
                foreach (var secondaryDatabaseInDevelopmentConfiguration in developmentConfiguration.secondaryDatabases)
                {
                    DatabasesForCodeGeneration.Add(
                        (recognizedInstallationLogic != null
                                                          ? recognizedInstallationLogic.SecondaryDatabasesIncludedInDataPackages.SingleOrDefault(
                             sd => sd.SecondaryDatabaseName == secondaryDatabaseInDevelopmentConfiguration.name)
                                                          : null) ??
                        DatabaseAbstraction.DatabaseOps.CreateDatabase(
                            this.existingInstallationLogic.RuntimeConfiguration.GetSecondaryDatabaseInfo(secondaryDatabaseInDevelopmentConfiguration.name),
                            new List <string>()));
                }
            }
        }
        public RecognizedInstallationLogic(ExistingInstallationLogic existingInstallationLogic, KnownSystemLogic knownSystemLogic)
        {
            this.existingInstallationLogic = existingInstallationLogic;
            this.knownSystemLogic          = knownSystemLogic;

            var rsisSystem = this.knownSystemLogic.RsisSystem;

            database = DatabaseAbstraction.DatabaseOps.CreateDatabase(existingInstallationLogic.RuntimeConfiguration.PrimaryDatabaseInfo,
                                                                      rsisSystem.PrimaryDatabaseOracleTableSpaces);

            var rsisSecondaryDatabases = rsisSystem.SecondaryDatabases.Where(sd => sd.DataPackageRank.HasValue).OrderBy(sd => sd.DataPackageRank.Value);

            secondaryDatabasesIncludedInDataPackages = new List <DatabaseAbstraction.Database>();
            foreach (var rsisSecondaryDatabase in rsisSecondaryDatabases)
            {
                var secondaryDatabaseInfo = this.existingInstallationLogic.RuntimeConfiguration.GetSecondaryDatabaseInfo(rsisSecondaryDatabase.Name);
                secondaryDatabasesIncludedInDataPackages.Add(DatabaseAbstraction.DatabaseOps.CreateDatabase(secondaryDatabaseInfo, rsisSecondaryDatabase.OracleTableSpaces));
            }
        }