Ejemplo n.º 1
0
        }// NewAssembly

        void LoadAssembly()
        {
            try
            {
                AssemblyRef ar = m_al.LoadAssemblyInOtherAppDomainFrom(Page2.Filename);
                m_ev = ar.GetEvidence();
                m_al.Finished();
            }
            catch (Exception)
            {
                m_ev = null;
                m_al.Finished();
            }
        }// LoadAssembly
Ejemplo n.º 2
0
        }// onTextChange

        void NewAssembly()
        {
            CEvalAssemWizard wiz = (CEvalAssemWizard)CNodeManager.GetNode(m_iCookie);

            try
            {
                AssemblyRef ar = m_al.LoadAssemblyInOtherAppDomainFrom(m_txtFilename.Text);
                wiz.NewEvidenceReceived(ar.GetEvidence());
                m_al.Finished();
            }
            catch (Exception)
            {
                wiz.NewEvidenceReceived(null);
                m_al.Finished();
            }
        }// NewAssembly
Ejemplo n.º 3
0
        }// HaveCurrentEvidence

        internal Evidence GetEvidence()
        {
            // If we have a thread that is doing this right now, abort
            // it.
            if (m_tEvidence != null)
            {
                m_tEvidence.Abort();
            }
            try
            {
                AssemblyRef ar = m_al.LoadAssemblyInOtherAppDomainFrom(m_txtFilename.Text);
                Evidence    e  = ar.GetEvidence();
                m_al.Finished();
                m_sEvalAssem = m_txtFilename.Text;
                return(e);
            }
            catch (Exception)
            {
                // Let's see if can can figure out what failed...
                if (File.Exists(m_txtFilename.Text) && !Fusion.isManaged(m_txtFilename.Text))
                {
                    MessageBox(CResourceStore.GetString("isNotManagedCode"),
                               CResourceStore.GetString("isNotManagedCodeTitle"),
                               MB.ICONEXCLAMATION);
                }

                else
                {
                    MessageBox(String.Format(CResourceStore.GetString("CantLoadAssembly"), m_txtFilename.Text),
                               CResourceStore.GetString("CantLoadAssemblyTitle"),
                               MB.ICONEXCLAMATION);
                }
                m_al.Finished();
                return(null);
            }
        } // GetEvidence