public override void GenerateConstructorCode(ClrBasePropertyInfo property) { if (flatChoice && !hasDuplicateType && property.ContentType != ContentType.WildCardProperty) { ClrBasePropertyInfo prevProperty = null; string propertyReturnType = property.ClrTypeName; if (propertyTypeNameTable.TryGetValue(propertyReturnType, out prevProperty)) { hasDuplicateType = true; return; } else { propertyTypeNameTable.Add(propertyReturnType, property); } if (choiceConstructors == null) { choiceConstructors = new List <CodeConstructor>(); } CodeConstructor choiceConstructor = CodeDomHelper.CreateConstructor(MemberAttributes.Public); property.AddToConstructor(choiceConstructor); choiceConstructors.Add(choiceConstructor); } }
public override void GenerateConstructorCode(ClrBasePropertyInfo property) { if (flatChoice && !hasDuplicateType && property.ContentType != ContentType.WildCardProperty) { ClrBasePropertyInfo prevProperty = null; string propertyReturnType = property.ClrTypeName; if (propertyTypeNameTable.TryGetValue(propertyReturnType, out prevProperty)) { hasDuplicateType = true; return; } else { propertyTypeNameTable.Add(propertyReturnType, property); } if (choiceConstructors == null) { choiceConstructors = new List<CodeConstructor>(); } CodeConstructor choiceConstructor = CodeDomHelper.CreateConstructor(MemberAttributes.Public); property.AddToConstructor(choiceConstructor); choiceConstructors.Add(choiceConstructor); } }