private void OnMigratorFinished(object o, EventArgs args) { BansheeDbFormatMigrator migrator = (BansheeDbFormatMigrator)o; migrator.Started -= OnMigratorStarted; migrator.Finished -= OnMigratorFinished; }
private void OnMigrationFinished(object o, EventArgs args) { migrator.Finished -= OnMigrationFinished; migrator.SlowStarted -= OnMigrationSlowStarted; migrator.SlowPulse -= OnMigrationSlowPulse; migrator.SlowFinished -= OnMigrationSlowFinished; migrator = null; }
private void OnServiceStarted(ServiceStartedArgs args) { if (args.Service is BansheeDbConnection) { ServiceManager.ServiceStarted -= OnServiceStarted; BansheeDbFormatMigrator migrator = ((BansheeDbConnection)args.Service).Migrator; if (migrator != null) { migrator.Started += OnMigratorStarted; migrator.Finished += OnMigratorFinished; } } }
public BansheeDbFormatMigratorMonitor(BansheeDbFormatMigrator migrator) { if (migrator == null) { return; } this.migrator = migrator; migrator.Finished += OnMigrationFinished; migrator.SlowStarted += OnMigrationSlowStarted; migrator.SlowPulse += OnMigrationSlowPulse; migrator.SlowFinished += OnMigrationSlowFinished; }
private void OnMigratorStarted(object o, EventArgs args) { BansheeDbFormatMigrator migrator = (BansheeDbFormatMigrator)o; new BansheeDbFormatMigratorMonitor(migrator); }