private static void ReadType(TypeDefinition type)
 {
     ImmediateModuleReader.ReadGenericParameters(type);
     if (type.HasInterfaces)
     {
         ImmediateModuleReader.Read(type.Interfaces);
     }
     if (type.HasNestedTypes)
     {
         ImmediateModuleReader.ReadTypes(type.NestedTypes);
     }
     if (type.HasLayoutInfo)
     {
         ImmediateModuleReader.Read(type.ClassSize);
     }
     if (type.HasFields)
     {
         ImmediateModuleReader.ReadFields(type);
     }
     if (type.HasMethods)
     {
         ImmediateModuleReader.ReadMethods(type);
     }
     if (type.HasProperties)
     {
         ImmediateModuleReader.ReadProperties(type);
     }
     if (type.HasEvents)
     {
         ImmediateModuleReader.ReadEvents(type);
     }
     ImmediateModuleReader.ReadSecurityDeclarations(type);
     ImmediateModuleReader.ReadCustomAttributes(type);
 }