Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ Symbol | .NET 4.6.2 | .NET Standard 2.0 | .
`FEATURE_APPDOMAIN` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
`FEATURE_ASSEMBLYBUILDER_SAVE` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
`FEATURE_BYREFLIKE` | :no_entry_sign: | :no_entry_sign: | :white_check_mark: | :white_check_mark:
`FEATURE_SERIALIZATION` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:
`FEATURE_SYSTEM_CONFIGURATION` | :white_check_mark: | :no_entry_sign: | :no_entry_sign: | :no_entry_sign:

* `FEATURE_APPDOMAIN` - enables support for features that make use of an AppDomain in the host.
* `FEATURE_ASSEMBLYBUILDER_SAVE` - enabled support for saving the dynamically generated proxy assembly.
* `FEATURE_BYREFLIKE` - enables support for by-ref-like (`ref struct`) types such as `Span<T>` and `ReadOnlySpan<T>`.
* `FEATURE_SERIALIZATION` - enables support for serialization of dynamic proxies and other types.
* `FEATURE_SYSTEM_CONFIGURATION` - enables features that use System.Configuration and the ConfigurationManager.
2 changes: 1 addition & 1 deletion buildscripts/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<DiagnosticsConstants>DEBUG</DiagnosticsConstants>
<NetStandard20Constants>TRACE</NetStandard20Constants>
<NetStandard21Constants>TRACE</NetStandard21Constants>
<DesktopClrConstants>TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_SERIALIZATION;FEATURE_SYSTEM_CONFIGURATION</DesktopClrConstants>
<DesktopClrConstants>TRACE;FEATURE_APPDOMAIN;FEATURE_ASSEMBLYBUILDER_SAVE;FEATURE_SYSTEM_CONFIGURATION</DesktopClrConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)|$(Configuration)'=='net462|Debug'">
Expand Down
53 changes: 1 addition & 52 deletions ref/Castle.Core-net462.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,6 @@ public static void SetXsiType(this Castle.Components.DictionaryAdapter.Xml.IXmlN
}
namespace Castle.Core.Configuration
{
[System.Serializable]
public abstract class AbstractConfiguration : Castle.Core.Configuration.IConfiguration
{
protected AbstractConfiguration() { }
Expand All @@ -1821,13 +1820,10 @@ protected AbstractConfiguration() { }
public string Value { get; protected set; }
public virtual object GetValue(System.Type type, object defaultValue) { }
}
[System.Serializable]
public class ConfigurationAttributeCollection : System.Collections.Specialized.NameValueCollection
{
public ConfigurationAttributeCollection() { }
protected ConfigurationAttributeCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
}
[System.Serializable]
public class ConfigurationCollection : System.Collections.Generic.List<Castle.Core.Configuration.IConfiguration>
{
public ConfigurationCollection() { }
Expand All @@ -1842,7 +1838,6 @@ public interface IConfiguration
string Value { get; }
object GetValue(System.Type type, object defaultValue);
}
[System.Serializable]
public class MutableConfiguration : Castle.Core.Configuration.AbstractConfiguration
{
public MutableConfiguration(string name) { }
Expand Down Expand Up @@ -1884,7 +1879,6 @@ public static class ProxyServices
{
public static bool IsDynamicProxy(System.Type type) { }
}
[System.Serializable]
public class ReferenceEqualityComparer<T> : System.Collections.Generic.IEqualityComparer<T>, System.Collections.IEqualityComparer
{
public static Castle.Core.ReferenceEqualityComparer<T> Instance { get; }
Expand Down Expand Up @@ -1963,7 +1957,6 @@ public virtual Castle.Core.Logging.IExtendedLogger Create(System.Type type, Cast
public abstract Castle.Core.Logging.IExtendedLogger Create(string name, Castle.Core.Logging.LoggerLevel level);
protected static System.IO.FileInfo GetConfigFile(string fileName) { }
}
[System.Serializable]
public abstract class AbstractLoggerFactory : Castle.Core.Logging.ILoggerFactory
{
protected AbstractLoggerFactory() { }
Expand All @@ -1973,7 +1966,6 @@ public virtual Castle.Core.Logging.ILogger Create(System.Type type, Castle.Core.
public abstract Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level);
protected static System.IO.FileInfo GetConfigFile(string fileName) { }
}
[System.Serializable]
public class ConsoleFactory : Castle.Core.Logging.ILoggerFactory
{
public ConsoleFactory() { }
Expand All @@ -1983,7 +1975,6 @@ public Castle.Core.Logging.ILogger Create(string name) { }
public Castle.Core.Logging.ILogger Create(System.Type type, Castle.Core.Logging.LoggerLevel level) { }
public Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
}
[System.Serializable]
public class ConsoleLogger : Castle.Core.Logging.LevelFilteredLogger
{
public ConsoleLogger() { }
Expand Down Expand Up @@ -2080,7 +2071,6 @@ public interface ILoggerFactory
Castle.Core.Logging.ILogger Create(System.Type type, Castle.Core.Logging.LoggerLevel level);
Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level);
}
[System.Serializable]
public abstract class LevelFilteredLogger : Castle.Core.Logging.ILogger
{
protected LevelFilteredLogger() { }
Expand Down Expand Up @@ -2141,12 +2131,10 @@ public void WarnFormat(System.Exception exception, string format, params object[
public void WarnFormat(System.IFormatProvider formatProvider, string format, params object[] args) { }
public void WarnFormat(System.Exception exception, System.IFormatProvider formatProvider, string format, params object[] args) { }
}
[System.Serializable]
public class LoggerException : System.Exception
{
public LoggerException() { }
public LoggerException(string message) { }
protected LoggerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public LoggerException(string message, System.Exception innerException) { }
}
public enum LoggerLevel
Expand All @@ -2159,7 +2147,6 @@ public enum LoggerLevel
Debug = 5,
Trace = 6,
}
[System.Serializable]
public class NullLogFactory : Castle.Core.Logging.AbstractLoggerFactory
{
public NullLogFactory() { }
Expand Down Expand Up @@ -2223,7 +2210,6 @@ public void WarnFormat(System.Exception exception, string format, params object[
public void WarnFormat(System.IFormatProvider formatProvider, string format, params object[] args) { }
public void WarnFormat(System.Exception exception, System.IFormatProvider formatProvider, string format, params object[] args) { }
}
[System.Serializable]
public class StreamLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
{
public StreamLogger(string name, System.IO.Stream stream) { }
Expand All @@ -2236,7 +2222,6 @@ protected virtual void Dispose(bool disposing) { }
protected override void Finalize() { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
[System.Serializable]
public class StreamLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
{
public StreamLoggerFactory() { }
Expand Down Expand Up @@ -2318,7 +2303,6 @@ public bool Accept(Castle.Core.Resource.CustomUri uri) { }
public Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri) { }
public Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri, string basePath) { }
}
[System.Serializable]
public sealed class CustomUri
{
public static readonly string SchemeDelimiter;
Expand Down Expand Up @@ -2362,12 +2346,10 @@ public interface IResourceFactory
Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri);
Castle.Core.Resource.IResource Create(Castle.Core.Resource.CustomUri uri, string basePath);
}
[System.Serializable]
public class ResourceException : System.Exception
{
public ResourceException() { }
public ResourceException(string message) { }
protected ResourceException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public ResourceException(string message, System.Exception innerException) { }
}
public class StaticContentResource : Castle.Core.Resource.AbstractResource
Expand Down Expand Up @@ -2447,7 +2429,6 @@ public void SetGenericMethodArguments(System.Type[] arguments) { }
[System.Diagnostics.CodeAnalysis.DoesNotReturn]
protected void ThrowOnNoTarget() { }
}
[System.Serializable]
public class AllMethodsHook : Castle.DynamicProxy.IProxyGenerationHook
{
protected static readonly System.Collections.Generic.ICollection<System.Type> SkippedTypes;
Expand Down Expand Up @@ -2481,7 +2462,6 @@ public System.Type CreateInterfaceProxyTypeWithTarget(System.Type interfaceToPro
public System.Type CreateInterfaceProxyTypeWithTargetInterface(System.Type interfaceToProxy, System.Type[]? additionalInterfacesToProxy, Castle.DynamicProxy.ProxyGenerationOptions options) { }
public System.Type CreateInterfaceProxyTypeWithoutTarget(System.Type interfaceToProxy, System.Type[]? additionalInterfacesToProxy, Castle.DynamicProxy.ProxyGenerationOptions options) { }
}
[System.Serializable]
public sealed class DynamicProxyException : System.Exception { }
public interface IChangeProxyTarget
{
Expand Down Expand Up @@ -2622,7 +2602,6 @@ public ModuleScope(bool savePhysicalAssembly, bool disableSignedModule, string s
public string StrongNamedModuleName { get; }
public string? WeakNamedModuleDirectory { get; }
public string WeakNamedModuleName { get; }
public void LoadAssemblyIntoCache(System.Reflection.Assembly assembly) { }
public string? SaveAssembly() { }
public string? SaveAssembly(bool strongNamed) { }
public static byte[] GetKeyPair() { }
Expand All @@ -2632,8 +2611,7 @@ public class PersistentProxyBuilder : Castle.DynamicProxy.DefaultProxyBuilder
public PersistentProxyBuilder() { }
public string? SaveAssembly() { }
}
[System.Serializable]
public class ProxyGenerationOptions : System.Runtime.Serialization.ISerializable
public class ProxyGenerationOptions
{
public static readonly Castle.DynamicProxy.ProxyGenerationOptions Default;
public ProxyGenerationOptions() { }
Expand All @@ -2649,7 +2627,6 @@ public void AddDelegateTypeMixin(System.Type delegateType) { }
public void AddMixinInstance(object instance) { }
public override bool Equals(object? obj) { }
public override int GetHashCode() { }
public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public void Initialize() { }
public object[] MixinsAsArray() { }
}
Expand Down Expand Up @@ -2738,7 +2715,6 @@ public static bool IsAccessible(System.Reflection.MethodBase method, [System.Dia
public static bool IsProxy(object? instance) { }
public static bool IsProxyType(System.Type type) { }
}
[System.Serializable]
public class StandardInterceptor : Castle.DynamicProxy.IInterceptor
{
public StandardInterceptor() { }
Expand Down Expand Up @@ -2783,13 +2759,11 @@ protected InheritanceInvocation(System.Type targetType, object proxy, Castle.Dyn
public override System.Type TargetType { get; }
protected abstract override void InvokeMethodOnTarget() { }
}
[System.Serializable]
public sealed class InheritanceInvocationWithoutTarget : Castle.DynamicProxy.Internal.InheritanceInvocation
{
public InheritanceInvocationWithoutTarget(System.Type targetType, object proxy, Castle.DynamicProxy.IInterceptor[] interceptors, System.Reflection.MethodInfo proxiedMethod, object[] arguments) { }
protected override void InvokeMethodOnTarget() { }
}
[System.Serializable]
public sealed class InterfaceMethodWithoutTargetInvocation : Castle.DynamicProxy.AbstractInvocation
{
public InterfaceMethodWithoutTargetInvocation(object? target, object proxy, Castle.DynamicProxy.IInterceptor[] interceptors, System.Reflection.MethodInfo proxiedMethod, object?[] arguments) { }
Expand All @@ -2804,29 +2778,4 @@ public static System.Type[] GetAllInterfaces(this System.Type type) { }
public static System.Type? GetTypeOrNull(object? target) { }
public static System.Reflection.MemberInfo[] Sort(System.Reflection.MemberInfo[] members) { }
}
}
namespace Castle.DynamicProxy.Serialization
{
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false)]
[System.CLSCompliant(false)]
public class CacheMappingsAttribute : System.Attribute
{
public CacheMappingsAttribute(byte[] serializedCacheMappings) { }
public byte[] SerializedCacheMappings { get; }
}
[System.Serializable]
public class ProxyObjectReference : System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.IObjectReference, System.Runtime.Serialization.ISerializable
{
protected ProxyObjectReference(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public static Castle.DynamicProxy.ModuleScope ModuleScope { get; }
public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public object GetRealObject(System.Runtime.Serialization.StreamingContext context) { }
protected void InvokeCallback(object target) { }
public void OnDeserialization(object sender) { }
public object RecreateClassProxy() { }
public object RecreateInterfaceProxy(string generatorType) { }
protected virtual object RecreateProxy() { }
public static void ResetScope() { }
public static void SetScope(Castle.DynamicProxy.ModuleScope scope) { }
}
}
2 changes: 0 additions & 2 deletions ref/Castle.Services.Logging.EventLogIntegration-net462.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")]
namespace Castle.Services.Logging.EventLogIntegration
{
[System.Serializable]
public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
{
public DiagnosticsLogger(string logName) { }
Expand All @@ -14,7 +13,6 @@ protected virtual void Dispose(bool disposing) { }
protected override void Finalize() { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
[System.Serializable]
public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
{
public DiagnosticsLoggerFactory() { }
Expand Down
1 change: 0 additions & 1 deletion ref/Castle.Services.Logging.SerilogIntegration-net462.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public SerilogFactory(Serilog.ILogger logger) { }
public override Castle.Core.Logging.ILogger Create(string name) { }
public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
}
[System.Serializable]
public class SerilogLogger : Castle.Core.Logging.ILogger
{
public SerilogLogger(Serilog.ILogger logger, Castle.Services.Logging.SerilogIntegration.SerilogFactory factory) { }
Expand Down
1 change: 0 additions & 1 deletion ref/Castle.Services.Logging.log4netIntegration-net462.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public Log4netFactory(string configFile) { }
public override Castle.Core.Logging.ILogger Create(string name) { }
public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
}
[System.Serializable]
public class Log4netLogger : Castle.Core.Logging.ILogger
{
public Log4netLogger(log4net.Core.ILogger logger, Castle.Services.Logging.Log4netIntegration.Log4netFactory factory) { }
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ namespace Castle.DynamicProxy.Tests.Classes
{
using System;

#if FEATURE_SERIALIZATION
[Serializable]
#endif
public class ClassOverridingEqualsAndGetHashCode
{
private Guid _id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

namespace Castle.DynamicProxy.Tests.Classes
{
using System;

#if FEATURE_SERIALIZATION
[Serializable]
#endif
public class ClassWithExplicitInterface : ISimpleInterface
{
int ISimpleInterface.Do()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

namespace Castle.DynamicProxy.Tests.Classes
{
using System;

#if FEATURE_SERIALIZATION
[Serializable]
#endif
public class ClassWithInterface : ISimpleInterface
{
public int Do()
Expand Down
Loading
Loading