From 2d4a3f0cc014d52641f0e09469a9dccc964c4cc7 Mon Sep 17 00:00:00 2001 From: Henrik Fuchs Date: Thu, 11 May 2017 09:38:33 +0200 Subject: [PATCH] Reverted some changes --- XmlSchemaClassGenerator/Generator.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/XmlSchemaClassGenerator/Generator.cs b/XmlSchemaClassGenerator/Generator.cs index c327d19b..bece22f1 100644 --- a/XmlSchemaClassGenerator/Generator.cs +++ b/XmlSchemaClassGenerator/Generator.cs @@ -778,7 +778,6 @@ private IEnumerable CreatePropertiesForElements(Uri source, TypeM { var properties = new List(); var order = 0; - var count = 0; foreach (var item in items) { PropertyModel property = null; @@ -809,7 +808,6 @@ private IEnumerable CreatePropertiesForElements(Uri source, TypeM } var propertyName = ToTitleCase(element.QualifiedName.Name); - propertyName = CreatePrefix(count, propertyName); if (propertyName == typeModel.Name) { propertyName += "Property"; // member names cannot be the same as their enclosing type @@ -819,8 +817,7 @@ private IEnumerable CreatePropertiesForElements(Uri source, TypeM { OwningType = typeModel, XmlSchemaName = element.QualifiedName, - Name = propertyName, // TODO: Name = originalName, - // TODO: OrderName = propertyName, + Name = propertyName, Type = CreateTypeModel(source, element.ElementSchemaType, elementQualifiedName), IsNillable = element.IsNillable, IsNullable = item.MinOccurs < 1.0m, @@ -878,22 +875,11 @@ private IEnumerable CreatePropertiesForElements(Uri source, TypeM properties.Add(property); } - - count++; } return properties; } - private static string CreatePrefix(int count, string propertyName) - { - if ((char)('a' + count) <= 'z') - propertyName = (char)('a' + count) + "_" + propertyName; - else - propertyName = "z" + (char)('a' + (count - 26)) + "_" + propertyName; - return propertyName; - } - private NamespaceModel CreateNamespaceModel(Uri source, XmlQualifiedName qualifiedName) { NamespaceModel namespaceModel = null;