Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22609.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Serialization.Primitives", "src\System.Runtime.Serialization.Primitives.csproj", "{CDF0ACB5-1361-4E48-8ECB-22E8022F5F01}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{9618597D-FDAE-42CB-B368-80DB80EA1E37}"
ProjectSection(SolutionItems) = preProject
.nuget\packages.Windows_NT.config = .nuget\packages.Windows_NT.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CDF0ACB5-1361-4E48-8ECB-22E8022F5F01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CDF0ACB5-1361-4E48-8ECB-22E8022F5F01}.Debug|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<PropertyGroup>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,97 @@
// 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.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnDeserializedAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnDeserializingAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnSerializedAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnSerializingAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.SerializationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.StreamingContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.StreamingContextStates))]
namespace System.Runtime.Serialization
{
[System.AttributeUsageAttribute((System.AttributeTargets)(12), Inherited = false, AllowMultiple = false)]
public sealed partial class CollectionDataContractAttribute : System.Attribute
{
public CollectionDataContractAttribute() { }
public bool IsItemNameSetExplicitly { get { throw null; } }
public bool IsKeyNameSetExplicitly { get { throw null; } }
public bool IsNameSetExplicitly { get { throw null; } }
public bool IsNamespaceSetExplicitly { get { throw null; } }
public bool IsReference { get { throw null; } set { } }
public bool IsReferenceSetExplicitly { get { throw null; } }
public bool IsValueNameSetExplicitly { get { throw null; } }
public string ItemName { get { throw null; } set { } }
public string KeyName { get { throw null; } set { } }
public string Name { get { throw null; } set { } }
public string Namespace { get { throw null; } set { } }
public string ValueName { get { throw null; } set { } }
}
[System.AttributeUsageAttribute((System.AttributeTargets)(3), Inherited = false, AllowMultiple = true)]
public sealed partial class ContractNamespaceAttribute : System.Attribute
{
public ContractNamespaceAttribute(string contractNamespace) { }
public string ClrNamespace { get { throw null; } set { } }
public string ContractNamespace { get { throw null; } }
}
[System.AttributeUsageAttribute((System.AttributeTargets)(28), Inherited = false, AllowMultiple = false)]
public sealed partial class DataContractAttribute : System.Attribute
{
public DataContractAttribute() { }
public bool IsNameSetExplicitly { get { throw null; } }
public bool IsNamespaceSetExplicitly { get { throw null; } }
public bool IsReference { get { throw null; } set { } }
public bool IsReferenceSetExplicitly { get { throw null; } }
public string Name { get { throw null; } set { } }
public string Namespace { get { throw null; } set { } }
}
[System.AttributeUsageAttribute((System.AttributeTargets)(384), Inherited = false, AllowMultiple = false)]
public sealed partial class DataMemberAttribute : System.Attribute
{
public DataMemberAttribute() { }
public bool EmitDefaultValue { get { throw null; } set { } }
public bool IsNameSetExplicitly { get { throw null; } }
public bool IsRequired { get { throw null; } set { } }
public string Name { get { throw null; } set { } }
public int Order { get { throw null; } set { } }
}
[System.AttributeUsageAttribute((System.AttributeTargets)(256), Inherited = false, AllowMultiple = false)]
public sealed partial class EnumMemberAttribute : System.Attribute
{
public EnumMemberAttribute() { }
public bool IsValueSetExplicitly { get { throw null; } }
public string Value { get { throw null; } set { } }
}
[System.AttributeUsageAttribute((System.AttributeTargets)(384), Inherited = false, AllowMultiple = false)]
public sealed partial class IgnoreDataMemberAttribute : System.Attribute
{
public IgnoreDataMemberAttribute() { }
}
[Serializable]
public partial class InvalidDataContractException : System.Exception
{
public InvalidDataContractException() { }
public InvalidDataContractException(string message) { }
public InvalidDataContractException(string message, System.Exception innerException) { }
protected InvalidDataContractException(SerializationInfo info, StreamingContext context) : base(info, context) { }
}
public partial interface ISerializationSurrogateProvider
{
object GetDeserializedObject(object obj, System.Type targetType);
object GetObjectToSerialize(object obj, System.Type targetType);
System.Type GetSurrogateType(System.Type type);
}
[System.AttributeUsageAttribute((System.AttributeTargets)(12), Inherited = true, AllowMultiple = true)]
public sealed partial class KnownTypeAttribute : System.Attribute
{
public KnownTypeAttribute(string methodName) { }
public KnownTypeAttribute(System.Type type) { }
public string MethodName { get { throw null; } }
public System.Type Type { get { throw null; } }
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System.Runtime.Serialization.Primitives.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,4 @@
Compat issues with assembly System.Runtime.Serialization.Primitives:
CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.InvalidDataContractException' does not implement interface 'System.Runtime.Serialization.ISerializable' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.SerializationException' does not implement interface 'System.Runtime.Serialization.ISerializable' in the implementation but it does in the contract.
Total Issues: 2

View File

@@ -0,0 +1,4 @@
Compat issues with assembly System.Runtime.Serialization.Primitives:
CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.InvalidDataContractException' does not implement interface 'System.Runtime.Serialization.ISerializable' in the implementation but it does in the contract.
CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.SerializationException' does not implement interface 'System.Runtime.Serialization.ISerializable' in the implementation but it does in the contract.
Total Issues: 2

View File

@@ -0,0 +1 @@
CannotRemoveBaseTypeOrInterface : Type 'System.Runtime.Serialization.SerializationException' does not inherit from base type 'System.SystemException' in the implementation but it does in the contract.

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcore50aot-Windows_NT;
uap101aot-Windows_NT;
net463-Windows_NT;
netcoreapp;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="OrderCannotBeNegative" xml:space="preserve">
<value>Property 'Order' in DataMemberAttribute attribute cannot be a negative number.</value>
</data>
<data name="SerializationException" xml:space="preserve">
<value>Serialization error.</value>
</data>
</root>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Library Name="System.Runtime.Serialization.Primitives">
<Assembly Name="System.Runtime.Serialization.Primitives">
<Namespace Name="System.Runtime.Serialization">
<!-- Method marked with these attributes can be invoked by serialization code (ours or
library serializers) -->
<Type Name="OnSerializedAttribute">
<AttributeImplies Dynamic="Required All" />
</Type>
<Type Name="OnSerializingAttribute">
<AttributeImplies Dynamic="Required All" />
</Type>
<Type Name="OnDeserializedAttribute">
<AttributeImplies Dynamic="Required All" />
</Type>
<Type Name="OnDeserializingAttribute">
<AttributeImplies Dynamic="Required All" />
</Type>
</Namespace>
<Type Name="System.Runtime.Serialization.SerializationException" Activate="Required All" />
</Assembly>
</Library>
</Directives>

View File

@@ -0,0 +1,11 @@
// 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.
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnDeserializedAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnDeserializingAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnSerializedAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.OnSerializingAttribute))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.SerializationException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.StreamingContext))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.Serialization.StreamingContextStates))]

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>System.Runtime.Serialization.Primitives</AssemblyName>
<RootNamespace>System.Runtime.Serialization.Primitives</RootNamespace>
<NoWarn>$(NoWarn);1634;1691;649</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<FileAlignment>512</FileAlignment>
<PlatformTarget>AnyCPU</PlatformTarget>
<ProjectGuid>{CDF0ACB5-1361-4E48-8ECB-22E8022F5F01}</ProjectGuid>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='net463'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net463-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net463-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap101aot-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap101aot-Windows_NT-Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)'!='net463'">
<Compile Include="System\Runtime\Serialization\CollectionDataContractAttribute.cs" />
<Compile Include="System\Runtime\Serialization\ContractNamespaceAttribute.cs" />
<Compile Include="System\Runtime\Serialization\DataContractAttribute.cs" />
<Compile Include="System\Runtime\Serialization\DataMemberAttribute.cs" />
<Compile Include="System\Runtime\Serialization\EnumMemberAttribute.cs" />
<Compile Include="System\Runtime\Serialization\IgnoreDataMemberAttribute.cs" />
<Compile Include="System\Runtime\Serialization\InvalidDataContractException.cs" />
<Compile Include="System\Runtime\Serialization\ISerializationSurrogateProvider.cs" />
<Compile Include="System\Runtime\Serialization\KnownTypeAttribute.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' Or '$(TargetGroup)'=='uap101aot'">
<Compile Include="System\Runtime\Serialization\InvalidDataContractException.Serialization.cs" />
<Compile Include="System.Runtime.Serialization.Primitives.TypeForwards.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)'=='net463'">
<TargetingPackReference Include="mscorlib" />
<TargetingPackReference Include="System.Runtime.Serialization" />
<Compile Include="System\Runtime\Serialization\ISerializationSurrogateProvider.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\$(AssemblyName).rd.xml" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,117 @@
// 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.
namespace System.Runtime.Serialization
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
public sealed class CollectionDataContractAttribute : Attribute
{
private string _name;
private string _ns;
private string _itemName;
private string _keyName;
private string _valueName;
private bool _isReference;
private bool _isNameSetExplicitly;
private bool _isNamespaceSetExplicitly;
private bool _isReferenceSetExplicitly;
private bool _isItemNameSetExplicitly;
private bool _isKeyNameSetExplicitly;
private bool _isValueNameSetExplicitly;
public CollectionDataContractAttribute()
{
}
public string Namespace
{
get { return _ns; }
set
{
_ns = value;
_isNamespaceSetExplicitly = true;
}
}
public bool IsNamespaceSetExplicitly
{
get { return _isNamespaceSetExplicitly; }
}
public string Name
{
get { return _name; }
set
{
_name = value;
_isNameSetExplicitly = true;
}
}
public bool IsNameSetExplicitly
{
get { return _isNameSetExplicitly; }
}
public string ItemName
{
get { return _itemName; }
set
{
_itemName = value;
_isItemNameSetExplicitly = true;
}
}
public bool IsItemNameSetExplicitly
{
get { return _isItemNameSetExplicitly; }
}
public string KeyName
{
get { return _keyName; }
set
{
_keyName = value;
_isKeyNameSetExplicitly = true;
}
}
public bool IsReference
{
get { return _isReference; }
set
{
_isReference = value;
_isReferenceSetExplicitly = true;
}
}
public bool IsReferenceSetExplicitly
{
get { return _isReferenceSetExplicitly; }
}
public bool IsKeyNameSetExplicitly
{
get { return _isKeyNameSetExplicitly; }
}
public string ValueName
{
get { return _valueName; }
set
{
_valueName = value;
_isValueNameSetExplicitly = true;
}
}
public bool IsValueNameSetExplicitly
{
get { return _isValueNameSetExplicitly; }
}
}
}

