Skip to content

Commit c8266f8

Browse files
committed
Removed legacy FEATURE_SERIALIZATION
1 parent 9631074 commit c8266f8

107 files changed

Lines changed: 11 additions & 3124 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ Symbol | .NET 4.6.2 | .NET Standard 2.0 | .
5555
`FEATURE_APPDOMAIN` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
5656
`FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
5757
`FEATURE_BYREFLIKE` | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark:
58-
`FEATURE_SERIALIZATION` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
5958
`FEATURE_SYSTEM_CONFIGURATION` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
6059

6160
* `FEATURE_APPDOMAIN` - enables support for features that make use of an AppDomain in the host.
6261
* `FEATURE_ASSEMBLYBUILDER_SAVE` - enabled support for saving the dynamically generated proxy assembly.
6362
* `FEATURE_BYREFLIKE` - enables support for by-ref-like (`ref struct`) types such as `Span<T>` and `ReadOnlySpan<T>`.
64-
* `FEATURE_SERIALIZATION` - enables support for serialization of dynamic proxies and other types.
6563
* `FEATURE_SYSTEM_CONFIGURATION` - enables features that use System.Configuration and the ConfigurationManager.

buildscripts/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<DiagnosticsConstants>DEBUG</DiagnosticsConstants>
5757
<NetStandard20Constants>TRACE</NetStandard20Constants>
5858
<NetStandard21Constants>TRACE</NetStandard21Constants>
59-
<DesktopClrConstants>TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_SERIALIZATION;FEATURE_SYSTEM_CONFIGURATION</DesktopClrConstants>
59+
<DesktopClrConstants>TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_SYSTEM_CONFIGURATION</DesktopClrConstants>
6060
</PropertyGroup>
6161

6262
<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net462|Debug'">

ref/Castle.Core-net462.cs

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,6 @@ public static void SetXsiType(this Castle.Components.DictionaryAdapter.Xml.IXmlN
18111811
}
18121812
namespace Castle.Core.Configuration
18131813
{
1814-
[System.Serializable]
18151814
public abstract class AbstractConfiguration : Castle.Core.Configuration.IConfiguration
18161815
{
18171816
protected AbstractConfiguration() { }
@@ -1821,13 +1820,10 @@ protected AbstractConfiguration() { }
18211820
public string Value { get; protected set; }
18221821
public virtual object GetValue(System.Type type, object defaultValue) { }
18231822
}
1824-
[System.Serializable]
18251823
public class ConfigurationAttributeCollection : System.Collections.Specialized.NameValueCollection
18261824
{
18271825
public ConfigurationAttributeCollection() { }
1828-
protected ConfigurationAttributeCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
18291826
}
1830-
[System.Serializable]
18311827
public class ConfigurationCollection : System.Collections.Generic.List<Castle.Core.Configuration.IConfiguration>
18321828
{
18331829
public ConfigurationCollection() { }
@@ -1842,7 +1838,6 @@ public interface IConfiguration
18421838
string Value { get; }
18431839
object GetValue(System.Type type, object defaultValue);
18441840
}
1845-
[System.Serializable]
18461841
public class MutableConfiguration : Castle.Core.Configuration.AbstractConfiguration
18471842
{
18481843
public MutableConfiguration(string name) { }
@@ -1884,7 +1879,6 @@ public static class ProxyServices
18841879
{
18851880
public static bool IsDynamicProxy(System.Type type) { }
18861881
}
1887-
[System.Serializable]
18881882
public class ReferenceEqualityComparer<T> : System.Collections.Generic.IEqualityComparer<T>, System.Collections.IEqualityComparer
18891883
{
18901884
public static Castle.Core.ReferenceEqualityComparer<T> Instance { get; }
@@ -1963,7 +1957,6 @@ public virtual Castle.Core.Logging.IExtendedLogger Create(System.Type type, Cast
19631957
public abstract Castle.Core.Logging.IExtendedLogger Create(string name, Castle.Core.Logging.LoggerLevel level);
19641958
protected static System.IO.FileInfo GetConfigFile(string fileName) { }
19651959
}
1966-
[System.Serializable]
19671960
public abstract class AbstractLoggerFactory : Castle.Core.Logging.ILoggerFactory
19681961
{
19691962
protected AbstractLoggerFactory() { }
@@ -1973,7 +1966,6 @@ public virtual Castle.Core.Logging.ILogger Create(System.Type type, Castle.Core.
19731966
public abstract Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level);
19741967
protected static System.IO.FileInfo GetConfigFile(string fileName) { }
19751968
}
1976-
[System.Serializable]
19771969
public class ConsoleFactory : Castle.Core.Logging.ILoggerFactory
19781970
{
19791971
public ConsoleFactory() { }
@@ -1983,7 +1975,6 @@ public Castle.Core.Logging.ILogger Create(string name) { }
19831975
public Castle.Core.Logging.ILogger Create(System.Type type, Castle.Core.Logging.LoggerLevel level) { }
19841976
public Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
19851977
}
1986-
[System.Serializable]
19871978
public class ConsoleLogger : Castle.Core.Logging.LevelFilteredLogger
19881979
{
19891980
public ConsoleLogger() { }
@@ -2080,7 +2071,6 @@ public interface ILoggerFactory
20802071
Castle.Core.Logging.ILogger Create(System.Type type, Castle.Core.Logging.LoggerLevel level);
20812072
Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level);
20822073
}
2083-
[System.Serializable]
20842074
public abstract class LevelFilteredLogger : Castle.Core.Logging.ILogger
20852075
{
20862076
protected LevelFilteredLogger() { }
@@ -2141,12 +2131,10 @@ public void WarnFormat(System.Exception exception, string format, params object[
21412131
public void WarnFormat(System.IFormatProvider formatProvider, string format, params object[] args) { }
21422132
public void WarnFormat(System.Exception exception, System.IFormatProvider formatProvider, string format, params object[] args) { }
21432133
}
2144-
[System.Serializable]
21452134
public class LoggerException : System.Exception
21462135
{
21472136
public LoggerException() { }
21482137
public LoggerException(string message) { }
2149-
protected LoggerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
21502138
public LoggerException(string message, System.Exception innerException) { }
21512139
}
21522140
public enum LoggerLevel
@@ -2159,7 +2147,6 @@ public enum LoggerLevel
21592147
Debug = 5,
21602148
Trace = 6,
21612149
}
2162-
[System.Serializable]
21632150
public class NullLogFactory : Castle.Core.Logging.AbstractLoggerFactory
21642151
{
21652152
public NullLogFactory() { }
@@ -2223,7 +2210,6 @@ public void WarnFormat(System.Exception exception, string format, params object[
22232210
public void WarnFormat(System.IFormatProvider formatProvider, string format, params object[] args) { }
22242211
public void WarnFormat(System.Exception exception, System.IFormatProvider formatProvider, string format, params object[] args) { }
22252212
}
2226-
[System.Serializable]
22272213
public class StreamLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
22282214
{
22292215
public StreamLogger(string name, System.IO.Stream stream) { }
@@ -2236,7 +2222,6 @@ protected virtual void Dispose(bool disposing) { }
22362222
protected override void Finalize() { }
22372223
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
22382224
}
2239-
[System.Serializable]
22402225
public class StreamLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
22412226
{
22422227
public StreamLoggerFactory() { }
@@ -2318,7 +2303,6 @@ public bool Accept(Castle.Core.Resource.CustomUri uri) { }
23182303
public Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri) { }
23192304
public Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri, string basePath) { }
23202305
}
2321-
[System.Serializable]
23222306
public sealed class CustomUri
23232307
{
23242308
public static readonly string SchemeDelimiter;
@@ -2362,12 +2346,10 @@ public interface IResourceFactory
23622346
Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri);
23632347
Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri, string basePath);
23642348
}
2365-
[System.Serializable]
23662349
public class ResourceException : System.Exception
23672350
{
23682351
public ResourceException() { }
23692352
public ResourceException(string message) { }
2370-
protected ResourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
23712353
public ResourceException(string message, System.Exception innerException) { }
23722354
}
23732355
public class StaticContentResource : Castle.Core.Resource.AbstractResource
@@ -2447,7 +2429,6 @@ public void SetGenericMethodArguments(System.Type[] arguments) { }
24472429
[System.Diagnostics.CodeAnalysis.DoesNotReturn]
24482430
protected void ThrowOnNoTarget() { }
24492431
}
2450-
[System.Serializable]
24512432
public class AllMethodsHook : Castle.DynamicProxy.IProxyGenerationHook
24522433
{
24532434
protected static readonly System.Collections.Generic.ICollection<System.Type> SkippedTypes;
@@ -2481,7 +2462,6 @@ public System.Type CreateInterfaceProxyTypeWithTarget(System.Type interfaceToPro
24812462
public System.Type CreateInterfaceProxyTypeWithTargetInterface(System.Type interfaceToProxy, System.Type[]? additionalInterfacesToProxy, Castle.DynamicProxy.ProxyGenerationOptions options) { }
24822463
public System.Type CreateInterfaceProxyTypeWithoutTarget(System.Type interfaceToProxy, System.Type[]? additionalInterfacesToProxy, Castle.DynamicProxy.ProxyGenerationOptions options) { }
24832464
}
2484-
[System.Serializable]
24852465
public sealed class DynamicProxyException : System.Exception { }
24862466
public interface IChangeProxyTarget
24872467
{
@@ -2622,7 +2602,6 @@ public ModuleScope(bool savePhysicalAssembly, bool disableSignedModule, string s
26222602
public string StrongNamedModuleName { get; }
26232603
public string? WeakNamedModuleDirectory { get; }
26242604
public string WeakNamedModuleName { get; }
2625-
public void LoadAssemblyIntoCache(System.Reflection.Assembly assembly) { }
26262605
public string? SaveAssembly() { }
26272606
public string? SaveAssembly(bool strongNamed) { }
26282607
public static byte[] GetKeyPair() { }
@@ -2632,8 +2611,7 @@ public class PersistentProxyBuilder : Castle.DynamicProxy.DefaultProxyBuilder
26322611
public PersistentProxyBuilder() { }
26332612
public string? SaveAssembly() { }
26342613
}
2635-
[System.Serializable]
2636-
public class ProxyGenerationOptions : System.Runtime.Serialization.ISerializable
2614+
public class ProxyGenerationOptions
26372615
{
26382616
public static readonly Castle.DynamicProxy.ProxyGenerationOptions Default;
26392617
public ProxyGenerationOptions() { }
@@ -2649,7 +2627,6 @@ public void AddDelegateTypeMixin(System.Type delegateType) { }
26492627
public void AddMixinInstance(object instance) { }
26502628
public override bool Equals(object? obj) { }
26512629
public override int GetHashCode() { }
2652-
public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
26532630
public void Initialize() { }
26542631
public object[] MixinsAsArray() { }
26552632
}
@@ -2738,7 +2715,6 @@ public static bool IsAccessible(System.Reflection.MethodBase method, [System.Dia
27382715
public static bool IsProxy(object? instance) { }
27392716
public static bool IsProxyType(System.Type type) { }
27402717
}
2741-
[System.Serializable]
27422718
public class StandardInterceptor : Castle.DynamicProxy.IInterceptor
27432719
{
27442720
public StandardInterceptor() { }
@@ -2783,13 +2759,11 @@ protected InheritanceInvocation(System.Type targetType, object proxy, Castle.Dyn
27832759
public override System.Type TargetType { get; }
27842760
protected abstract override void InvokeMethodOnTarget() { }
27852761
}
2786-
[System.Serializable]
27872762
public sealed class InheritanceInvocationWithoutTarget : Castle.DynamicProxy.Internal.InheritanceInvocation
27882763
{
27892764
public InheritanceInvocationWithoutTarget(System.Type targetType, object proxy, Castle.DynamicProxy.IInterceptor[] interceptors, System.Reflection.MethodInfo proxiedMethod, object[] arguments) { }
27902765
protected override void InvokeMethodOnTarget() { }
27912766
}
2792-
[System.Serializable]
27932767
public sealed class InterfaceMethodWithoutTargetInvocation : Castle.DynamicProxy.AbstractInvocation
27942768
{
27952769
public InterfaceMethodWithoutTargetInvocation(object? target, object proxy, Castle.DynamicProxy.IInterceptor[] interceptors, System.Reflection.MethodInfo proxiedMethod, object?[] arguments) { }
@@ -2804,29 +2778,4 @@ public static System.Type[] GetAllInterfaces(this System.Type type) { }
28042778
public static System.Type? GetTypeOrNull(object? target) { }
28052779
public static System.Reflection.MemberInfo[] Sort(System.Reflection.MemberInfo[] members) { }
28062780
}
2807-
}
2808-
namespace Castle.DynamicProxy.Serialization
2809-
{
2810-
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false)]
2811-
[System.CLSCompliant(false)]
2812-
public class CacheMappingsAttribute : System.Attribute
2813-
{
2814-
public CacheMappingsAttribute(byte[] serializedCacheMappings) { }
2815-
public byte[] SerializedCacheMappings { get; }
2816-
}
2817-
[System.Serializable]
2818-
public class ProxyObjectReference : System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable
2819-
{
2820-
protected ProxyObjectReference(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
2821-
public static Castle.DynamicProxy.ModuleScope ModuleScope { get; }
2822-
public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
2823-
public object GetRealObject(System.Runtime.Serialization.StreamingContext context) { }
2824-
protected void InvokeCallback(object target) { }
2825-
public void OnDeserialization(object sender) { }
2826-
public object RecreateClassProxy() { }
2827-
public object RecreateInterfaceProxy(string generatorType) { }
2828-
protected virtual object RecreateProxy() { }
2829-
public static void ResetScope() { }
2830-
public static void SetScope(Castle.DynamicProxy.ModuleScope scope) { }
2831-
}
28322781
}

ref/Castle.Services.Logging.EventLogIntegration-net462.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")]
33
namespace Castle.Services.Logging.EventLogIntegration
44
{
5-
[System.Serializable]
65
public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
76
{
87
public DiagnosticsLogger(string logName) { }
@@ -14,7 +13,6 @@ protected virtual void Dispose(bool disposing) { }
1413
protected override void Finalize() { }
1514
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
1615
}
17-
[System.Serializable]
1816
public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
1917
{
2018
public DiagnosticsLoggerFactory() { }

ref/Castle.Services.Logging.SerilogIntegration-net462.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public SerilogFactory(Serilog.ILogger logger) { }
99
public override Castle.Core.Logging.ILogger Create(string name) { }
1010
public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
1111
}
12-
[System.Serializable]
1312
public class SerilogLogger : Castle.Core.Logging.ILogger
1413
{
1514
public SerilogLogger(Serilog.ILogger logger, Castle.Services.Logging.SerilogIntegration.SerilogFactory factory) { }

ref/Castle.Services.Logging.log4netIntegration-net462.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public Log4netFactory(string configFile) { }
3838
public override Castle.Core.Logging.ILogger Create(string name) { }
3939
public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
4040
}
41-
[System.Serializable]
4241
public class Log4netLogger : Castle.Core.Logging.ILogger
4342
{
4443
public Log4netLogger(log4net.Core.ILogger logger, Castle.Services.Logging.Log4netIntegration.Log4netFactory factory) { }

src/Castle.Core.Tests/DynamicProxy.Tests/BugsReported/DynProxy159.cs

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassOverridingEqualsAndGetHashCode.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ namespace Castle.DynamicProxy.Tests.Classes
1616
{
1717
using System;
1818

19-
#if FEATURE_SERIALIZATION
20-
[Serializable]
21-
#endif
2219
public class ClassOverridingEqualsAndGetHashCode
2320
{
2421
private Guid _id;

src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithExplicitInterface.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414

1515
namespace Castle.DynamicProxy.Tests.Classes
1616
{
17-
using System;
18-
19-
#if FEATURE_SERIALIZATION
20-
[Serializable]
21-
#endif
2217
public class ClassWithExplicitInterface : ISimpleInterface
2318
{
2419
int ISimpleInterface.Do()

src/Castle.Core.Tests/DynamicProxy.Tests/Classes/ClassWithInterface.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414

1515
namespace Castle.DynamicProxy.Tests.Classes
1616
{
17-
using System;
18-
19-
#if FEATURE_SERIALIZATION
20-
[Serializable]
21-
#endif
2217
public class ClassWithInterface : ISimpleInterface
2318
{
2419
public int Do()

0 commit comments

Comments
 (0)