Long time ago we tried to make binary serialization sort of work with PublishAot. That code was deleted, but this was left.
+++ /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 Internal.TypeSystem.Ecma
-{
- public partial class EcmaField
- {
- public override bool IsNotSerialized
- {
- get
- {
- return (GetFieldFlags(FieldFlags.BasicMetadataCache | FieldFlags.NotSerialized) & FieldFlags.NotSerialized) != 0;
- }
- }
- }
-}
public const int InitOnly = 0x0004;
public const int Literal = 0x0008;
public const int HasRva = 0x0010;
- public const int NotSerialized = 0x0020;
public const int AttributeMetadataCache = 0x0100;
public const int ThreadStatic = 0x0200;
if ((fieldAttributes & FieldAttributes.HasFieldRVA) != 0)
flags |= FieldFlags.HasRva;
-#pragma warning disable SYSLIB0050 // Legacy serialization infrastructure is obsolete
- if ((fieldAttributes & FieldAttributes.NotSerialized) != 0)
- flags |= FieldFlags.NotSerialized;
-#pragma warning restore SYSLIB0050
-
flags |= FieldFlags.BasicMetadataCache;
}
+++ /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.Reflection;
-
-namespace Internal.TypeSystem.Ecma
-{
- public partial class EcmaType
- {
- public override bool IsSerializable
- {
- get
- {
- return (_typeDefinition.Attributes & TypeAttributes.Serializable) != 0;
- }
- }
- }
-}
+++ /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 Internal.TypeSystem
-{
- // Additional members of FieldDesc related to serialization.
- public partial class FieldDesc
- {
- /// <summary>
- /// Gets a value indicating whether this field is not serialized.
- /// specially.
- /// </summary>
- public virtual bool IsNotSerialized
- {
- get
- {
- return false;
- }
- }
- }
-
- public partial class FieldForInstantiatedType
- {
- public override bool IsNotSerialized
- {
- get
- {
- return _fieldDef.IsNotSerialized;
- }
- }
- }
-}
+++ /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 Internal.TypeSystem
-{
- public partial class TypeDesc
- {
- /// <summary>
- /// Gets a value indicating whether this type is serializable.
- /// </summary>
- public virtual bool IsSerializable
- {
- get
- {
- return false;
- }
- }
- }
-
- public partial class InstantiatedType
- {
- public override bool IsSerializable
- {
- get
- {
- return _typeDef.IsSerializable;
- }
- }
- }
-}
<Compile Include="..\..\Common\TypeSystem\Ecma\EcmaField.CodeGen.cs">
<Link>Ecma\EcmaField.CodeGen.cs</Link>
</Compile>
- <Compile Include="..\..\Common\TypeSystem\Ecma\EcmaField.Serialization.cs">
- <Link>Ecma\EcmaField.Serialization.cs</Link>
- </Compile>
<Compile Include="..\..\Common\TypeSystem\Ecma\EcmaGenericParameter.Sorting.cs">
<Link>Ecma\EcmaGenericParameter.Sorting.cs</Link>
</Compile>
<Compile Include="..\..\Common\TypeSystem\Ecma\EcmaModule.Sorting.cs">
<Link>Ecma\EcmaModule.Sorting.cs</Link>
</Compile>
- <Compile Include="..\..\Common\TypeSystem\Ecma\EcmaType.Serialization.cs">
- <Link>Ecma\EcmaType.Serialization.cs</Link>
- </Compile>
<Compile Include="..\..\Common\TypeSystem\Ecma\EcmaType.Sorting.cs">
<Link>Ecma\EcmaType.Sorting.cs</Link>
</Compile>
<Compile Include="..\..\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.Sorting.cs">
<Link>IL\Stubs\PInvokeTargetNativeMethod.Sorting.cs</Link>
</Compile>
- <Compile Include="..\..\Common\TypeSystem\Serialization\FieldDesc.Serialization.cs">
- <Link>TypeSystem\CodeGen\FieldDesc.Serialization.cs</Link>
- </Compile>
- <Compile Include="..\..\Common\TypeSystem\Serialization\TypeDesc.Serialization.cs">
- <Link>TypeSystem\CodeGen\TypeDesc.Serialization.cs</Link>
- </Compile>
<Compile Include="..\..\Common\TypeSystem\Sorting\FieldDesc.Sorting.cs">
<Link>TypeSystem\Sorting\FieldDesc.Sorting.cs</Link>
</Compile>