This XObjectsCore library provides an API for generated code and projects that use said generated code. Use this library in shipping apps + libraries; use LinqToXsdCore to generate code. Original Authors: Microsoft Corporation.
$ dotnet add package XObjectsCoreNuget packages:
XTypedElement list.xs:NCName type is used in a schema.value?.ToString() on a property value setter when the property type is nullable.Nuget packages:
<SplitCodeFiles By="Namespace" /> now works, but it requires a new File filename attribute on every <Namespace />. If you had set this unimplemented option in your config before upgrading, you will get an error and need to modify your config!<NullableReferences> option should now be set inside <CodeGeneration>. It still works in <Configuration> for backward compatibility.<UseDateOnly> and <UseTimeOnly> inside <CodeGeneration>. When true, .net 6 DateOnly and TimeOnly types will be generated for xs:date and xs:time properties.XObjectsCodeGen directly (as a library), a few public APIs have changed to support splitting files by namespace. There is no breaking change for users of LinqToXsd tool and runtime.XObjectsCoreNuget packages:
NullableReferences element not appearing in generated config files.Nuget packages:
dotnet tool; it fixes a bug whereby a class constructor was being generated for classes for XSD elements, whose schema types are simple types, and said simple types are defined as enum restrictions on string types (like NMToken or xs:string) and the class constructor accepted a value for the enum type. The functional constructor now converts from the given string value to the inner enum type by parsing the string value and convert it to it's proper inner enum type (stored in the TypedValue property).Nuget packages:
dotnet tool; it re-enables .NET Core 3.1 as a runtime target, and also adds .NET 5, alongside .NET 6 that was added in 3.3.0.Nuget packages:
Nuget packages:
Nuget packages:
XName instantiations in generated code is now greatly reduced (see GitHub PR23).Nuget packages:
Nuget packages:
Nuget packages:
BuildWrapperDictionary() method generated inside the LinqToXsdTypeManager; it adds typeof(void) expressions, which breaks untyped XElement type conversion. Previous (and correct) behavior was to add typeof(T) expressions where T was the generated complex or global element type.AnyAtomicType resulted in an error.Nuget packages:
Nuget packages:
Added XTypedElementEqualityComparer and XTypedElementDeepEqualityComparer classes that implement IEqualityComparer{T} for the XTypedElement class.
Nuget packages:
Modified the behaviour of retrieving the value of an attribute, when the schema type is anyAtomicType (which is the default for attributes when no type is given). The value literal is now returned as a string (pre-existing behaviour would throw an exception saying that anyAtomicType is not a supported conversion to the CLR type 'string').
Nuget packages:
Nuget packages:
Nuget packages:
Nuget packages:
Nuget packages:
Fixes a bug that caused XTypedElement.Clone() to fail when generated code had the internal visibility modifier. This manifested in the CLI tool, when attempting to use it to generate an example configuration file linqtoxsd config 'file.xsd' -e.