// <summary> // Populates the structs and classes with fields and methods // </summary> // // This is invoked after all interfaces, structs and classes // have been defined through `ResolveTree' static public void PopulateTypes() { if (type_container_resolve_order != null) { foreach (TypeContainer tc in type_container_resolve_order) { tc.ResolveType(); } foreach (TypeContainer tc in type_container_resolve_order) { try { tc.Define(); } catch (Exception e) { throw new InternalErrorException(tc, e); } } } ArrayList delegates = root.Delegates; if (delegates != null) { foreach (Delegate d in delegates) { d.Define(); } } // // Check for cycles in the struct layout // if (type_container_resolve_order != null) { Hashtable seen = new Hashtable(); foreach (TypeContainer tc in type_container_resolve_order) { TypeManager.CheckStructCycles(tc, seen); } } }