Example #1
0
 void InitNestedTypes(IKVM.Reflection.Type typeDefinition, IUnresolvedTypeDefinition declaringTypeDefinition, ICollection<IUnresolvedTypeDefinition> nestedTypes)
 {
     foreach (var nestedTypeDef in typeDefinition.GetNestedTypes (bindingFlags)) {
         if (IncludeInternalMembers
             || nestedTypeDef.IsNestedPublic
             || nestedTypeDef.IsNestedFamily
             || nestedTypeDef.IsNestedFamORAssem)
         {
             string name = nestedTypeDef.Name;
             int pos = name.LastIndexOf('/');
             if (pos > 0)
                 name = name.Substring(pos + 1);
             name = ReflectionHelper.SplitTypeParameterCountFromReflectionName(name);
             var nestedType = new DefaultUnresolvedTypeDefinition(declaringTypeDefinition, name);
             InitTypeParameters(nestedTypeDef, nestedType.TypeParameters);
             nestedTypes.Add(nestedType);
             InitTypeDefinition(nestedTypeDef, nestedType);
         }
     }
 }