Imported Upstream version 5.14.0.125

Former-commit-id: 436f655dff8d8f7c7b0eb3cb3c65e14ccf98b295
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2018-06-07 18:52:37 +00:00
parent 54c0c51795
commit 413682e1ba
45 changed files with 89 additions and 319 deletions

View File

@ -1 +1 @@
9c6dc460572d6a61d53cad8962f5f2cbc2bf2744
d4eb8520ea86245b6c9dfeb83ac67a150e203d68

View File

@ -1 +1 @@
de061369386bf75c7f5de5d21bc81daffaac357e
627ee29fcdc157195f80e189e7a08055bb955d15

View File

@ -34,7 +34,7 @@ static class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "5.14.0.121";
public const string MonoVersion = "5.14.0.125";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -88,6 +88,8 @@
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlSerializableWriter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlWriterDelegator.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XPathQueryGenerator.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaHelper.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaExporter.cs
../referencesource/System.Runtime.Serialization/System/Text/Base64Encoding.cs
../referencesource/System.Runtime.Serialization/System/Text/BinHexEncoding.cs
../referencesource/System.Runtime.Serialization/System/Text/SurrogateChar.cs

View File

@ -20,8 +20,6 @@
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ExportOptions.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ImportOptions.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaExporter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaHelper.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/SchemaImporter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractExporter.cs
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractImporter.cs

View File

@ -2,7 +2,7 @@ using System.Diagnostics;
namespace System.Runtime.Serialization {
internal static class DiagnosticUtility {
internal static partial class DiagnosticUtility {
internal static bool ShouldTraceError = true;
internal static readonly bool ShouldTraceWarning = false;
internal static readonly bool ShouldTraceInformation = false;

View File

@ -308,5 +308,19 @@ public const string XmlMaxStringContentLengthExceeded = @"XML max string content
public const string XmlObjectAssignedToIncompatibleInterface = @"Object of type '{0}' is assigned to an incompatible interface '{1}'.";
#endregion
// CoreFX
public const string PlatformNotSupported_SchemaImporter = "The implementation of the function requires System.Runtime.Serialization.SchemaImporter which is not supported on this platform.";
public const string PlatformNotSupported_IDataContractSurrogate = "The implementation of the function requires System.Runtime.Serialization.IDataContractSurrogate which is not supported on this platform.";
internal static string Format(string resourceFormats)
{
return resourceFormats;
}
internal static string Format(string resourceFormat, object p1)
{
return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1);
}
}
}

View File

