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