Skip to content

Commit

Permalink
Fix Order for AnyAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrik Fuchs committed May 11, 2017
1 parent 2d4a3f0 commit 0a43907
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions XmlSchemaClassGenerator/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ private IEnumerable<CodeAttributeDeclaration> GetAttributes(bool isArray)
{
if (IsAny)
{
var anyAttribute = new CodeAttributeDeclaration(new CodeTypeReference(typeof(XmlAnyElementAttribute), Configuration.CodeTypeReferenceOptions));
var anyAttribute = new CodeAttributeDeclaration(new CodeTypeReference(typeof(XmlAnyAttributeAttribute), Configuration.CodeTypeReferenceOptions));
if (Order != null)
anyAttribute.Arguments.Add(new CodeAttributeArgument("Order", new CodePrimitiveExpression(Order.Value)));
attributes.Add(anyAttribute);
Expand All @@ -881,7 +881,10 @@ private IEnumerable<CodeAttributeDeclaration> GetAttributes(bool isArray)
{
if (IsAny)
{
attributes.Add(new CodeAttributeDeclaration(new CodeTypeReference(typeof(XmlAnyElementAttribute), Configuration.CodeTypeReferenceOptions)));
var anyAttribute = new CodeAttributeDeclaration(new CodeTypeReference(typeof(XmlAnyElementAttribute), Configuration.CodeTypeReferenceOptions));
if (Order != null)
anyAttribute.Arguments.Add(new CodeAttributeArgument("Order", new CodePrimitiveExpression(Order.Value)));
attributes.Add(anyAttribute);
}
else
{
Expand Down

0 comments on commit 0a43907

Please sign in to comment.