public static ITypeDefinition GetType(string name)
        {
            var defs = new List<ITypeDefinition>();

            ITypeDefinition def = types.Find(x => x.FullName == name);

            if (def != null) defs.Add(def);

            foreach (Assembly a in assemblies)
            {
                try
                {
                    Type t = a.GetType(name);

                    if (t != null)
                    {
                        def = new ImportedType(t);
                        defs.Add(def);
                    }
                }
                catch (Exception)
                {
                }
            }

            if (defs.Count > 1)
                throw new Exception("Ambiguous types.");

            return def;
        }
 public ImportedField(FieldInfo field, ImportedType parent)
     : base(field, parent)
 {
 }
 public ImportedMethod(MethodInfo method, ImportedType parent)
     : base(method, parent)
 {
 }
 public ImportedMember(MemberInfo member, ImportedType parent)
 {
     this.member = member;
     declaringType = parent;
 }
        public ITypeDefinition[] GetNestedTypes()
        {
            if (types == null)
            {
                types = new List<ITypeDefinition>();

                foreach (Type t in GetTypeInfo().GetNestedTypes())
                {
                    ITypeDefinition type = new ImportedType(t, this);
                    types.Add(type);
                }
            }

            return types.ToArray();
        }
 public ImportedType(Type type, ImportedType parent)
     : base(type, parent)
 {
     Initialize();
 }