Skip to content

Commit

Permalink
DCS alignment to 4.8 with schema support (#71752)
Browse files Browse the repository at this point in the history
* Fix Private.Xml solution broken by #70706.

* Align DCS with 4.8 implementation - minus schema import/export.

* External DCS Schema support groundwork. Before DC-tree work and other public APIs.

* Added public APIs, but not the DataContract tree yet.

* All APIs in.

* Cleanup.

* Addressed some nits and PR feedback on API.

* API nit, more PR feedback.

* Fix HasRoot hiding issue.

* Add basic schema tests. Fix DataMember bug.

* Add /// comments for new schema project.

* Fixing bad format in xml comment.

* Skip import test on Wasm.

* Obsolete old half-coded schema exporter.

* Add obsolete attribute in ref project as well.

* Removing obsolete for now, since it appears Syndication depends on old class.

* Fix the DCJS ref project.

* API cleanup.

* Project file cleanup

* Fix mono issue with reflection access to non-public private fields.

* Addressing feedback from API review.

* Port NetFx Export/Import test suites to Serializer test projects.

* Fix bugs found by newly ported tests.

* Account for different newline sizes on different platforms.

* Skip flaky test on wasm for now.

* Non-draft PR feedback.

* Change DC.Members API. Drop KVP shennanigans.

* More PR feedback.

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
  • Loading branch information
StephenMolloy and ViktorHofer authored Aug 13, 2022
1 parent bff7c3d commit 802bbbd
Show file tree
Hide file tree
Showing 140 changed files with 15,028 additions and 2,888 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(NetCoreAppCurrent)</TargetFramework>
<NoWarn>$(NoWarn);1634;1691;649</NoWarn>
Expand All @@ -15,11 +15,11 @@
</PropertyGroup>

<ItemGroup>
<Compile Include="$(CommonPath)System\NotImplemented.cs"
Link="Common\System\NotImplemented.cs" />
<Compile Include="$(CommonPath)System\HexConverter.cs"
Link="Common\System\HexConverter.cs" />
<Compile Include="$(CommonPath)System\NotImplemented.cs" Link="Common\System\NotImplemented.cs" />
<Compile Include="$(CommonPath)System\HexConverter.cs" Link="Common\System\HexConverter.cs" />
<Compile Include="$(RuntimeSerializationSources)\AccessorBuilder.cs" />
<Compile Include="$(RuntimeSerializationSources)\Attributes.cs" />
<Compile Include="$(RuntimeSerializationSources)\BitFlagsGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\CodeGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\ClassDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\CollectionDataContract.cs" />
Expand All @@ -29,44 +29,56 @@
<Compile Include="$(RuntimeSerializationSources)\DictionaryGlobals.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractResolver.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSerializer.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSerializerExtensions.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSerializerSettings.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSet.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSurrogateCaller.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataMember.cs" />
<Compile Include="$(RuntimeSerializationSources)\EnumDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\ExportOptions.cs" />
<Compile Include="$(RuntimeSerializationSources)\ExtensionDataObject.cs" />
<Compile Include="$(RuntimeSerializationSources)\ExtensionDataReader.cs" />
<Compile Include="$(RuntimeSerializationSources)\Globals.cs" />
<Compile Include="$(RuntimeSerializationSources)\GenericParameterDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\HybridObjectCache.cs" />
<Compile Include="$(RuntimeSerializationSources)\ObjectToIdCache.cs" />
<Compile Include="$(RuntimeSerializationSources)\IExtensibleDataObject.cs" />
<Compile Include="$(RuntimeSerializationSources)\KnownTypeDataContractResolver.cs" />
<Compile Include="$(RuntimeSerializationSources)\MemoryStreamAdapter.cs" />
<Compile Include="$(RuntimeSerializationSources)\ObjectReferenceStack.cs" />
<Compile Include="$(RuntimeSerializationSources)\ObjectToIdCache.cs" />
<Compile Include="$(RuntimeSerializationSources)\PrimitiveDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\ReflectionClassWriter.cs" />
<Compile Include="$(RuntimeSerializationSources)\ReflectionReader.cs" />
<Compile Include="$(RuntimeSerializationSources)\ReflectionXmlFormatReader.cs" />
<Compile Include="$(RuntimeSerializationSources)\ReflectionXmlFormatWriter.cs" />
<Compile Include="$(RuntimeSerializationSources)\SchemaExporter.cs" />
<Compile Include="$(RuntimeSerializationSources)\SchemaHelper.cs" />
<Compile Include="$(RuntimeSerializationSources)\SchemaImporter.cs" />
<Compile Include="$(RuntimeSerializationSources)\ScopedKnownTypes.cs" />
<Compile Include="$(RuntimeSerializationSources)\SerializationOption.cs" />
<Compile Include="$(RuntimeSerializationSources)\SpecialTypeDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\SurrogateDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlFormatGeneratorStatics.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlFormatReaderGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlFormatWriterGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializer.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerContext.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerWriteContext.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerReadContext.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerReadContextComplex.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerWriteContext.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerWriteContextComplex.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlReaderDelegator.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlSerializableReader.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlSerializableServices.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlSerializableWriter.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlWriterDelegator.cs" />
<Compile Include="$(RuntimeSerializationSources)\SerializationMode.cs" />
<Compile Include="$(RuntimeSerializationSources)\SpecialTypeDataContract.cs" />
<Compile Include="$(RuntimeSerializationSources)\TypeCode.cs" />
<Compile Include="$(RuntimeSerializationSources)\KnownTypeDataContractResolver.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerReadContextComplex.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlObjectSerializerWriteContextComplex.cs" />
<Compile Include="$(RuntimeSerializationSources)\BitFlagsGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSurrogateCaller.cs" />
<Compile Include="$(RuntimeSerializationSources)\DataContractSerializerExtensions.cs" />
<Compile Include="$(RuntimeSerializationSources)\XmlSerializableServices.cs" />
<Compile Include="$(RuntimeSerializationSources)\XPathQueryGenerator.cs" />
<Compile Include="$(RuntimeSerializationSources)\XsdDataContractExporter.cs" />
<Compile Include="$(XmlSources)\ArrayHelper.cs" />
<Compile Include="$(XmlSources)\BytesWithOffset.cs" />
<Compile Include="$(XmlSources)\XmlDictionaryAsyncCheckWriter.cs" />
<Compile Include="$(XmlSources)\IFragmentCapableXmlDictionaryWriter.cs" />
<Compile Include="$(XmlSources)\IStreamProvider.cs" />
<Compile Include="$(XmlSources)\IXmlDictionary.cs" />
<Compile Include="$(XmlSources)\PrefixHandle.cs" />
Expand All @@ -81,6 +93,7 @@
<Compile Include="$(XmlSources)\XmlBinaryWriter.cs" />
<Compile Include="$(XmlSources)\XmlBinaryWriterSession.cs" />
<Compile Include="$(XmlSources)\XmlBufferReader.cs" />
<Compile Include="$(XmlSources)\XmlCanonicalWriter.cs" />
<Compile Include="$(XmlSources)\XmlConverter.cs" />
<Compile Include="$(XmlSources)\XmlDictionary.cs" />
<Compile Include="$(XmlSources)\XmlDictionaryWriter.cs" />
Expand All @@ -89,66 +102,50 @@
<Compile Include="$(XmlSources)\XmlDictionaryString.cs" />
<Compile Include="$(XmlSources)\XmlExceptionHelper.cs" />
<Compile Include="$(XmlSources)\XmlNodeWriter.cs" />
<Compile Include="$(XmlSources)\XmlSigningNodeWriter.cs" />
<Compile Include="$(XmlSources)\XmlStreamNodeWriter.cs" />
<Compile Include="$(XmlSources)\XmlUTF8TextReader.cs" />
<Compile Include="$(XmlSources)\XmlUTF8TextWriter.cs" />
<Compile Include="$(XmlSources)\EncodingStreamWrapper.cs" />
<Compile Include="$(TextSources)\Base64Encoding.cs" />
<Compile Include="$(TextSources)\SurrogateChar.cs" />
<Compile Include="$(TextSources)\BinHexEncoding.cs" />
<Compile Include="$(JsonSources)\ByteArrayHelperWithString.cs" />
<Compile Include="$(JsonSources)\DataContractJsonSerializer.cs" />
<Compile Include="$(JsonSources)\DataContractJsonSerializerExtensions.cs" />
<Compile Include="$(JsonSources)\DataContractJsonSerializerSettings.cs" />
<Compile Include="$(JsonSources)\DateTimeFormat.cs" />
<Compile Include="$(JsonSources)\EmitTypeInformation.cs" />
<Compile Include="$(JsonSources)\IXmlJsonReaderInitializer.cs" />
<Compile Include="$(JsonSources)\IXmlJsonWriterInitializer.cs" />
<Compile Include="$(JsonSources)\JsonByteArrayDataContract.cs" />
<Compile Include="$(JsonSources)\JsonClassDataContract.cs" />
<Compile Include="$(JsonSources)\JsonCollectionDataContract.cs" />
<Compile Include="$(JsonSources)\JsonDataContract.cs" />
<Compile Include="$(JsonSources)\JsonEncodingStreamWrapper.cs" />
<Compile Include="$(JsonSources)\JsonEnumDataContract.cs" />
<Compile Include="$(JsonSources)\JsonFormatWriterGenerator.cs" />
<Compile Include="$(JsonSources)\JsonFormatGeneratorStatics.cs" />
<Compile Include="$(JsonSources)\JsonFormatReaderGenerator.cs" />
<Compile Include="$(JsonSources)\JsonFormatWriterGenerator.cs" />
<Compile Include="$(JsonSources)\JsonGlobals.cs" />
<Compile Include="$(JsonSources)\JsonNodeType.cs" />
<Compile Include="$(JsonSources)\JsonObjectDataContract.cs" />
<Compile Include="$(JsonSources)\JsonQNameDataContract.cs" />
<Compile Include="$(JsonSources)\JsonReaderDelegator.cs" />
<Compile Include="$(JsonSources)\JsonReaderWriterFactory.cs" />
<Compile Include="$(JsonSources)\JsonWriterDelegator.cs" />
<Compile Include="$(JsonSources)\JsonStringDataContract.cs" />
<Compile Include="$(JsonSources)\JsonUriDataContract.cs" />
<Compile Include="$(JsonSources)\JsonXmlDataContract.cs" />
<Compile Include="$(JsonSources)\JsonGlobals.cs" />
<Compile Include="$(JsonSources)\XmlObjectSerializerReadContextComplexJson.cs" />
<Compile Include="$(JsonSources)\XmlObjectSerializerWriteContextComplexJson.cs" />
<Compile Include="$(JsonSources)\DateTimeFormat.cs" />
<Compile Include="$(JsonSources)\EmitTypeInformation.cs" />
<Compile Include="$(JsonSources)\DataContractJsonSerializerSettings.cs" />
<Compile Include="$(JsonSources)\ReflectionJsonFormatReader.cs" />
<Compile Include="$(JsonSources)\ReflectionJsonFormatWriter.cs" />
<Compile Include="$(JsonSources)\XmlJsonReader.cs" />
<Compile Include="$(JsonSources)\XmlJsonWriter.cs" />
<Compile Include="$(JsonSources)\JsonReaderWriterFactory.cs" />
<Compile Include="$(JsonSources)\JsonNodeType.cs" />
<Compile Include="$(JsonSources)\IXmlJsonReaderInitializer.cs" />
<Compile Include="$(JsonSources)\IXmlJsonWriterInitializer.cs" />
<Compile Include="$(JsonSources)\ByteArrayHelperWithString.cs" />
<Compile Include="$(JsonSources)\JsonEncodingStreamWrapper.cs" />
<Compile Include="$(JsonSources)\JsonFormatGeneratorStatics.cs" />
<Compile Include="System\Runtime\Serialization\AccessorBuilder.cs" />
<Compile Include="$(JsonSources)\XmlObjectSerializerReadContextComplexJson.cs" />
<Compile Include="$(JsonSources)\XmlObjectSerializerWriteContextComplexJson.cs" />
<Compile Include="$(CommonPath)System\CodeDom\CodeTypeReference.cs" />
<Compile Include="$(CommonPath)System\CodeDom\CodeTypeReferenceCollection.cs" />
<Compile Include="$(CommonPath)System\CodeDom\CodeObject.cs" />
<Compile Include="System\Runtime\Serialization\DataContractSet.cs" />
<Compile Include="System\Runtime\Serialization\ExportOptions.cs" />
<Compile Include="System\Runtime\Serialization\IExtensibleDataObject.cs" />
<Compile Include="System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs" />
<Compile Include="System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs" />
<Compile Include="System\Runtime\Serialization\MemoryStreamAdapter.cs" />
<Compile Include="System\Runtime\Serialization\ReflectionFeature.cs" />
<Compile Include="System\Runtime\Serialization\ReflectionReader.cs" />
<Compile Include="System\Runtime\Serialization\ReflectionClassWriter.cs" />
<Compile Include="System\Runtime\Serialization\ReflectionXmlFormatReader.cs" />
<Compile Include="System\Runtime\Serialization\ReflectionXmlFormatWriter.cs" />
<Compile Include="System\Runtime\Serialization\SchemaHelper.cs" />
<Compile Include="System\Runtime\Serialization\SerializationOption.cs" />
<Compile Include="System\Runtime\Serialization\XPathQueryGenerator.cs" />
<Compile Include="System\Runtime\Serialization\XsdDataContractExporter.cs" />
<Compile Include="System\Runtime\Serialization\SurrogateDataContract.cs" />
<Compile Include="System\Xml\IFragmentCapableXmlDictionaryWriter.cs" />
<Compile Include="System\Xml\XmlCanonicalWriter.cs" />
<Compile Include="System\Xml\XmlSigningNodeWriter.cs" />
</ItemGroup>

<ItemGroup>
Expand All @@ -168,6 +165,7 @@
<Reference Include="System.Text.Encoding.Extensions" />
<Reference Include="System.Text.RegularExpressions" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Xml.ReaderWriter" />
<Reference Include="System.Xml.XDocument" />
<Reference Include="System.Xml.XmlSerializer" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.DataContracts;
using System.Text;
using System.Threading.Tasks;

Expand Down
Loading

0 comments on commit 802bbbd

Please sign in to comment.