diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2015-04-01 12:08:15 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2015-04-24 08:36:51 +0300 |
commit | 569890717a693f0f11c980a82aa7e09212fe4e9a (patch) | |
tree | 82f8eebae9826434bffb8a75e3497535039d8272 /mcs/class/System.Runtime.Serialization | |
parent | 1b419b89757758f85adfd0f9d8b223552044f97e (diff) |
[S.R.Serialization] switch to (non-emit) reflection-based implementation stubs.
The new code is to implement reflection (non-emit) based serialization
so that it works on iOS.
Actually I _totally_ switched to this new implementation because dynamic
method based implementation also doesn't work fine, even on desktop
(due to invocation failure on internal methods, it seems that our dynamic
method needs some bugfixes).
The new methods with NotImplementedException in new classes need to be
implemented.
Diffstat (limited to 'mcs/class/System.Runtime.Serialization')
7 files changed, 126 insertions, 2 deletions
diff --git a/mcs/class/System.Runtime.Serialization/Makefile b/mcs/class/System.Runtime.Serialization/Makefile index 877731a3e4a..468cd9f4104 100644 --- a/mcs/class/System.Runtime.Serialization/Makefile +++ b/mcs/class/System.Runtime.Serialization/Makefile @@ -8,8 +8,8 @@ LIBRARY = System.Runtime.Serialization.dll LIB_REFS = System System.Xml System.Core System.ServiceModel.Internals SMDiagnostics LIB_MCS_FLAGS = \ -unsafe \ + -d:NO_DYNAMIC_CODEGEN \ /nowarn:168,169,219,414 \ - -d:USE_REFEMIT \ $(RESOURCE_FILES:%=/resource:%) ifneq (2.1, $(FRAMEWORK_VERSION)) diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatReaderGenerator_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatReaderGenerator_static.cs new file mode 100644 index 00000000000..35bc69ef471 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatReaderGenerator_static.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace System.Runtime.Serialization.Json +{ + internal partial class JsonFormatReaderGenerator + { + partial class CriticalHelper + { + public JsonFormatClassReaderDelegate GenerateClassReader(ClassDataContract classContract) + { + throw new NotImplementedException (); + } + public JsonFormatCollectionReaderDelegate GenerateCollectionReader(CollectionDataContract collectionContract) + { + throw new NotImplementedException (); + } + public JsonFormatGetOnlyCollectionReaderDelegate GenerateGetOnlyCollectionReader(CollectionDataContract collectionContract) + { + throw new NotImplementedException (); + } + } + } +} + diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatWriterGenerator_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatWriterGenerator_static.cs new file mode 100644 index 00000000000..59c6f5280f0 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/JsonFormatWriterGenerator_static.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml; + +namespace System.Runtime.Serialization.Json +{ + internal partial class JsonFormatWriterGenerator + { + partial class CriticalHelper + { + internal JsonFormatClassWriterDelegate GenerateClassWriter(ClassDataContract classContract) + { + throw new NotImplementedException (); + } + internal JsonFormatCollectionWriterDelegate GenerateCollectionWriter(CollectionDataContract collectionContract) + { + throw new NotImplementedException (); + } + } + } +} + diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlDataContract_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlDataContract_static.cs new file mode 100644 index 00000000000..6ff8070ca74 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlDataContract_static.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml; + +namespace System.Runtime.Serialization +{ + internal partial class XmlDataContract + { + internal CreateXmlSerializableDelegate GenerateCreateXmlSerializableDelegate() + { + throw new NotImplementedException (); + } + } +} + diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs new file mode 100644 index 00000000000..c2a711d6a59 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml; + +namespace System.Runtime.Serialization +{ + internal partial class XmlFormatReaderGenerator + { + partial class CriticalHelper + { + public XmlFormatClassReaderDelegate GenerateClassReader(ClassDataContract classContract) + { + throw new NotImplementedException (); + } + public XmlFormatCollectionReaderDelegate GenerateCollectionReader(CollectionDataContract collectionContract) + { + throw new NotImplementedException (); + } + public XmlFormatGetOnlyCollectionReaderDelegate GenerateGetOnlyCollectionReader(CollectionDataContract collectionContract) + { + throw new NotImplementedException (); + } + } + } +} + diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs new file mode 100644 index 00000000000..71d2af81c73 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml; + +namespace System.Runtime.Serialization +{ + internal partial class XmlFormatWriterGenerator + { + partial class CriticalHelper + { + internal XmlFormatClassWriterDelegate GenerateClassWriter(ClassDataContract classContract) + { + throw new NotImplementedException (); + } + internal XmlFormatCollectionWriterDelegate GenerateCollectionWriter(CollectionDataContract collectionContract) + { + throw new NotImplementedException (); + } + } + } +} + diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.dll.sources b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.dll.sources index 1ff345362c7..d49b1f5adb0 100644 --- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.dll.sources +++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.dll.sources @@ -8,5 +8,9 @@ ReferenceSources/FxTrace.cs ReferenceSources/SR.cs ReferenceSources/SR_missing.cs ReferenceSources/XmlExceptionHelper.cs - +ReferenceSources/JsonFormatReaderGenerator_static.cs +ReferenceSources/JsonFormatWriterGenerator_static.cs +ReferenceSources/XmlDataContract_static.cs +ReferenceSources/XmlFormatReaderGenerator_static.cs +ReferenceSources/XmlFormatWriterGenerator_static.cs |