コード例 #1
0
        private void OnMigratorFinished(object o, EventArgs args)
        {
            BansheeDbFormatMigrator migrator = (BansheeDbFormatMigrator)o;

            migrator.Started  -= OnMigratorStarted;
            migrator.Finished -= OnMigratorFinished;
        }
コード例 #2
0
 private void OnMigrationFinished(object o, EventArgs args)
 {
     migrator.Finished     -= OnMigrationFinished;
     migrator.SlowStarted  -= OnMigrationSlowStarted;
     migrator.SlowPulse    -= OnMigrationSlowPulse;
     migrator.SlowFinished -= OnMigrationSlowFinished;
     migrator = null;
 }
コード例 #3
0
 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;
         }
     }
 }
コード例 #4
0
        public BansheeDbFormatMigratorMonitor(BansheeDbFormatMigrator migrator)
        {
            if (migrator == null)
            {
                return;
            }

            this.migrator          = migrator;
            migrator.Finished     += OnMigrationFinished;
            migrator.SlowStarted  += OnMigrationSlowStarted;
            migrator.SlowPulse    += OnMigrationSlowPulse;
            migrator.SlowFinished += OnMigrationSlowFinished;
        }
コード例 #5
0
        private void OnMigratorStarted(object o, EventArgs args)
        {
            BansheeDbFormatMigrator migrator = (BansheeDbFormatMigrator)o;

            new BansheeDbFormatMigratorMonitor(migrator);
        }