You've already forked linux-packaging-mono
Merge branch 'master' of github.com:mono/linux-packaging-mono
Former-commit-id: 8d5a6a66f2b66d3a99e41a7128d49e09911a4765
This commit is contained in:
@@ -1 +1 @@
|
|||||||
9c6dc460572d6a61d53cad8962f5f2cbc2bf2744
|
d8f896130299a8dde6f1e899642b2c79ea151b4f
|
||||||
@@ -1 +1 @@
|
|||||||
de061369386bf75c7f5de5d21bc81daffaac357e
|
698d0b88c8e5e79ffd14d0e83246dd6c5943477f
|
||||||
120
debian/changelog
vendored
120
debian/changelog
vendored
@@ -1,3 +1,123 @@
|
|||||||
|
mono (5.14.0.140-0xamarin1) preview; urgency=medium
|
||||||
|
|
||||||
|
* New release - mono-5.14.0.140.tar.bz2
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 21 Jun 2018 08:31:20 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.139-0xamarin1) preview; urgency=medium
|
||||||
|
|
||||||
|
* New release - mono-5.14.0.139.tar.bz2
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Wed, 20 Jun 2018 08:28:49 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.136-0xamarin1) preview; urgency=medium
|
||||||
|
|
||||||
|
* New release - mono-5.14.0.136.tar.bz2
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Tue, 19 Jun 2018 08:30:12 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.134-0xamarin2) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Mon, 18 Jun 2018 08:49:57 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.134-0xamarin1) preview; urgency=medium
|
||||||
|
|
||||||
|
* New release - mono-5.14.0.134.tar.bz2
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Sun, 17 Jun 2018 08:24:15 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin12) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 20:56:19 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin11) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 20:27:35 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin10) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 19:26:47 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin9) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 18:58:03 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin8) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 18:00:31 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin7) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 17:29:03 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin6) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 14:11:15 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin5) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 05:01:02 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin4) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 08 Jun 2018 00:04:06 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin3) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 07 Jun 2018 23:30:28 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin2) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 07 Jun 2018 20:17:54 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.125-0xamarin1) preview; urgency=medium
|
||||||
|
|
||||||
|
* New release - mono-5.14.0.125.tar.bz2
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 07 Jun 2018 18:59:37 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.121-0xamarin6) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 07 Jun 2018 08:45:45 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.121-0xamarin5) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Wed, 06 Jun 2018 08:45:28 +0000
|
||||||
|
|
||||||
|
mono (5.14.0.121-0xamarin4) preview; urgency=medium
|
||||||
|
|
||||||
|
* Packaging bugfix:
|
||||||
|
|
||||||
|
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Tue, 05 Jun 2018 08:46:29 +0000
|
||||||
|
|
||||||
mono (5.14.0.121-0xamarin3) preview; urgency=medium
|
mono (5.14.0.121-0xamarin3) preview; urgency=medium
|
||||||
|
|
||||||
* Packaging bugfix:
|
* Packaging bugfix:
|
||||||
|
|||||||
2
external/bockbuild/bockbuild/environment.py
vendored
2
external/bockbuild/bockbuild/environment.py
vendored
@@ -12,7 +12,7 @@ class EnvironmentItem:
|
|||||||
self.values = values
|
self.values = values
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.joinchar.join(self.values)
|
return os.path.expandvars(self.joinchar.join(self.values))
|
||||||
|
|
||||||
|
|
||||||
class Environment:
|
class Environment:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static class Consts
|
|||||||
// Use these assembly version constants to make code more maintainable.
|
// 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.140";
|
||||||
public const string MonoCompany = "Mono development team";
|
public const string MonoCompany = "Mono development team";
|
||||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||||
public const string MonoCopyright = "(c) Various Mono authors";
|
public const string MonoCopyright = "(c) Various Mono authors";
|
||||||
|
|||||||
@@ -88,6 +88,8 @@
|
|||||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlSerializableWriter.cs
|
../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/XmlWriterDelegator.cs
|
||||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XPathQueryGenerator.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/Base64Encoding.cs
|
||||||
../referencesource/System.Runtime.Serialization/System/Text/BinHexEncoding.cs
|
../referencesource/System.Runtime.Serialization/System/Text/BinHexEncoding.cs
|
||||||
../referencesource/System.Runtime.Serialization/System/Text/SurrogateChar.cs
|
../referencesource/System.Runtime.Serialization/System/Text/SurrogateChar.cs
|
||||||
|
|||||||
@@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ExportOptions.cs
|
../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/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/SchemaImporter.cs
|
||||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractExporter.cs
|
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractExporter.cs
|
||||||
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractImporter.cs
|
../referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XsdDataContractImporter.cs
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ using System.Diagnostics;
|
|||||||
|
|
||||||
namespace System.Runtime.Serialization {
|
namespace System.Runtime.Serialization {
|
||||||
|
|
||||||
internal static class DiagnosticUtility {
|
internal static partial class DiagnosticUtility {
|
||||||
internal static bool ShouldTraceError = true;
|
internal static bool ShouldTraceError = true;
|
||||||
internal static readonly bool ShouldTraceWarning = false;
|
internal static readonly bool ShouldTraceWarning = false;
|
||||||
internal static readonly bool ShouldTraceInformation = false;
|
internal static readonly bool ShouldTraceInformation = false;
|
||||||
|
|||||||
@@ -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}'.";
|
public const string XmlObjectAssignedToIncompatibleInterface = @"Object of type '{0}' is assigned to an incompatible interface '{1}'.";
|
||||||
|
|
||||||
#endregion
|
#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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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 (); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
#include System.Runtime.Serialization.dll.sources
|
#include System.Runtime.Serialization.dll.sources
|
||||||
#include ReferenceSource.common.sources
|
#include ReferenceSource.common.sources
|
||||||
|
|
||||||
ReferenceSources/SchemaExporter_mobile.cs
|
|
||||||
ReferenceSources/XsdDataContractExporter_mobile.cs
|
|
||||||
ReferenceSources/SimplifiedCodeTypeReference.cs
|
ReferenceSources/SimplifiedCodeTypeReference.cs
|
||||||
|
|
||||||
|
corefx/DiagnosticUtility.cs
|
||||||
|
|
||||||
|
../../../external/corefx/src/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XsdDataContractExporter.cs
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
../../test-helpers/NunitHelpers.cs
|
../../test-helpers/NunitHelpers.cs
|
||||||
System.ServiceProcess/ServiceBaseTest.cs
|
System.ServiceProcess/ServiceBaseTest.cs
|
||||||
System.ServiceProcess/ServiceControllerTest.cs
|
|
||||||
System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs
|
System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs
|
||||||
System.ServiceProcess/ServiceControllerPermissionTest.cs
|
System.ServiceProcess/ServiceControllerPermissionTest.cs
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
786fbd93e02b369570d1c9a004f41e495e59062b
|
|
||||||
@@ -172,7 +172,7 @@ namespace System.Reflection.Emit {
|
|||||||
|
|
||||||
CreateDynMethod ();
|
CreateDynMethod ();
|
||||||
|
|
||||||
deleg = Delegate.CreateDelegate (delegateType, this);
|
deleg = Delegate.CreateDelegate (delegateType, null, this);
|
||||||
return deleg;
|
return deleg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -744,6 +744,55 @@ namespace MonoTests.System.Reflection.Emit
|
|||||||
Assert.AreEqual (typeof (TypedRefTarget), TypedReference.GetTargetType (tr));
|
Assert.AreEqual (typeof (TypedRefTarget), TypedReference.GetTargetType (tr));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static Action GenerateProblematicMethod (bool add_extra, bool mismatch = false, bool use_vts = false)
|
||||||
|
{
|
||||||
|
Type this_type = typeof(object);
|
||||||
|
Type bound_type = typeof(object);
|
||||||
|
if (mismatch) {
|
||||||
|
this_type = typeof (string);
|
||||||
|
bound_type = typeof (DynamicMethodTest);
|
||||||
|
} else if (use_vts) {
|
||||||
|
this_type = typeof (int);
|
||||||
|
bound_type = typeof (long);
|
||||||
|
}
|
||||||
|
|
||||||
|
Type[] args;
|
||||||
|
if (add_extra)
|
||||||
|
args = new[] { this_type };
|
||||||
|
else
|
||||||
|
args = new Type [0];
|
||||||
|
|
||||||
|
var mb = new DynamicMethod("Peek", null, args, bound_type, true);
|
||||||
|
var il = mb.GetILGenerator ();
|
||||||
|
il.Emit(OpCodes.Ret);
|
||||||
|
return (Action) mb.CreateDelegate(typeof(Action));
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ExtraArgGetsIgnored ()
|
||||||
|
{
|
||||||
|
GenerateProblematicMethod (true) ();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ExactNumberOfArgsWork ()
|
||||||
|
{
|
||||||
|
GenerateProblematicMethod (false) ();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ExtraArgWithMismatchedTypes ()
|
||||||
|
{
|
||||||
|
GenerateProblematicMethod (true, mismatch: true) ();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[ExpectedException (typeof (ArgumentException))]
|
||||||
|
public void ExtraArgWithValueType ()
|
||||||
|
{
|
||||||
|
GenerateProblematicMethod (true, use_vts: true) ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
09ec0df8466f5935dd3109d5702a6e5a0e7d11cc
|
d44cb6756ac4019c4067cd47ca2209ba543e2c66
|
||||||
@@ -1 +1 @@
|
|||||||
a5407a65a42139eac82ff8531f3941a3c30b3c6e
|
c3df1f94c77ce644db0e777773d4f5b4fb63ec3f
|
||||||
@@ -1 +1 @@
|
|||||||
f1e8c1f280e9ff9af702f512cdbca81dc786a827
|
66a2626126ddcf2f7d85c36c97c0430b5af44220
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user