@ -1,227 +0,0 @@
namespace System.Runtime.Serialization
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.Diagnostics;
using System.Security;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Runtime.Serialization.Diagnostics;
class SchemaExporter
{
internal static void GetXmlTypeInfo(Type type, out XmlQualifiedName stableName, out XmlSchemaType xsdType, out bool hasRoot)
{
if (IsSpecialXmlType(type, out stableName, out xsdType, out hasRoot))
return;
XmlSchemaSet schemas = new XmlSchemaSet();
schemas.XmlResolver = null;
InvokeSchemaProviderMethod(type, schemas, out stableName, out xsdType, out hasRoot);
if (stableName.Name == null || stableName.Name.Length == 0)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidXmlDataContractName, DataContract.GetClrTypeFullName(type))));
}
internal static bool IsSpecialXmlType(Type type, out XmlQualifiedName typeName, out XmlSchemaType xsdType, out bool hasRoot)
{
xsdType = null;
hasRoot = true;
if (type == Globals.TypeOfXmlElement || type == Globals.TypeOfXmlNodeArray)
{
string name = null;
if (type == Globals.TypeOfXmlElement)
{
xsdType = CreateAnyElementType();
name = "XmlElement";
hasRoot = false;
}
else
{
xsdType = CreateAnyType();
name = "ArrayOfXmlNode";
hasRoot = true;
}
typeName = new XmlQualifiedName(name, DataContract.GetDefaultStableNamespace(type));
return true;
}
typeName = null;
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;
hasRoot = true;
object[] attrs = clrType.GetCustomAttributes(Globals.TypeOfXmlSchemaProviderAttribute, false);
if (attrs == null || attrs.Length == 0)
{
stableName = DataContract.GetDefaultStableName(clrType);
return false;
}
XmlSchemaProviderAttribute provider = (XmlSchemaProviderAttribute)attrs[0];
if (provider.IsAny)
{
xsdType = CreateAnyElementType();
hasRoot = false;
}
string methodName = provider.MethodName;
if (methodName == null || methodName.Length == 0)
{
if (!provider.IsAny)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidGetSchemaMethod, DataContract.GetClrTypeFullName(clrType))));
stableName = DataContract.GetDefaultStableName(clrType);
}
else
{
MethodInfo getMethod = clrType.GetMethod(methodName, /*BindingFlags.DeclaredOnly |*/ BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, null, new Type[] { typeof(XmlSchemaSet) }, null);
if (getMethod == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.MissingGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName)));
if (!(Globals.TypeOfXmlQualifiedName.IsAssignableFrom(getMethod.ReturnType)) && !(Globals.TypeOfXmlSchemaType.IsAssignableFrom(getMethod.ReturnType)))
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidReturnTypeOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName, DataContract.GetClrTypeFullName(getMethod.ReturnType), DataContract.GetClrTypeFullName(Globals.TypeOfXmlQualifiedName), typeof(XmlSchemaType))));
object typeInfo = getMethod.Invoke(null, new object[] { schemas });
if (provider.IsAny)
{
if (typeInfo != null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidNonNullReturnValueByIsAny, DataContract.GetClrTypeFullName(clrType), methodName)));
stableName = DataContract.GetDefaultStableName(clrType);
}
else if (typeInfo == null)
{
xsdType = CreateAnyElementType();
hasRoot = false;
stableName = DataContract.GetDefaultStableName(clrType);
}
else
{
XmlSchemaType providerXsdType = typeInfo as XmlSchemaType;
if (providerXsdType != null)
{
string typeName = providerXsdType.Name;
string typeNs = null;
if (typeName == null || typeName.Length == 0)
{
DataContract.GetDefaultStableName(DataContract.GetClrTypeFullName(clrType), out typeName, out typeNs);
stableName = new XmlQualifiedName(typeName, typeNs);
providerXsdType.Annotation = GetSchemaAnnotation(ExportActualType(stableName, new XmlDocument()));
xsdType = providerXsdType;
}
else
{
foreach (XmlSchema schema in schemas.Schemas())
{
foreach (XmlSchemaObject schemaItem in schema.Items)
{
if ((object)schemaItem == (object)providerXsdType)
{
typeNs = schema.TargetNamespace;
if (typeNs == null)
typeNs = String.Empty;
break;
}
}
if (typeNs != null)
break;
}
if (typeNs == null)
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.MissingSchemaType, typeName, DataContract.GetClrTypeFullName(clrType))));
stableName = new XmlQualifiedName(typeName, typeNs);
}
}
else
stableName = (XmlQualifiedName)typeInfo;
}
}
return true;
}
static XmlSchemaComplexType CreateAnyElementType()
{
XmlSchemaComplexType anyElementType = new XmlSchemaComplexType();
anyElementType.IsMixed = false;
anyElementType.Particle = new XmlSchemaSequence();
XmlSchemaAny any = new XmlSchemaAny();
any.MinOccurs = 0;
any.ProcessContents = XmlSchemaContentProcessing.Lax;
((XmlSchemaSequence)anyElementType.Particle).Items.Add(any);
return anyElementType;
}
static XmlSchemaAnnotation GetSchemaAnnotation(params XmlNode[] nodes)
{
if (nodes == null || nodes.Length == 0)
return null;
bool hasAnnotation = false;
for (int i = 0; i < nodes.Length; i++)
if (nodes[i] != null)
{
hasAnnotation = true;
break;
}
if (!hasAnnotation)
return null;
XmlSchemaAnnotation annotation = new XmlSchemaAnnotation();
XmlSchemaAppInfo appInfo = new XmlSchemaAppInfo();
annotation.Items.Add(appInfo);
appInfo.Markup = nodes;
return annotation;
}
static XmlSchemaComplexType CreateAnyType()
{
XmlSchemaComplexType anyType = new XmlSchemaComplexType();
anyType.IsMixed = true;
anyType.Particle = new XmlSchemaSequence();
XmlSchemaAny any = new XmlSchemaAny();
any.MinOccurs = 0;
any.MaxOccurs = Decimal.MaxValue;
any.ProcessContents = XmlSchemaContentProcessing.Lax;
((XmlSchemaSequence)anyType.Particle).Items.Add(any);
anyType.AnyAttribute = new XmlSchemaAnyAttribute();
return anyType;
}
static XmlElement ExportActualType(XmlQualifiedName typeName, XmlDocument xmlDoc)
{
XmlElement actualTypeElement = xmlDoc.CreateElement(ActualTypeAnnotationName.Name, ActualTypeAnnotationName.Namespace);
XmlAttribute nameAttribute = xmlDoc.CreateAttribute(Globals.ActualTypeNameAttribute);
nameAttribute.Value = typeName.Name;
actualTypeElement.Attributes.Append(nameAttribute);
XmlAttribute nsAttribute = xmlDoc.CreateAttribute(Globals.ActualTypeNamespaceAttribute);
nsAttribute.Value = typeName.Namespace;
actualTypeElement.Attributes.Append(nsAttribute);
return actualTypeElement;
}
static XmlQualifiedName actualTypeAnnotationName;
internal static XmlQualifiedName ActualTypeAnnotationName
{
get
{
if (actualTypeAnnotationName == null)
actualTypeAnnotationName = new XmlQualifiedName(Globals.ActualTypeLocalName, Globals.SerializationNamespace);
return actualTypeAnnotationName;
}
}
}
}