View File

@@ -0,0 +1,32 @@
// 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;
namespace System.Runtime.Serialization
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module, Inherited = false, AllowMultiple = true)]
public sealed class ContractNamespaceAttribute : Attribute
{
private string _clrNamespace;
private string _contractNamespace;
public ContractNamespaceAttribute(string contractNamespace)
{
_contractNamespace = contractNamespace;
}
public string ClrNamespace
{
get { return _clrNamespace; }
set { _clrNamespace = value; }
}
public string ContractNamespace
{
get { return _contractNamespace; }
}
}
}

View File

@@ -0,0 +1,66 @@
// 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.
namespace System.Runtime.Serialization
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum, Inherited = false, AllowMultiple = false)]
public sealed class DataContractAttribute : Attribute
{
private string _name;
private string _ns;
private bool _isNameSetExplicitly;
private bool _isNamespaceSetExplicitly;
private bool _isReference;
private bool _isReferenceSetExplicitly;
public DataContractAttribute()
{
}
public bool IsReference
{
get { return _isReference; }
set
{
_isReference = value;
_isReferenceSetExplicitly = true;
}
}
public bool IsReferenceSetExplicitly
{
get { return _isReferenceSetExplicitly; }
}
public string Namespace
{
get { return _ns; }
set
{
_ns = value;
_isNamespaceSetExplicitly = true;
}
}
public bool IsNamespaceSetExplicitly
{
get { return _isNamespaceSetExplicitly; }
}
public string Name
{
get { return _name; }
set
{
_name = value;
_isNameSetExplicitly = true;
}
}
public bool IsNameSetExplicitly
{
get { return _isNameSetExplicitly; }
}
}
}

