public MigrationScriptCompiler(IDbPlatform dbPlatform, INativeSqlResourceProvider nativeSqlResourceProvider, MigrationMode migrationMode)
 {
     this.dbPlatform = dbPlatform;
     this.nativeSqlResourceProvider = nativeSqlResourceProvider;
     this.migrationMode = migrationMode;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MigrationService"/> class.
        /// </summary>
        /// <param name="dbPlatform"></param>
        /// <param name="migrationVersionInfoManager"></param>
        /// <param name="migrationScriptExecutive"></param>
        /// <param name="nativeSqlResourceProvider"></param>
        public MigrationService(IDbPlatform dbPlatform, IMigrationVersionInfoManager migrationVersionInfoManager,
            IMigrationScriptExecutive migrationScriptExecutive, INativeSqlResourceProvider nativeSqlResourceProvider)
        {
            this.dbPlatform = dbPlatform;
            this.migrationVersionInfoManager = migrationVersionInfoManager;
            this.migrationScriptExecutive = migrationScriptExecutive;
            this.nativeSqlResourceProvider = nativeSqlResourceProvider;

            this.migrationScriptExecutive.Migrating +=
                delegate(object sender, MigrationScriptExecutionEventArgs args)
                    { InvokeMigrating(new MigrationEventArgs(args.Version, args.Mode)); };
            this.migrationScriptExecutive.Migrated +=
                delegate(object sender, MigrationScriptExecutionEventArgs args)
                    { InvokeMigrated(new MigrationEventArgs(args.Version, args.Mode)); };
        }
 private static MigrationScriptCollection CompileMigrationScripts(IDbPlatform dbPlatform, INativeSqlResourceProvider nativeSqlResourceProvider,
     TextReader migrationDefinition, MigrationMode migrationMode)
 {
     MigrationScriptCompiler migrationScriptCompiler = new MigrationScriptCompiler(dbPlatform, nativeSqlResourceProvider, migrationMode);
     return migrationScriptCompiler.CompileMigrationScripts(migrationDefinition);
 }
 public void SetNativeSqlResourceProvider(INativeSqlResourceProvider nativeSqlResourceProvider)
 {
     this.nativeSqlResourceProvider = nativeSqlResourceProvider;
 }