Sgen: Added 'default-namespace' argument (#46500)
authorTal Aloni <tal.aloni.il@gmail.com>
Fri, 6 Aug 2021 22:48:07 +0000 (01:48 +0300)
committerGitHub <noreply@github.com>
Fri, 6 Aug 2021 22:48:07 +0000 (15:48 -0700)
commitf26a1438b933aef75993d5245f2787cbfb90e74f
tree1c28f6c9f0133708271dfea06c817fd5fc8ad691
parent3caf2f06da38347fee9fe24faa78ada2ed3f147c
Sgen: Added 'default-namespace' argument (#46500)

* Sgen: Added an optional 'default-namespace' argument

The .NET runtime support loading pre-generated assemblies according to both the type & defaultNamespace when creating an XmlSerializer instance,
Given that, it is extremely useful to have the ability to generate an assembly for different defaultNamespace.

* Added defaultNamespace argument to XmlReflectionImporter

* Prevent setting default-namespace twice

* Added missing using statement
src/libraries/Microsoft.XmlSerializer.Generator/src/Sgen.cs