Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -64,14 +64,9 @@ using System.Runtime.InteropServices;
[assembly: AllowPartiallyTrustedCallers]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
[assembly: SecurityCritical (SecurityCriticalScope.Explicit)]
#if NET_4_0
// for SyndicationElementExtension
// FIXME: mcs in 2-10 branch breaks System.ServiceModel build on resolving this. So, disabling it so far.
// [assembly: InternalsVisibleTo ("System.ServiceModel, PublicKey=00000000000000000400000000000000")]
#else
// for SyndicationElementExtension
[assembly: InternalsVisibleTo ("System.ServiceModel.Web, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
#endif
#endif
[assembly: ComVisible (false)]

View File

@@ -7,12 +7,15 @@ RESOURCE_FILES = \
LIBRARY = System.Runtime.Serialization.dll
LIB_MCS_FLAGS = \
-unsafe \
/nowarn:168,169,219,414 \
/r:System.dll \
/r:System.Xml.dll \
/r:System.Core.dll \
$(RESOURCE_FILES:%=/resource:%)
RESOURCE_STRINGS = ../../../external/referencesource/System.Runtime.Serialization/System.Runtime.Serialization.txt
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += /d:NET_3_0 /r:System.Data.dll /r:System.Configuration.dll
endif
@@ -29,12 +32,4 @@ EXTRA_DISTFILES = $(RESOURCE_FILES) $(TEST_RESOURCE_FILES) \
Test/Resources/Schemas/*.xsd \
Test/System.Runtime.Serialization/one.xml
VALID_PROFILE := $(filter 2 4, $(FRAMEWORK_VERSION_MAJOR))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.Runtime.Serialization.dll
NO_INSTALL = yes
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
endif
include ../../build/library.make

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -61,4 +60,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -84,4 +83,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -101,4 +100,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
using System.Xml;
@@ -108,4 +107,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -97,4 +96,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -52,4 +51,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -94,4 +93,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
using System.Configuration;
@@ -92,4 +91,3 @@ namespace System.Runtime.Serialization.Configuration
}
}
}
#endif

View File

@@ -10,9 +10,9 @@ System.Runtime.Serialization.Configuration/ParameterElementCollection.cs
System.Runtime.Serialization.Configuration/SerializationSectionGroup.cs
System.Runtime.Serialization.Configuration/TypeElement.cs
System.Runtime.Serialization.Configuration/TypeElementCollection.cs
System.Runtime.Serialization/CollectionDataContractAttribute.cs
System.Runtime.Serialization/ContractNamespaceAttribute.cs
System.Runtime.Serialization/DataContractAttribute.cs
../../../external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/CollectionDataContractAttribute.cs
../../../external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ContractNamespaceAttribute.cs
../../../external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractAttribute.cs
System.Runtime.Serialization/DataContractResolver.cs
System.Runtime.Serialization/DataContractSerializer.cs
System.Runtime.Serialization/DataMemberAttribute.cs

View File

@@ -1,72 +0,0 @@
//
// CollectionDataContractAttribute.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2005 Novell, Inc. http://www.novell.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.
//
#if NET_2_0
using System;
namespace System.Runtime.Serialization
{
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct,
Inherited = false, AllowMultiple = false)]
public sealed class CollectionDataContractAttribute : Attribute
{
string name, ns, item_name, key_name, value_name;
bool is_reference;
public CollectionDataContractAttribute ()
{
}
public string Name {
get { return name; }
set { name = value; }
}
public string Namespace {
get { return ns; }
set { ns = value; }
}
public string ItemName {
get { return item_name; }
set { item_name = value; }
}
public string KeyName {
get { return key_name; }
set { key_name = value; }
}
public string ValueName {
get { return value_name; }
set { value_name = value; }
}
public bool IsReference { get; set; } // new in 3.5 SP1
}
}
#endif

View File

@@ -1,54 +0,0 @@
//
// ContractNamespaceAttribute.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2005 Novell, Inc. http://www.novell.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.
//
#if NET_2_0
using System;
namespace System.Runtime.Serialization
{
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Module,
Inherited = false, AllowMultiple = true)]
public sealed class ContractNamespaceAttribute : Attribute
{
string clr_ns, contract_ns;
public ContractNamespaceAttribute (string ns)
{
contract_ns = ns;
}
public string ClrNamespace {
get { return clr_ns; }
set { clr_ns = value; }
}
public string ContractNamespace {
get { return contract_ns; }
}
}
}
#endif

View File

@@ -1,59 +0,0 @@
//
// DataContractAttribute.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2005 Novell, Inc. http://www.novell.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.
//
#if NET_2_0
using System;
namespace System.Runtime.Serialization
{
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum,
Inherited = false, AllowMultiple = false)]
public sealed class DataContractAttribute : Attribute
{
string name, ns;
public DataContractAttribute ()
{
}
public string Name {
get { return name; }
set { name = value; }
}
// the default namespace for XmlFormatter (with SharedSchema) is
// http://schemas.datacontract.org/2004/07/ .
public string Namespace {
get { return ns; }
set { ns = value; }
}
// new in 3.5 SP1
public bool IsReference { get; set; }
}
}
#endif

View File

@@ -32,11 +32,7 @@ using System.Xml;
namespace System.Runtime.Serialization
{
// See http://msdn.microsoft.com/en-us/library/ee358759.aspx
#if NET_4_0
public
#else
internal
#endif
abstract class DataContractResolver
{
public abstract Type ResolveName (string typeName, string typeNamespace, Type declaredType, DataContractResolver knownTypeResolver);

View File

@@ -173,7 +173,6 @@ namespace System.Runtime.Serialization
dataContractSurrogate);
}
#if NET_4_0
public DataContractSerializer (Type type,
IEnumerable<Type> knownTypes,
int maxObjectsInGraph,
@@ -213,9 +212,7 @@ namespace System.Runtime.Serialization
{
DataContractResolver = dataContractResolver;
}
#endif
#if NET_4_5
public DataContractSerializer (Type type, DataContractSerializerSettings settings)
: this (type, settings.RootName, settings.RootNamespace, settings.KnownTypes,
settings.MaxItemsInObjectGraph, settings.IgnoreExtensionDataObject,
@@ -223,7 +220,6 @@ namespace System.Runtime.Serialization
settings.DataContractResolver)
{
}
#endif
void PopulateTypes (IEnumerable<Type> knownTypes)
{
@@ -287,11 +283,7 @@ namespace System.Runtime.Serialization
surrogate = dataContractSurrogate;
}
#if NET_4_0
public
#else
internal
#endif
DataContractResolver DataContractResolver {
get { return resolver; }
private set {
@@ -371,7 +363,6 @@ namespace System.Runtime.Serialization
return ret;
}
#if NET_4_0
public object ReadObject (XmlDictionaryReader reader, bool verifyObjectName, DataContractResolver resolver)
{
var bak = DataContractResolver;
@@ -382,7 +373,6 @@ namespace System.Runtime.Serialization
DataContractResolver = bak;
}
}
#endif
// SP1
public override void WriteObject (XmlWriter writer, object graph)
@@ -391,7 +381,6 @@ namespace System.Runtime.Serialization
WriteObject (w, graph);
}
#if NET_4_0
public void WriteObject (XmlDictionaryWriter writer, object graph, DataContractResolver resolver)
{
var bak = DataContractResolver;
@@ -402,7 +391,6 @@ namespace System.Runtime.Serialization
DataContractResolver = bak;
}
}
#endif
[MonoTODO ("use DataContractSurrogate")]
/*
@@ -559,12 +547,10 @@ namespace System.Runtime.Serialization
WriteEndObject (XmlDictionaryWriter.CreateDictionaryWriter (writer));
}
#if NET_4_5
[MonoTODO]
public bool SerializeReadOnlyTypes {
get { throw new NotImplementedException (); }
}
#endif
private bool IsAny ()
{

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
namespace System.Runtime.Serialization
@@ -64,4 +63,3 @@ namespace System.Runtime.Serialization
}
}
}
#endif

View File

@@ -23,7 +23,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_5
using System;
using System.Globalization;
@@ -54,4 +53,3 @@ namespace System.Runtime.Serialization {
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System;
namespace System.Runtime.Serialization
@@ -46,4 +45,3 @@ namespace System.Runtime.Serialization
}
}
}
#endif

View File

@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_2_0
using System.Collections.ObjectModel;
namespace System.Runtime.Serialization
@@ -50,4 +49,3 @@ namespace System.Runtime.Serialization
}
}
}
#endif

Some files were not shown because too many files have changed in this diff Show More