示例#1
0
        public void Prepare(IApplication appRef, byte[] fileData, AddressTranslate addrTrans)
        {
            mAppRef   = appRef;
            mFileData = fileData;

            mAppRef.DebugLog("Test2011(id=" + AppDomain.CurrentDomain.Id + "): prepare()");
        }
示例#2
0
        /// <summary>
        /// Prepares all active scripts for action.
        /// </summary>
        /// <param name="appRef">Reference to object providing app services.</param>
        public void PrepareScripts(IApplication appRef)
        {
            List <PlSymbol> plSyms = GeneratePlSymbolList();

            if (DomainMgr == null)
            {
                AddressTranslate addrTrans = new AddressTranslate(mProject.AddrMap);
                foreach (KeyValuePair <string, IPlugin> kvp in mActivePlugins)
                {
                    IPlugin ipl = kvp.Value;
                    ipl.Prepare(appRef, mProject.FileData, addrTrans);
                    if (ipl is IPlugin_SymbolList)
                    {
                        ((IPlugin_SymbolList)ipl).UpdateSymbolList(plSyms);
                    }
                }
            }
            else
            {
                CheckHealth();
                int spanLength;
                List <AddressMap.AddressMapEntry> addrEnts =
                    mProject.AddrMap.GetEntryList(out spanLength);
                // TODO: if Prepare() throws an exception, we should catch it and report
                //   it to the user.
                DomainMgr.PluginMgr.PreparePlugins(appRef, spanLength, addrEnts, plSyms);
            }
        }
        public void Prepare(IApplication appRef, byte[] fileData, AddressTranslate addrTrans)
        {
            mAppRef   = appRef;
            mFileData = fileData;

            mAppRef.DebugLog("InlineNullStringHandler(id=" +
                             AppDomain.CurrentDomain.Id + "): prepare()");
        }
示例#4
0
        public void Prepare(IApplication appRef, byte[] fileData, AddressTranslate addrTrans)
        {
            mAppRef   = appRef;
            mFileData = fileData;

            mAppRef.DebugLog("SOS(id=" + AppDomain.CurrentDomain.Id + "): prepare()");
            //System.Diagnostics.Debugger.Break();
        }
示例#5
0
        public void Prepare(IApplication appRef, byte[] fileData, AddressTranslate addrTrans)
        {
            mAppRef   = appRef;
            mFileData = fileData;

            mAppRef.DebugLog("BadTest(id=" + AppDomain.CurrentDomain.Id + "): prepare()");

            // The behavior should be either "found" or "not found" depending on whether or
            // not the security sandbox is enabled.  The output is visible in the analyzer
            // output window.
            mAppRef.DebugLog("Testing file access...");
            string testDir = @"C:\";

            if (Directory.Exists(testDir))
            {
                mAppRef.DebugLog("Found " + testDir);
            }
            else
            {
                mAppRef.DebugLog("No such file " + testDir);
            }
        }
示例#6
0
        /// <summary>
        /// Prepares all active scripts for action.
        /// </summary>
        /// <param name="appRef">Reference to object providing app services.</param>
        public void PrepareScripts(IApplication appRef)
        {
            List <PlSymbol> plSyms = GeneratePlSymbolList();

            if (DomainMgr == null)
            {
                AddressTranslate addrTrans = new AddressTranslate(mProject.AddrMap);
                foreach (KeyValuePair <string, IPlugin> kvp in mActivePlugins)
                {
                    IPlugin ipl = kvp.Value;
                    ipl.Prepare(appRef, mProject.FileData, addrTrans);
                    if (ipl is IPlugin_SymbolList)
                    {
                        ((IPlugin_SymbolList)ipl).UpdateSymbolList(plSyms);
                    }
                }
            }
            else
            {
                List <AddressMap.AddressMapEntry> addrEnts = mProject.AddrMap.GetEntryList();
                DomainMgr.PluginMgr.PreparePlugins(appRef, addrEnts, plSyms);
            }
        }
示例#7
0
 // IPlugin
 public void Prepare(IApplication appRef, byte[] fileData, AddressTranslate addrTrans)
 {
     mAppRef   = appRef;
     mFileData = fileData;
 }
示例#8
0
 // IPlugin
 public void Unprepare()
 {
     mAppRef    = null;
     mFileData  = null;
     mAddrTrans = null;
 }