Skip to content

Commit

Permalink
Merge pull request #1 from mganss/master
Browse files Browse the repository at this point in the history
Update from master fork
  • Loading branch information
las-nsc authored Jun 7, 2022
2 parents ab977dd + 50adb75 commit eea0fe0
Show file tree
Hide file tree
Showing 7 changed files with 565 additions and 1,015 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ Options:
(default is true)
--nc, --netCore generate .NET Core specific code that might not
work with .NET Framework (default is false)
--nr, --nullableReferenceAttributes
generate attributes for nullable reference types (
default is false)
--ar, --useArrayItemAttribute
use ArrayItemAttribute for sequences with single
elements (default is true)
Expand Down
2 changes: 1 addition & 1 deletion XmlSchemaClassGenerator.Tests/XmlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,7 @@ void assertNullable(string typename, bool nullable)
Assert.Equal(nullable, hasMaybeNullAttribute);
}
assertNullable("Test.ElementReferenceNullable", true);
assertNullable("Test.ElementReferenceList", true);
assertNullable("Test.ElementReferenceList", false);
assertNullable("Test.ElementReferenceNonNullable", false);
assertNullable("Test.AttributeReferenceNullable", true);
assertNullable("Test.AttributeReferenceNonNullable", false);
Expand Down
49 changes: 49 additions & 0 deletions XmlSchemaClassGenerator.Tests/xsd/simple/recursive.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<schema id="Exceptions"
xmlns="http://www.w3.org/2001/XMLSchema"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://schemas.nsc.co.uk/exceptions"
xmlns:local="http://schemas.nsc.co.uk/exceptions">

<complexType name="ExceptionBase">
<attribute name="Message"/>
</complexType>

<complexType name="ArgumentNullException" >
<complexContent>
<extension base="local:ExceptionBase">
<attribute name="Argument"/>
</extension>
</complexContent>
</complexType>

<complexType name="InvalidOperationException" >
<complexContent>
<extension base="local:ExceptionBase">
<attribute name="Operation"/>
</extension>
</complexContent>
</complexType>

<complexType name="StackOverflowException" >
<complexContent>
<extension base="local:ExceptionBase">
<attribute name="Method"/>
</extension>
</complexContent>
</complexType>

<element name="Exception" type="local:ExceptionBase" abstract="true" substitutionGroup="local:Exception"/>
<element name="ArgumentNull" type="local:ArgumentNullException" substitutionGroup="local:Exception"/>
<element name="InvalidOperation" type="local:InvalidOperationException" substitutionGroup="local:Exception"/>
<element name="StackOverflow" type="local:StackOverflowException" substitutionGroup="local:Exception"/>

<element name="Exceptions">
<complexType>
<sequence>
<element minOccurs="0" maxOccurs="unbounded" ref="local:Exception"/>
</sequence>
</complexType>
</element>
</schema>
Loading

0 comments on commit eea0fe0

Please sign in to comment.