public Runner(IDataClient dataClient, Assembly targetAssembly, IVersionRepository versionRepository) { _dataClient = dataClient; _databaseKind = _dataClient.Database.Provider.DatabaseKind; _targetAssembly = targetAssembly ?? Assembly.GetCallingAssembly(); VersionRepository = versionRepository; _migrationFactory = new MigrationFactory(_dataClient); _initialVersion = -1; }
private void CreateMigrationsToRun() { List<Type> migrationTypes = GetMigrationTypes(); MigrationsToRun = new List<Migration>(); var factory = new MigrationFactory(_dataClient); foreach (Type type in migrationTypes) { Migration migration = factory.CreateMigration(type); MigrationsToRun.Add(migration); } }
public void Init() { _dataClient = new Mock<IDataClient>().Object; _factory = new MigrationFactory(_dataClient); }