예제 #1
0
 /// <summary>
 /// Invokes the Prepare() method on all active plugins.
 /// </summary>
 /// <param name="appRef">Reference to host object providing app services.</param>
 /// <param name="addrEntries">Serialized AddressMap entries.</param>
 /// <param name="plSyms">SymbolTable contents, converted to PlSymbol.</param>
 public void PreparePlugins(IApplication appRef,
     List<AddressMap.AddressMapEntry> addrEntries, List<PlSymbol> plSyms)
 {
     AddressMap addrMap = new AddressMap(addrEntries);
     AddressTranslate addrTrans = new AddressTranslate(addrMap);
     foreach (KeyValuePair<string, IPlugin> kvp in mActivePlugins) {
         IPlugin ipl = kvp.Value;
         ipl.Prepare(appRef, mFileData, addrTrans);
         if (ipl is IPlugin_SymbolList) {
             ((IPlugin_SymbolList)ipl).UpdateSymbolList(plSyms);
         }
     }
 }
예제 #2
0
        /// <summary>
        /// Invokes the Prepare() method on all active plugins.
        /// </summary>
        /// <param name="appRef">Reference to host object providing app services.</param>
        /// <param name="spanLength">Length of data spanned by address map.</param>
        /// <param name="addrEntries">Serialized AddressMap entries.</param>
        /// <param name="plSyms">SymbolTable contents, converted to PlSymbol.</param>
        public void PreparePlugins(IApplication appRef, int spanLength,
                                   List <AddressMap.AddressMapEntry> addrEntries, List <PlSymbol> plSyms)
        {
            AddressMap       addrMap   = new AddressMap(spanLength, addrEntries);
            AddressTranslate addrTrans = new AddressTranslate(addrMap);

            foreach (KeyValuePair <string, IPlugin> kvp in mActivePlugins)
            {
                IPlugin ipl = kvp.Value;
                ipl.Prepare(appRef, mFileData, addrTrans);
                if (ipl is IPlugin_SymbolList)
                {
                    try {
                        ((IPlugin_SymbolList)ipl).UpdateSymbolList(plSyms);
                    } catch (Exception ex) {
                        throw new Exception("Failed in UpdateSymbolList(" + kvp.Key + ")", ex);
                    }
                }
            }
        }