Skip to content

Commit 9187526

Browse files
committed
include serializable attributes again for .net 8 and later
1 parent 034c04d commit 9187526

14 files changed

+0
-42
lines changed

src/Aqua/Dynamic/DynamicObject.cs

-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ namespace Aqua.Dynamic;
1111
using System.Runtime.Serialization;
1212
using System.Xml.Serialization;
1313

14-
#if !NET8_0_OR_GREATER
1514
[Serializable]
16-
#endif // NET8_0_OR_GREATER
1715
[DataContract(IsReference = true)]
1816
[DebuggerDisplay("{GetDebuggerDisplay(),nq}")]
1917
[KnownType(typeof(DynamicObject)), XmlInclude(typeof(DynamicObject))]

src/Aqua/Dynamic/DynamicObjectMapperException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ namespace Aqua.Dynamic;
55
using System;
66
using System.Runtime.Serialization;
77

8-
#if !NET8_0_OR_GREATER
98
[Serializable]
10-
#endif // NET8_0_OR_GREATER
119
public class DynamicObjectMapperException : Exception
1210
{
1311
public DynamicObjectMapperException()

src/Aqua/Dynamic/Property.cs

-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ namespace Aqua.Dynamic;
1010
using System.Runtime.Serialization;
1111
using System.Xml.Serialization;
1212

13-
#if !NET8_0_OR_GREATER
1413
[Serializable]
15-
#endif // NET8_0_OR_GREATER
1614
[DataContract]
1715
[KnownType(typeof(object)), XmlInclude(typeof(object))]
1816
[KnownType(typeof(object[])), XmlInclude(typeof(object[]))]

src/Aqua/Dynamic/PropertySet.cs

-4
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ namespace Aqua.Dynamic;
1414
/// However, since <see cref="Property" /> is not immutable a <see cref="PropertySet"/> may technically not be considered a set
1515
/// and does not guarantee uniqueness of property names.
1616
/// </summary>
17-
#if !NET8_0_OR_GREATER
1817
[Serializable]
19-
#endif // NET8_0_OR_GREATER
2018
[CollectionDataContract]
2119
public class PropertySet : IReadOnlyCollection<Property>
2220
{
23-
#if !NET8_0_OR_GREATER
2421
[Serializable]
25-
#endif // NET8_0_OR_GREATER
2622
private sealed class PropertyComparer : IEqualityComparer<Property>
2723
{
2824
private PropertyComparer()

src/Aqua/TypeSystem/ConstructorInfo.cs

-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ namespace Aqua.TypeSystem;
88
using System.Diagnostics;
99
using System.Runtime.Serialization;
1010

11-
#if !NET8_0_OR_GREATER
1211
[Serializable]
13-
#endif // NET8_0_OR_GREATER
1412
[DataContract(Name = "Constructor", IsReference = true)]
1513
[DebuggerDisplay("Constructor: {Name,nq}")]
1614
public class ConstructorInfo : MethodBaseInfo
@@ -19,9 +17,7 @@ public class ConstructorInfo : MethodBaseInfo
1917

2018
[IgnoreDataMember]
2119
[Unmapped]
22-
#if !NET8_0_OR_GREATER
2320
[NonSerialized]
24-
#endif // NET8_0_OR_GREATER
2521
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
2622
private System.Reflection.ConstructorInfo? _constructor;
2723

src/Aqua/TypeSystem/Emit/TypeEmitterException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ namespace Aqua.TypeSystem.Emit;
55
using System;
66
using System.Runtime.Serialization;
77

8-
#if !NET8_0_OR_GREATER
98
[Serializable]
10-
#endif // NET8_0_OR_GREATER
119
public class TypeEmitterException : Exception
1210
{
1311
public TypeEmitterException()

src/Aqua/TypeSystem/FieldInfo.cs

-4
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@ namespace Aqua.TypeSystem;
77
using System.Diagnostics;
88
using System.Runtime.Serialization;
99

10-
#if !NET8_0_OR_GREATER
1110
[Serializable]
12-
#endif // NET8_0_OR_GREATER
1311
[DataContract(Name = "Field", IsReference = true)]
1412
[DebuggerDisplay("Field: {Name,nq}")]
1513
public class FieldInfo : MemberInfo
1614
{
1715
[IgnoreDataMember]
1816
[Unmapped]
19-
#if !NET8_0_OR_GREATER
2017
[NonSerialized]
21-
#endif // NET8_0_OR_GREATER
2218
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
2319
private System.Reflection.FieldInfo? _field;
2420

src/Aqua/TypeSystem/MemberInfo.cs

-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ namespace Aqua.TypeSystem;
1010
using System.Runtime.Serialization;
1111
using System.Xml.Serialization;
1212

13-
#if !NET8_0_OR_GREATER
1413
[Serializable]
15-
#endif // NET8_0_OR_GREATER
1614
[DataContract(Name = "Member", IsReference = true)]
1715
[KnownType(typeof(ConstructorInfo)), XmlInclude(typeof(ConstructorInfo))]
1816
[KnownType(typeof(FieldInfo)), XmlInclude(typeof(FieldInfo))]
@@ -22,9 +20,7 @@ public abstract class MemberInfo
2220
{
2321
[IgnoreDataMember]
2422
[Unmapped]
25-
#if !NET8_0_OR_GREATER
2623
[NonSerialized]
27-
#endif // NET8_0_OR_GREATER
2824
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
2925
private System.Reflection.MemberInfo? _member;
3026

src/Aqua/TypeSystem/MemberTypes.cs

-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ namespace Aqua.TypeSystem;
44

55
using System;
66

7-
#if !NET8_0_OR_GREATER
87
[Serializable]
9-
#endif // NET8_0_OR_GREATER
108
[Flags]
119
public enum MemberTypes
1210
{

src/Aqua/TypeSystem/MethodBaseInfo.cs

-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ namespace Aqua.TypeSystem;
99
using System.Runtime.Serialization;
1010
using System.Xml.Serialization;
1111

12-
#if !NET8_0_OR_GREATER
1312
[Serializable]
14-
#endif // NET8_0_OR_GREATER
1513
[DataContract(Name = "MethodBase", IsReference = true)]
1614
[KnownType(typeof(ConstructorInfo)), XmlInclude(typeof(ConstructorInfo))]
1715
[KnownType(typeof(MethodInfo)), XmlInclude(typeof(MethodInfo))]

src/Aqua/TypeSystem/MethodInfo.cs

-4
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@ namespace Aqua.TypeSystem;
88
using System.Diagnostics;
99
using System.Runtime.Serialization;
1010

11-
#if !NET8_0_OR_GREATER
1211
[Serializable]
13-
#endif // NET8_0_OR_GREATER
1412
[DataContract(Name = "Method", IsReference = true)]
1513
[DebuggerDisplay("Method: {Name,nq}")]
1614
public class MethodInfo : MethodBaseInfo
1715
{
1816
[IgnoreDataMember]
1917
[Unmapped]
20-
#if !NET8_0_OR_GREATER
2118
[NonSerialized]
22-
#endif // NET8_0_OR_GREATER
2319
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
2420
private System.Reflection.MethodInfo? _method;
2521

src/Aqua/TypeSystem/PropertyInfo.cs

-4
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@ namespace Aqua.TypeSystem;
77
using System.Diagnostics;
88
using System.Runtime.Serialization;
99

10-
#if !NET8_0_OR_GREATER
1110
[Serializable]
12-
#endif // NET8_0_OR_GREATER
1311
[DataContract(Name = "Property", IsReference = true)]
1412
[DebuggerDisplay("Property: {Name,nq}")]
1513
public class PropertyInfo : MemberInfo
1614
{
1715
[IgnoreDataMember]
1816
[Unmapped]
19-
#if !NET8_0_OR_GREATER
2017
[NonSerialized]
21-
#endif // NET8_0_OR_GREATER
2218
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
2319
private System.Reflection.PropertyInfo? _property;
2420

src/Aqua/TypeSystem/TypeInfo.cs

-4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ namespace Aqua.TypeSystem;
1414
using System.Text.RegularExpressions;
1515
using System.Xml.Serialization;
1616

17-
#if !NET8_0_OR_GREATER
1817
[Serializable]
19-
#endif // NET8_0_OR_GREATER
2018
[DataContract(Name = "Type", IsReference = true)]
2119
[DebuggerDisplay("Type: {FullName,nq}")]
2220
[KnownType(typeof(TypeInfo[])), XmlInclude(typeof(TypeInfo[]))]
@@ -26,9 +24,7 @@ public class TypeInfo
2624

2725
[IgnoreDataMember]
2826
[Unmapped]
29-
#if !NET8_0_OR_GREATER
3027
[NonSerialized]
31-
#endif // NET8_0_OR_GREATER
3228
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
3329
private Type? _type;
3430

src/Aqua/TypeSystem/TypeResolverException.cs

-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ namespace Aqua.TypeSystem;
55
using System;
66
using System.Runtime.Serialization;
77

8-
#if !NET8_0_OR_GREATER
98
[Serializable]
10-
#endif // NET8_0_OR_GREATER
119
public class TypeResolverException : Exception
1210
{
1311
public TypeResolverException()

0 commit comments

Comments
 (0)