View File

@ -1,54 +0,0 @@
//
// 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

@ -0,0 +1,31 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
namespace System.Runtime.Serialization
{
partial class DiagnosticUtility
{
internal static bool IsFatal(Exception exception)
{
while (exception != null)
{
// These exceptions aren't themselves fatal, but since the CLR uses them to wrap other exceptions,
// we want to check to see whether they've been used to wrap a fatal exception. If so, then they
// count as fatal.
if (exception is TypeInitializationException)
{
exception = exception.InnerException;
}
else
{
break;
}
}
return false;
}
}
}

View File

@ -1,6 +1,8 @@
#include System.Runtime.Serialization.dll.sources
#include ReferenceSource.common.sources
ReferenceSources/SchemaExporter_mobile.cs
ReferenceSources/XsdDataContractExporter_mobile.cs
ReferenceSources/SimplifiedCodeTypeReference.cs
corefx/DiagnosticUtility.cs
../../../external/corefx/src/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XsdDataContractExporter.cs

View File

@ -1 +1 @@
09ec0df8466f5935dd3109d5702a6e5a0e7d11cc
893f2ad93ea2470cc59e4960b51fe683c870f49b

View File

@ -1 +1 @@
a5407a65a42139eac82ff8531f3941a3c30b3c6e
f35ac4fce686918e2e987e8acbcdc46d6a97764a

View File

@ -1 +1 @@
f1e8c1f280e9ff9af702f512cdbca81dc786a827
0e330bafa63f8bd145c7143962d19fd926e7fde0

View File

@ -1 +1 @@
edaf454cb91d45a177854f2fb969577a7dd2e73e
03cb6ca187d31ea32322a164856c6a02753270c2

View File

@ -1 +1 @@
c30b91929a614ec4b2e8d7c5e1450292ad0e927d
898a55885e4afcd1a4e9fccdc675db59b5f3127a

View File

@ -1 +1 @@
a256efa8af047b3a388540cf6f2c6d89220b2907
0ee1bb501f0a53864ed03f061a829816b728d2a0

View File

@ -1 +1 @@
c6ad5451a7b726d21eed3052d4f9ec42d4ebf2ad
d0608d70a50226633cb2626c45365c7ec8d987f1

View File

@ -1 +1 @@
09ec0df8466f5935dd3109d5702a6e5a0e7d11cc
893f2ad93ea2470cc59e4960b51fe683c870f49b

View File

@ -1 +1 @@
a5407a65a42139eac82ff8531f3941a3c30b3c6e
f35ac4fce686918e2e987e8acbcdc46d6a97764a

View File

