示例#1
0
        // For each of the elements in l, if the Assembly name that it
        // references hasn't been followed, then we create an AssemblyInfo
        // object for it, and add it to m_map.
        private void _traverse(IList l)
        {
            while (l.Count != 0)
            {
                Object o = l[0];
                l.Remove(o);
                AssemblyName an = (AssemblyName)o;

                IAssemblyInfo ai;
                try
                {
                    AssemblyRef assembly = m_load.LoadAssemblyName(an);
                    ai = new AssemblyInfo(assembly, l);
                }
                catch (System.Exception e)
                {
                    Trace.WriteLine("Exception while loading dependency:\n  " +
                                    e.ToString());
                    ai = new AssemblyExceptionInfo(an.FullName, e);
                }

                m_map.Add(an.FullName, ai);

                l = _minimize(l);
            }
        }
示例#2
0
        // The text of the panel is the error message -- why the
        // Assembly couldn't be loaded.
        public void Display(IAssemblyInfo ai)
        {
            Debug.Assert(ai.Error != null,
                         "No error information available for error panel.");
            AssemblyExceptionInfo aei = (AssemblyExceptionInfo)ai;

            m_reason.Text = aei.Error.Message;
        }