Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -55,7 +55,7 @@ using System.Runtime.InteropServices;
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
#if NET_2_1
#if MOBILE
[assembly: AssemblyKeyFile ("../silverlight.pub")]
#else
[assembly: AssemblyKeyFile ("../ecma.pub")]

View File

@@ -5,7 +5,7 @@ include ../../build/rules.make
RESOURCE_FILES =
LIBRARY = System.Runtime.Serialization.dll
LIB_REFS = System System.Xml System.Core System.ServiceModel.Internals SMDiagnostics
LIB_REFS = System System.Xml System.Core System.ServiceModel.Internals
LIB_MCS_FLAGS = \
-unsafe \
-d:NO_DYNAMIC_CODEGEN \
@@ -14,7 +14,7 @@ LIB_MCS_FLAGS = \
TXT_RESOURCE_STRINGS = ../referencesource/System.Runtime.Serialization/System.Runtime.Serialization.txt
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_REFS += System.Data System.Configuration
LIB_REFS += System.Data System.Configuration SMDiagnostics
LIB_MCS_FLAGS += /d:NET_3_0
else
LIB_MCS_FLAGS += /d:NO_CONFIGURATION /d:NO_SECURITY_ATTRIBUTES /d:NO_CODEDOM /d:NO_DESKTOP_SECURITY

View File

@@ -0,0 +1,7 @@
namespace System
{
static class LocalAppContextSwitches
{
public static readonly bool DoNotUseTimeZoneInfo = false;
}
}

View File

@@ -10,7 +10,6 @@ namespace System.Runtime.Serialization
using System.IO;
using System.Reflection;
using System.Runtime.Diagnostics;
using System.ServiceModel.Diagnostics;
using System.Security;
using System.Xml;
using System.Xml.Schema;
@@ -56,6 +55,11 @@ namespace System.Runtime.Serialization
return false;
}
internal static void AddDefaultXmlType(XmlSchemaSet schemas, string localName, string ns)
{
throw new NotImplementedException();
}
static bool InvokeSchemaProviderMethod(Type clrType, XmlSchemaSet schemas, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
{
xsdType = null;

View File

@@ -0,0 +1,54 @@
//
// XsdDataContractExporter_mobile.cs
//
// Authors:
// Alexander Köplinger <alexander.koeplinger@xamarin.com>
//
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Xml;
using System.Xml.Schema;
namespace System.Runtime.Serialization
{
public class XsdDataContractExporter
{
public XsdDataContractExporter () { throw new NotImplementedException (); }
public XsdDataContractExporter (XmlSchemaSet schemas) { throw new NotImplementedException (); }
public ExportOptions Options { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
public XmlSchemaSet Schemas { get { throw new NotImplementedException (); } }
public bool CanExport (ICollection<Assembly> assemblies) { throw new NotImplementedException ();}
public bool CanExport (ICollection<Type> types) { throw new NotImplementedException (); }
public bool CanExport (Type type) { throw new NotImplementedException (); }
public void Export (ICollection<Assembly> assemblies) { throw new NotImplementedException (); }
public void Export (ICollection<Type> types) { throw new NotImplementedException (); }
public void Export (Type type) { throw new NotImplementedException (); }
public XmlQualifiedName GetRootElementName (Type type) { throw new NotImplementedException (); }
public XmlSchemaType GetSchemaType (Type type) { throw new NotImplementedException (); }
public XmlQualifiedName GetSchemaTypeName (Type type) { throw new NotImplementedException (); }
}
}

View File

@@ -4,6 +4,7 @@ Assembly/AssemblyInfo.cs
ReferenceSources/DiagnosticUtility.cs
ReferenceSources/FxTrace.cs
ReferenceSources/LocalAppContextSwitches.cs
ReferenceSources/SR.cs
ReferenceSources/SR.missing.cs
ReferenceSources/XmlExceptionHelper.cs

View File

@@ -33,7 +33,9 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
#if !MOBILE_STATIC
using System.Data;
#endif
using System.IO;
using System.Net;
using System.Runtime.Serialization;

View File

@@ -37,7 +37,9 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
#if !MOBILE_STATIC
using System.Data;
#endif
using System.IO;
using System.Linq;
using System.Net;
@@ -1475,6 +1477,7 @@ namespace MonoTests.System.Runtime.Serialization
Assert.AreEqual (parent, parent.Child.Parent, "#2");
}
#if !MOBILE_STATIC
[Test]
public void IXmlSerializableCallConstructor ()
{
@@ -1525,6 +1528,7 @@ namespace MonoTests.System.Runtime.Serialization
var ds = (DataSet) x.ReadObject (r);
}
#endif
[Test]
[ExpectedException (typeof (InvalidDataContractException))] // BaseConstraintType1 is neither DataContract nor Serializable.

View File

@@ -2,4 +2,5 @@
#include ReferenceSource.common.sources
ReferenceSources/SchemaExporter_mobile.cs
ReferenceSources/XsdDataContractExporter_mobile.cs
ReferenceSources/SimplifiedCodeTypeReference.cs