protected override void Process(ReinstallArgs args) { Assert.ArgumentNotNull(args, nameof(args)); var defaultConnectionString = args.ConnectionString; Assert.IsNotNull(defaultConnectionString, "SQL Connection String isn't set in the Settings dialog"); var instanceName = args.instanceName; var instance = InstanceManager.GetInstance(instanceName); var controller = this.Controller; var sqlPrefix = args.SqlPrefix; foreach (ConnectionString connectionString in instance.Configuration.ConnectionStrings) { if (this.done.Contains(connectionString.Name)) { continue; } AttachDatabasesHelper.AttachDatabase(connectionString, defaultConnectionString, args.Name, sqlPrefix, true, args.DatabasesFolderPath, args.InstanceName, controller); if (controller != null) { controller.IncrementProgress(AttachDatabasesHelper.StepsCount / args.ConnectionString.Count); } this.done.Add(connectionString.Name); } }
protected override void Process(InstallArgs args) { Assert.ArgumentNotNull(args, "args"); var defaultConnectionString = args.ConnectionString; Assert.IsNotNull(defaultConnectionString, "SQL Connection String isn't set in the Settings dialog"); var instance = args.Instance; Assert.IsNotNull(instance, "instance"); var controller = this.Controller; foreach (ConnectionString connectionString in instance.Configuration.ConnectionStrings) { if (this.done.Contains(connectionString.Name)) { continue; } AttachDatabasesHelper.AttachDatabase(connectionString, defaultConnectionString, args.Name, args.DatabasesFolderPath, instance.Name, controller); if (controller != null) { controller.IncrementProgress(AttachDatabasesHelper.StepsCount / args.ConnectionString.Count); } this.done.Add(connectionString.Name); } }
protected override void Process(InstallArgs args) { Assert.ArgumentNotNull(args, nameof(args)); var defaultConnectionString = args.ConnectionString; Assert.IsNotNull(defaultConnectionString, "SQL Connection String isn't set in the Settings dialog"); var instance = args.Instance; Assert.IsNotNull(instance, nameof(instance)); var sqlPrefix = args.InstanceSqlPrefix; Assert.IsNotNull(sqlPrefix, nameof(sqlPrefix)); var controller = Controller; foreach (ConnectionString connectionString in instance.Configuration.ConnectionStrings) { var connectionStringName = connectionString.Name; if (_Done.Contains(connectionStringName)) { continue; } if (connectionStringName.Contains("apikey")) { _Done.Add(connectionStringName); continue; } AttachDatabasesHelper.AttachDatabase(connectionString, defaultConnectionString, args.Name, sqlPrefix, args.InstanceAttachSql, args.DatabasesFolderPath, instance.Name, controller); if (controller != null) { controller.IncrementProgress(AttachDatabasesHelper.StepsCount / args.ConnectionString.Count); } _Done.Add(connectionStringName); } }