@ -1 +1 @@
f1e8c1f280e9ff9af702f512cdbca81dc786a827
0e330bafa63f8bd145c7143962d19fd926e7fde0

View File

@ -1 +1 @@
edaf454cb91d45a177854f2fb969577a7dd2e73e
03cb6ca187d31ea32322a164856c6a02753270c2

View File

@ -1 +1 @@
c30b91929a614ec4b2e8d7c5e1450292ad0e927d
898a55885e4afcd1a4e9fccdc675db59b5f3127a

View File

@ -1 +1 @@
a256efa8af047b3a388540cf6f2c6d89220b2907
0ee1bb501f0a53864ed03f061a829816b728d2a0

View File

@ -1 +1 @@
c6ad5451a7b726d21eed3052d4f9ec42d4ebf2ad
d0608d70a50226633cb2626c45365c7ec8d987f1

View File

@ -1 +1 @@
09ec0df8466f5935dd3109d5702a6e5a0e7d11cc
893f2ad93ea2470cc59e4960b51fe683c870f49b

View File

@ -1 +1 @@
a5407a65a42139eac82ff8531f3941a3c30b3c6e
f35ac4fce686918e2e987e8acbcdc46d6a97764a

View File

@ -1 +1 @@
f1e8c1f280e9ff9af702f512cdbca81dc786a827
0e330bafa63f8bd145c7143962d19fd926e7fde0

View File

@ -1 +1 @@
edaf454cb91d45a177854f2fb969577a7dd2e73e
03cb6ca187d31ea32322a164856c6a02753270c2

View File

@ -1 +1 @@
c30b91929a614ec4b2e8d7c5e1450292ad0e927d
898a55885e4afcd1a4e9fccdc675db59b5f3127a

View File

@ -1 +1 @@
a256efa8af047b3a388540cf6f2c6d89220b2907
0ee1bb501f0a53864ed03f061a829816b728d2a0

View File

@ -1 +1 @@
c6ad5451a7b726d21eed3052d4f9ec42d4ebf2ad
d0608d70a50226633cb2626c45365c7ec8d987f1

View File

@ -13,7 +13,7 @@ namespace System.Runtime.Serialization
using System.IO;
using System.Reflection;
using System.Runtime.Diagnostics;
using System.ServiceModel.Diagnostics;
// using System.ServiceModel.Diagnostics;
using System.Security;
using System.Xml;
using System.Xml.Schema;

View File

@ -1 +1 @@
14c5c3d08e494edc9e81843975b14653cf1b6240
8adc17ec288a1b9ae9c8dd1cd47856e2106f4f54

View File

@ -730,6 +730,10 @@ init_llvm (void)
LLVMInitializeARMTarget ();
LLVMInitializeARMTargetInfo ();
LLVMInitializeARMTargetMC ();
#elif defined(TARGET_ARM64)
LLVMInitializeAArch64Target ();
LLVMInitializeAArch64TargetInfo ();
LLVMInitializeAArch64TargetMC ();
#elif defined(TARGET_X86) || defined(TARGET_AMD64)
LLVMInitializeX86Target ();
LLVMInitializeX86TargetInfo ();

View File

@ -1 +1 @@
#define FULL_VERSION "explicit/33a9dca"
#define FULL_VERSION "explicit/47fe82d"

Binary file not shown.

View File

@ -1 +1 @@
d41d73147f2851a5a673fd18b45fceaae78e3025
5b627d43a52c08f6d5eaceddcc04894875f39fd9

Binary file not shown.

View File

@ -1 +1 @@
144a82c66e1f0499961ff7c2fbfbd42f298b91db
65d2678bdb875908a9ac177f6a37418d46e66cfb

Binary file not shown.

View File

@ -1 +1 @@
c8f9a61d85ec94cf5bb390a5dfe4cddc3a17b314
6f3dabb7d683c953fe72aa681c6796359ea8d72e

View File

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: mono 5.14.0.121\n"
"Project-Id-Version: mono 5.14.0.125\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2018-06-02 08:31+0000\n"
"POT-Creation-Date: 2018-06-07 17:45+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
d9b795430351c1d58879bde8bd04efcf57186470
5f63b8c4b78b5f85652a26008736970687554f31