Skip to content

Commit

Permalink
Fix setting NamingProvider when NamingScheme is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ganss committed Jul 17, 2019
1 parent 44f3419 commit f9c83a2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion XmlSchemaClassGenerator/GeneratorConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,23 @@ public GeneratorConfiguration()
/// Use XElement instead of XmlElement for Any nodes?
/// </summary>
public bool UseXElementForAny { get; set; }

private NamingScheme namingScheme;

/// <summary>
/// How are the names of the created properties changed?
/// </summary>
public NamingScheme NamingScheme { get; set; }
public NamingScheme NamingScheme
{
get => namingScheme;

set
{
namingScheme = value;
NamingProvider = new NamingProvider(namingScheme);
}
}

/// <summary>
/// Emit the "Order" attribute value for XmlElementAttribute to ensure the correct order
/// of the serialized XML elements.
Expand Down

0 comments on commit f9c83a2

Please sign in to comment.