public void Prime(TSynchronicity aSynchronicity) { if (EngineOperation != null) { EngineOperation(this, TEvent.EPrimingStarted); } // Reset the plugins Code.Clear(); Symbols.Clear(); // Categorise the prime list by plugin Dictionary <DbgPluginEngine, DbgEntityList> list = new Dictionary <DbgPluginEngine, DbgEntityList>(); foreach (DbgEntity entity in iEntityManager) { // Might be null. DbgPluginEngine plugin = entity.PluginEngine; if (plugin != null) { // Find correct list DbgEntityList pluginEntityList = null; if (list.ContainsKey(plugin)) { pluginEntityList = list[plugin]; } else { pluginEntityList = new DbgEntityList(this); list.Add(plugin, pluginEntityList); } // Now add the entry pluginEntityList.Add(entity); } } // Finally, we can tell all the plugins about the files they are about to receive foreach (KeyValuePair <DbgPluginEngine, DbgEntityList> kvp in list) { kvp.Key.PrepareToPrime(kvp.Value); } // Now prime the individual entities foreach (DbgEntity entity in iEntityManager) { entity.Prime(aSynchronicity); } if (EngineOperation != null) { EngineOperation(this, TEvent.EPrimingComplete); } }
public DbgEntityPrimerSilent(DbgEntity aEntity, DbgPluginEngine aPlugin) { iEntity = aEntity; iPlugin = aPlugin; // Make a new primer and seed it with the entity. iPrimer = aPlugin.CreatePrimer(); iPrimer.Add(aEntity); // Listen to plugin primer events iPrimer.EventHandler += new DbgPluginPrimer.PrimeEventHandler(PrimerPlugin_EventHandler); }
public DbgEntityPrimerUi(DbgEntity aEntity, DbgPluginEngine aPlugin) { iEntity = aEntity; iPlugin = aPlugin; // Make a new primer and seed it with the entity. iPrimer = aPlugin.CreatePrimer(); iPrimer.Add(aEntity); // Listen to plugin primer events iPrimer.EventHandler += new DbgPluginPrimer.PrimeEventHandler(PrimerPlugin_EventHandler); // this.InitializeComponent(); this.Text = string.Format("Preparing: [{0}]", Path.GetFileName(aEntity.FullName)); }
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); }
protected DbgViewCode(string aName, DbgPluginEngine aEngine) : base(aName, aEngine) { }
protected DbgViewSymbol(string aName, DbgPluginEngine aEngine) : base(aName, aEngine) { iPlainTextAPI = new DbgSymbolViewText(this); }