Skip to content

Commit

Permalink
Fix sonarcloud issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mganss committed Jul 2, 2024
1 parent 3db1ee0 commit 6d01dde
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion XmlSchemaClassGenerator.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ A file name may be given by appending a pipe sign (|) followed by a file name (l
DateTimeWithTimeZone = dateTimeWithTimeZone,
EntityFramework = entityFramework,
GenerateInterfaces = interfaces,
NamingScheme = namingScheme != null ? namingScheme.Value : (pascal ? NamingScheme.PascalCase : NamingScheme.Direct),
AssemblyVisible = assembly,
CollectionType = collectionType,
CollectionImplementationType = collectionImplementationType,
Expand Down Expand Up @@ -266,6 +265,15 @@ A file name may be given by appending a pipe sign (|) followed by a file name (l
AllowDtdParse = allowDtdParse,
};

if (namingScheme != null)
{
generator.NamingScheme = namingScheme.Value;
}
else
{
generator.NamingScheme = pascal ? NamingScheme.PascalCase : NamingScheme.Direct;
}

if (nameSubstituteMap.Any())
{
generator.NamingProvider = new SubstituteNamingProvider(nameSubstituteMap);
Expand Down

0 comments on commit 6d01dde

Please sign in to comment.