-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for XSD nillable and xsi:nil="true" (#60)
* WIP * Completed typing and getters WIP: needs runtime support for setters * Fix "hides parent InnerException property" C# warning * xsi:nil support for setting scalars WIP: setting collections not supported yet * XList support for nil values WIP: codgen must be modified to take advantage of new option * Refactor XNil apis and fix a few bugs * Codegen nillable lists instances Fix derived XList not supporting XNil.Value properly * Fix overriden XList.Add nil support * First test + Fix prevent xsi:type=anyType * More tests and some fixes * Added polysharp to XObjectsTests. Consolidated versions across the solution. * Added global.json file for controlling which version of the .NET SDK to use. * Revert "Added global.json file for controlling which version of the .NET SDK to use." This reverts commit 9b1e83f. * Lang version set to preview. * Incremented version. --------- Co-authored-by: Muhammad Miftah <mamift@gmail.com> Co-authored-by: Muhammad Miftah <mamift@users.noreply.github.com>
- Loading branch information
1 parent
4faf8d2
commit 3577756
Showing
27 changed files
with
1,504 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<xs:schema | ||
targetNamespace="http://linqtoxsd.schemas.org/test/nil-test.xsd" | ||
xmlns="http://linqtoxsd.schemas.org/test/nil-test.xsd" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" | ||
> | ||
<xs:complexType name="ValueHolder"> | ||
<xs:sequence> | ||
<xs:element name="Value" type="xs:string" /> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:element name="Root"> | ||
<xs:complexType> | ||
<xs:sequence> | ||
<xs:element name="RequiredRef" type="xs:string" nillable="true" /> | ||
<xs:element name="RequiredVal" type="xs:int" nillable="true" /> | ||
<xs:element name="RequiredEl" type="ValueHolder" nillable="true" /> | ||
<xs:element name="OptionalRef" type="xs:string" minOccurs="0" nillable="true" /> | ||
<xs:element name="OptionalVal" type="xs:int" minOccurs="0" nillable="true" /> | ||
<xs:element name="OptionalEl" type="ValueHolder" minOccurs="0" nillable="true" /> | ||
<xs:element name="ListRef" type="xs:string" minOccurs="0" maxOccurs="unbounded" nillable="true" /> | ||
<xs:element name="ListVal" type="xs:int" minOccurs="0" maxOccurs="unbounded" nillable="true" /> | ||
<xs:element name="ListEl" type="ValueHolder" minOccurs="0" maxOccurs="unbounded" nillable="true" /> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Configuration xmlns="http://www.microsoft.com/xml/schema/linq"> | ||
<CodeGeneration> | ||
<NullableReferences>true</NullableReferences> | ||
</CodeGeneration> | ||
<Namespaces> | ||
<Namespace DefaultVisibility="public" Schema="http://linqtoxsd.schemas.org/test/nil-test.xsd" Clr="LinqToXsd.Schemas.Test.NilTest" /> | ||
</Namespaces> | ||
<Validation> | ||
<VerifyRequired>false</VerifyRequired> | ||
</Validation> | ||
<Transformation> | ||
<Deanonymize strict="false" /> | ||
</Transformation> | ||
</Configuration> |
Oops, something went wrong.