These files have been moved to System.Runtime.Serialization.Primitives and were left over here. They aren't part of any .csproj, so they are not being compiled.
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-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; }
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-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; }
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-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; }
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-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 = Globals.DefaultEmitDefaultValue;
-
- 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 System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.OrderCannotBeNegative));
- _order = value;
- }
- }
-
- public bool IsRequired
- {
- get { return _isRequired; }
- set { _isRequired = value; }
- }
-
- public bool EmitDefaultValue
- {
- get { return _emitDefaultValue; }
- set { _emitDefaultValue = value; }
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-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; }
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
- public sealed class IgnoreDataMemberAttribute : Attribute
- {
- public IgnoreDataMemberAttribute()
- {
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
-using System.Xml;
-
-namespace System.Runtime.Serialization
-{
-
- // InvalidDataContract is used to create a DataContract that will throw
- // an exception if used to serialize or deserialize.
- public sealed class InvalidDataContract : DataContract
- {
- public InvalidDataContract()
- : base(new InvalidDataContractCriticalHelper())
- {
- }
-
- public InvalidDataContract(Type type, string errorMessage)
- : base(new InvalidDataContractCriticalHelper(type))
- {
- ErrorMessage = errorMessage;
- }
-
- public string ErrorMessage { get; set; }
-
- public override void PrepareToRead(XmlReaderDelegator xmlReader)
- {
- throw CreateInvalidDataContractException();
- }
-
- public override object ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
- {
- throw CreateInvalidDataContractException();
- }
-
- public override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
- {
- throw CreateInvalidDataContractException();
- }
-
- private InvalidDataContractException CreateInvalidDataContractException()
- {
- return new InvalidDataContractException(ErrorMessage);
- }
-
- private class InvalidDataContractCriticalHelper : DataContract.DataContractCriticalHelper
- {
- private XmlDictionary _xmlDictionary;
-
- public InvalidDataContractCriticalHelper()
- {
- }
-
- public InvalidDataContractCriticalHelper(Type type)
- : base(type)
- {
- StableName = DataContract.GetStableName(type);
- _xmlDictionary = new XmlDictionary(2);
- this.Name = this.TopLevelElementName = _xmlDictionary.Add(StableName.Name);
- this.Namespace = this.TopLevelElementNamespace = _xmlDictionary.Add(StableName.Namespace);
- }
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-
-namespace System.Runtime.Serialization
-{
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public partial class InvalidDataContractException : Exception
- {
- public InvalidDataContractException()
- : base()
- {
- }
-
- public InvalidDataContractException(string message)
- : base(message)
- {
- }
-
- public InvalidDataContractException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
-
- protected InvalidDataContractException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true, AllowMultiple = true)]
- public sealed class KnownTypeAttribute : Attribute
- {
- private string _methodName;
- private Type _type;
-
- private KnownTypeAttribute()
- {
- // Disallow default constructor
- }
-
- public KnownTypeAttribute(Type type)
- {
- _type = type;
- }
-
- public KnownTypeAttribute(string methodName)
- {
- _methodName = methodName;
- }
-
- public string MethodName
- {
- get { return _methodName; }
- }
-
- public Type Type
- {
- get { return _type; }
- }
- }
-}