View File

@@ -0,0 +1,54 @@
// 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.
namespace System.Runtime.Serialization
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
public sealed class DataMemberAttribute : Attribute
{
private string _name;
private bool _isNameSetExplicitly;
private int _order = -1;
private bool _isRequired;
private bool _emitDefaultValue = true;
public DataMemberAttribute()
{
}
public string Name
{
get { return _name; }
set { _name = value; _isNameSetExplicitly = true; }
}
public bool IsNameSetExplicitly
{
get { return _isNameSetExplicitly; }
}
public int Order
{
get { return _order; }
set
{
if (value < 0)
throw new InvalidDataContractException(SR.OrderCannotBeNegative);
_order = value;
}
}
public bool IsRequired
{
get { return _isRequired; }
set { _isRequired = value; }
}
public bool EmitDefaultValue
{
get { return _emitDefaultValue; }
set { _emitDefaultValue = value; }
}
}
}

View File

@@ -0,0 +1,28 @@
// 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.
namespace System.Runtime.Serialization
{
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
public sealed class EnumMemberAttribute : Attribute
{
private string _value;
private bool _isValueSetExplicitly;
public EnumMemberAttribute()
{
}
public string Value
{
get { return _value; }
set { _value = value; _isValueSetExplicitly = true; }
}
public bool IsValueSetExplicitly
{
get { return _isValueSetExplicitly; }
}
}
}

View File

@@ -0,0 +1,13 @@
// 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.
namespace System.Runtime.Serialization
{
public interface ISerializationSurrogateProvider
{
Type GetSurrogateType(Type type);
object GetObjectToSerialize(object obj, Type targetType);
object GetDeserializedObject(object obj, Type targetType);
}
}

View File

@@ -0,0 +1,16 @@
// 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.
//------------------------------------------------------------
namespace System.Runtime.Serialization
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
public sealed class IgnoreDataMemberAttribute : Attribute
{
public IgnoreDataMemberAttribute()
{
}
}
}

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