private void ProcessGroup(GroupingInfo grouping, List <ClrAnnotation> annotations) { typeBuilder.StartGrouping(grouping); foreach (ContentInfo child in grouping.Children) { if (child.ContentType == ContentType.Property) { ClrPropertyInfo propertyInfo = child as ClrPropertyInfo; propertyInfo.UpdateTypeReference(currentFullTypeName, currentNamespace, nameMappings, CreateNestedEnumType); typeBuilder.CreateProperty(propertyInfo, annotations); } else if (child.ContentType == ContentType.WildCardProperty) { ClrWildCardPropertyInfo propertyInfo = child as ClrWildCardPropertyInfo; typeBuilder.CreateProperty(propertyInfo, annotations); } else { Debug.Assert(child.ContentType == ContentType.Grouping); ProcessGroup(child as GroupingInfo, annotations); } } typeBuilder.EndGrouping(); }