コード例 #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;
 }
コード例 #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;
 }
コード例 #3
0
ファイル: Runner.cs プロジェクト: philous/sharpmigrations
 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);
     }
 }
コード例 #4
0
 public void Init()
 {
     _dataClient = new Mock<IDataClient>().Object;
     _factory = new MigrationFactory(_dataClient);
 }