예제 #1
0
 internal void OnPrimeProgress(IDbgEntityPrimer aPrimer, int aValue)
 {
     // First tell engine
     Descriptor.Engine.OnPrimingProgress(this, aValue);
     try
     {
         if (EventObserver != null)
         {
             EventObserver(this, this.CategoryName, TEvent.EEventPrimingProgress, aValue, null);
         }
     }
     catch (Exception)
     {
     }
 }
예제 #2
0
 internal void OnPrimeStart(IDbgEntityPrimer aPrimer)
 {
     // First tell engine
     Descriptor.Engine.OnPrimingStarted(this);
     try
     {
         // Next, tell observer
         if (EventObserver != null)
         {
             EventObserver(this, this.CategoryName, TEvent.EEventPrimingStarted, null, null);
         }
     }
     catch (Exception)
     {
     }
 }
예제 #3
0
        internal void OnPrimeComplete(IDbgEntityPrimer aPrimer)
        {
            // We are now considered "primed"
            iIsPrimed = true;

            // Next tell engine
            Descriptor.Engine.OnPrimingComplete(this);
            try
            {
                // Next, tell observer
                if (EventObserver != null)
                {
                    EventObserver(this, this.CategoryName, TEvent.EEventPrimingComplete, aPrimer.PrimeErrorMessage, aPrimer.PrimeException);
                }
            }
            catch (Exception)
            {
            }
        }
        internal void Prime(DbgEntity aEntity, TSynchronicity aSynchronicity)
        {
            // Make a new result
            aEntity.PrimerResult = new DbgEntityPrimerResult(aEntity);

            // The primer to use
            IDbgEntityPrimer primer = null;

            // We can't sensibly prime if we don't have a plugin engine associated with the
            // entity.
            DbgPluginEngine plugin = aEntity.PluginEngine;

            if (plugin != null)
            {
                // Get primer object
                switch (UiMode)
                {
                case TDbgUiMode.EUiDisabled:
                    primer = new DbgEntityPrimerSilent(aEntity, plugin);
                    break;

                default:
                case TDbgUiMode.EUiEnabled:
                    primer = new DbgEntityPrimerUi(aEntity, plugin);
                    break;
                }
            }
            else
            {
                primer = new DbgEntityPrimerNull(aEntity);
                Engine.Trace("WARNING: Entity {0} does not supply plugin engine", aEntity.FullName);
            }

            // Make sure we indicate that we actually atttempted to prime
            // the entity.
            aEntity.PrimerResult.PrimeAttempted = true;

            // And prime away
            primer.Prime(aSynchronicity);
        }