Skip to content

Commit e0ff80e

Browse files
committed
target netstandard2.0 where possible
1 parent 944e1d7 commit e0ff80e

File tree

142 files changed

+648
-1760
lines changed

Some content is hidden

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

142 files changed

+648
-1760
lines changed

Spring.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ Commandline Examples:
853853
<include name="**/nunit.*.xml"/>
854854
<include name="**/NUnitAsp.dll"/>
855855
<include name="**/NUnitAspEx.dll"/>
856-
<include name="**/Rhino.Mocks.dll"/>
857856
<include if="${not net-4.0}" name="**/System.Web.Extensions.dll"/>
858857
<include name="**/Apache.NMS.dll"/>
859858
<include name="**/Apache.NMS.pdb"/>

Spring.include

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@
257257
<import namespace="System.Reflection" />
258258
</imports>
259259
<attributes>
260-
<attribute type="CLSCompliantAttribute" value="${assembly.is-cls-compliant}" />
261260
<attribute type="AssemblyConfigurationAttribute" value="${assembly.configuration}" />
262261
<attribute type="AssemblyProductAttribute" value="${assembly.product}" />
263262
<attribute type="AssemblyCompanyAttribute" value="${assembly.company}" />

global.json

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

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636

3737
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
3838

39-
<CLSCompliant>True</CLSCompliant>
4039
<ComVisible>False</ComVisible>
4140

4241
<DebugSymbols>True</DebugSymbols>
4342
<PlatformTarget>AnyCPU</PlatformTarget>
4443
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
4544

4645
<LangVersion>latest</LangVersion>
46+
<TargetFullFrameworkVersion>net452</TargetFullFrameworkVersion>
4747

4848
</PropertyGroup>
4949

src/Spring/Spring.Aop/Aop/Framework/Adapter/UnknownAdviceTypeException.cs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ public class UnknownAdviceTypeException : ArgumentException
4141
/// Creates a new instance of the
4242
/// <see cref="Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"/> class.
4343
/// </summary>
44-
/// <param name="advice">The advice that caused the exception.</param>
45-
public UnknownAdviceTypeException(object advice)
46-
: base("No adapter for IAdvice of type ["
47-
+ (advice != null ? advice.GetType().FullName : "null") + "].")
44+
public UnknownAdviceTypeException()
4845
{
4946
}
5047

5148
/// <summary>
5249
/// Creates a new instance of the
5350
/// <see cref="Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"/> class.
5451
/// </summary>
55-
public UnknownAdviceTypeException()
52+
/// <param name="advice">The advice that caused the exception.</param>
53+
public UnknownAdviceTypeException(object advice)
54+
: base("No adapter for IAdvice of type ["
55+
+ (advice != null ? advice.GetType().FullName : "null") + "].")
5656
{
5757
}
5858

@@ -84,18 +84,7 @@ public UnknownAdviceTypeException(string message, Exception rootCause)
8484
{
8585
}
8686

87-
/// <summary>
88-
/// Creates a new instance of the
89-
/// <see cref="Spring.Aop.Framework.Adapter.UnknownAdviceTypeException"/> class.
90-
/// </summary>
91-
/// <param name="info">
92-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
93-
/// that holds the serialized object data about the exception being thrown.
94-
/// </param>
95-
/// <param name="context">
96-
/// The <see cref="System.Runtime.Serialization.StreamingContext"/>
97-
/// that contains contextual information about the source or destination.
98-
/// </param>
87+
/// <inheritdoc />
9988
protected UnknownAdviceTypeException(SerializationInfo info, StreamingContext context)
10089
: base(info, context)
10190
{

src/Spring/Spring.Aop/Aop/Framework/AopConfigException.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,7 @@ public AopConfigException (string message, Exception rootCause)
7171
{
7272
}
7373

74-
/// <summary>
75-
/// Creates a new instance of the
76-
/// <see cref="Spring.Aop.Framework.AopConfigException"/> class.
77-
/// </summary>
78-
/// <param name="info">
79-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
80-
/// that holds the serialized object data about the exception being thrown.
81-
/// </param>
82-
/// <param name="context">
83-
/// The <see cref="System.Runtime.Serialization.StreamingContext"/>
84-
/// that contains contextual information about the source or destination.
85-
/// </param>
74+
/// <inheritdoc />
8675
protected AopConfigException (
8776
SerializationInfo info, StreamingContext context)
8877
: base (info, context)

src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAutoProxyCreator.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,13 @@ public virtual object PostProcessAfterInitialization(object obj, string objectNa
246246
return obj;
247247
}
248248

249-
Type objectType = RemotingServices.IsTransparentProxy(obj)
249+
#if NETSTANDARD
250+
var isTransparentProxy = false;
251+
#else
252+
var isTransparentProxy = RemotingServices.IsTransparentProxy(obj);
253+
#endif
254+
255+
Type objectType = isTransparentProxy
250256
? ObjectFactory.GetType(objectName)
251257
: obj.GetType();
252258

src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyMethodBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ protected virtual void DeclareLocals(ILGenerator il, MethodInfo method)
376376
returnValue = il.DeclareLocal(method.ReturnType);
377377
}
378378

379-
#if DEBUG
379+
#if DEBUG && !NETSTANDARD
380380
interceptors.SetLocalSymInfo("interceptors");
381381
targetType.SetLocalSymInfo("targetType");
382382
arguments.SetLocalSymInfo("arguments");

src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyTypeBuilder.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,7 @@ public override void PushTarget(ILGenerator il)
6969

7070
#region Protected Methods
7171

72-
/// <summary>
73-
/// Calculates and returns the list of attributes that apply to the
74-
/// specified type.
75-
/// </summary>
76-
/// <remarks>
77-
/// Removes <see cref="System.SerializableAttribute"/> from the list.
78-
/// </remarks>
79-
/// <param name="type">The type to find attributes for.</param>
80-
/// <returns>
81-
/// A list of custom attributes that should be applied to type.
82-
/// </returns>
72+
/// <inheritdoc />
8373
protected override IList GetTypeAttributes(Type type)
8474
{
8575
IList attrs = base.GetTypeAttributes(type);

src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/TargetAopProxyMethodBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected override void DeclareLocals(ILGenerator il, MethodInfo method)
8282
base.DeclareLocals(il, method);
8383
target = il.DeclareLocal(typeof(object));
8484

85-
#if DEBUG
85+
#if DEBUG && !NETSTANDARD
8686
target.SetLocalSymInfo("target");
8787
#endif
8888
}

src/Spring/Spring.Aop/Aop/Support/AbstractRegularExpressionMethodPointcut.cs

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace Spring.Aop.Support
4444
/// </p>
4545
/// <p>
4646
/// This base class is serializable. Subclasses should decorate all
47-
/// fields with the <see cref="System.NonSerializedAttribute"/> - the
47+
/// fields with the NonSerializedAttribute - the
4848
/// <see cref="AbstractRegularExpressionMethodPointcut.InitPatternRepresentation"/>
4949
/// method in this class will be invoked again on the client side on deserialization.
5050
/// </p>
@@ -76,21 +76,7 @@ protected AbstractRegularExpressionMethodPointcut()
7676
{
7777
}
7878

79-
/// <summary>
80-
/// Creates a new instance of the <see cref="AbstractRegularExpressionMethodPointcut"/>
81-
/// class.
82-
/// </summary>
83-
/// <param name="info">
84-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
85-
/// that holds the serialized object data about the exception being thrown.
86-
/// </param>
87-
/// <param name="context">
88-
/// The <see cref="System.Runtime.Serialization.StreamingContext"/>
89-
/// that contains contextual information about the source or destination.
90-
/// </param>
91-
/// <exception cref="AopAlliance.Aop.AspectException">
92-
/// If an error was encountered during the deserialization process.
93-
/// </exception>
79+
/// <inheritdoc />
9480
protected AbstractRegularExpressionMethodPointcut(
9581
SerializationInfo info, StreamingContext context)
9682
{
@@ -171,18 +157,7 @@ public virtual object[] Patterns
171157

172158
#region Methods
173159

174-
/// <summary>
175-
/// Populates a <see cref="System.Runtime.Serialization.SerializationInfo"/> with
176-
/// the data needed to serialize the target object.
177-
/// </summary>
178-
/// <param name="info">
179-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate
180-
/// with data.
181-
/// </param>
182-
/// <param name="context">
183-
/// The destination (see <see cref="System.Runtime.Serialization.StreamingContext"/>)
184-
/// for this serialization.
185-
/// </param>
160+
/// <inheritdoc />
186161
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
187162
public void GetObjectData(SerializationInfo info, StreamingContext context)
188163
{

src/Spring/Spring.Aop/Aop/Support/SdkRegularExpressionMethodPointcut.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,7 @@ public SdkRegularExpressionMethodPointcut(params string[] patterns)
7575
Patterns = patterns;
7676
}
7777

78-
/// <summary>
79-
/// Creates a new instance of the
80-
/// <see cref="SdkRegularExpressionMethodPointcut"/> class.
81-
/// </summary>
82-
/// <param name="info">
83-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
84-
/// that holds the serialized object data about the exception being thrown.
85-
/// </param>
86-
/// <param name="context">
87-
/// The <see cref="System.Runtime.Serialization.StreamingContext"/>
88-
/// that contains contextual information about the source or destination.
89-
/// </param>
90-
/// <exception cref="AopAlliance.Aop.AspectException">
91-
/// If an error was encountered during the deserialization process.
92-
/// </exception>
78+
/// <inheritdoc />
9379
protected SdkRegularExpressionMethodPointcut(SerializationInfo info, StreamingContext context)
9480
: base(info, context)
9581
{

src/Spring/Spring.Aop/Aop/Target/EmptyTargetSource.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,26 +128,13 @@ public override string ToString()
128128
return "EmptyTargetSource: no target";
129129
}
130130

131-
/// <summary>
132-
/// Populates a <see cref="System.Runtime.Serialization.SerializationInfo"/> with
133-
/// the data needed to serialize the target object.
134-
/// </summary>
135-
/// <param name="info">
136-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate
137-
/// with data.
138-
/// </param>
139-
/// <param name="context">
140-
/// The destination (see <see cref="System.Runtime.Serialization.StreamingContext"/>)
141-
/// for this serialization.
142-
/// </param>
131+
/// <inheritdoc />
143132
[SecurityPermission(SecurityAction.Demand, SerializationFormatter=true)]
144133
public void GetObjectData(SerializationInfo info, StreamingContext context)
145134
{
146135
info.SetType(typeof (EmptyTargetSourceObjectReference));
147136
}
148137

149-
150-
151138
[Serializable]
152139
private sealed class EmptyTargetSourceObjectReference : IObjectReference
153140
{

src/Spring/Spring.Aop/Aop/TrueMethodMatcher.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,7 @@ public override string ToString()
124124
return "TrueMethodMatcher.True";
125125
}
126126

127-
/// <summary>
128-
/// Populates a <see cref="System.Runtime.Serialization.SerializationInfo"/> with
129-
/// the data needed to serialize the target object.
130-
/// </summary>
131-
/// <param name="info">
132-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate
133-
/// with data.
134-
/// </param>
135-
/// <param name="context">
136-
/// The destination (see <see cref="System.Runtime.Serialization.StreamingContext"/>)
137-
/// for this serialization.
138-
/// </param>
127+
/// <inheritdoc />
139128
[SecurityPermission (SecurityAction.Demand,SerializationFormatter=true)]
140129
public void GetObjectData(SerializationInfo info, StreamingContext context)
141130
{

src/Spring/Spring.Aop/Aop/TruePointcut.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,7 @@ public override string ToString()
9191
return "TruePointcut.TRUE";
9292
}
9393

94-
/// <summary>
95-
/// Populates a <see cref="System.Runtime.Serialization.SerializationInfo"/> with
96-
/// the data needed to serialize the target object.
97-
/// </summary>
98-
/// <param name="info">
99-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate
100-
/// with data.
101-
/// </param>
102-
/// <param name="context">
103-
/// The destination (see <see cref="System.Runtime.Serialization.StreamingContext"/>)
104-
/// for this serialization.
105-
/// </param>
94+
/// <inheritdoc />
10695
[SecurityPermission (SecurityAction.Demand,SerializationFormatter=true)]
10796
public void GetObjectData(SerializationInfo info, StreamingContext context)
10897
{

src/Spring/Spring.Aop/Aop/TrueTypeFilter.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,7 @@ public override string ToString()
9393
return "TrueTypeFilter.True";
9494
}
9595

96-
/// <summary>
97-
/// Populates a <see cref="System.Runtime.Serialization.SerializationInfo"/> with
98-
/// the data needed to serialize the target object.
99-
/// </summary>
100-
/// <param name="info">
101-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/> to populate
102-
/// with data.
103-
/// </param>
104-
/// <param name="context">
105-
/// The destination (see <see cref="System.Runtime.Serialization.StreamingContext"/>)
106-
/// for this serialization.
107-
/// </param>
96+
/// <inheritdoc />
10897
[SecurityPermission(SecurityAction.Demand, SerializationFormatter=true)]
10998
public void GetObjectData(SerializationInfo info, StreamingContext context)
11099
{

src/Spring/Spring.Aop/AopAlliance/Aop/AspectException.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,7 @@ public AspectException(string message, Exception innerException)
5959
{
6060
}
6161

62-
/// <summary>
63-
/// Creates a new instance of the
64-
/// <see cref="AopAlliance.Aop.AspectException"/> class.
65-
/// </summary>
66-
/// <param name="info">
67-
/// The <see cref="System.Runtime.Serialization.SerializationInfo"/>
68-
/// that holds the serialized object data about the exception being thrown.
69-
/// </param>
70-
/// <param name="context">
71-
/// The <see cref="System.Runtime.Serialization.StreamingContext"/>
72-
/// that contains contextual information about the source or destination.
73-
/// </param>
62+
/// <inheritdoc />
7463
protected AspectException(SerializationInfo info, StreamingContext context)
7564
: base(info, context)
7665
{

src/Spring/Spring.Aop/Spring.Aop.2010.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net452</TargetFrameworks>
3+
<TargetFrameworks>netstandard2.0;$(TargetFullFrameworkVersion)</TargetFrameworks>
44
<Description>Interfaces and classes that provide AOP support in Spring.Net</Description>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="Antlr" Version="3.5.0.2" />
7+
<PackageReference Include="Antlr3.Runtime" Version="3.5.1" />
88
</ItemGroup>
99
<ItemGroup>
1010
<ProjectReference Include="..\Spring.Core\Spring.Core.2010.csproj" />

src/Spring/Spring.Core/Context/Attributes/AssemblyObjectDefinitionScanner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class AssemblyObjectDefinitionScanner : RequiredConstraintAssemblyTypeSca
4747
"NUnit",
4848
"Quartz",
4949
"NVelocity",
50-
"Rhino.Mocks",
50+
"FakeItEasy",
5151
"Apache.NMS"
5252
};
5353

src/Spring/Spring.Core/Context/Attributes/AssemblyTypeSource.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
using System.Collections;
2323
using System.Collections.Generic;
2424
using System.Reflection;
25-
using System.Runtime.InteropServices;
2625
using Common.Logging;
2726
using Spring.Util;
2827

@@ -39,7 +38,7 @@ public class AssemblyTypeSource : IEnumerable<Type>
3938
/// </summary>
4039
protected static readonly ILog Logger = LogManager.GetLogger<AssemblyTypeSource>();
4140

42-
private readonly _Assembly _assembly;
41+
private readonly Assembly _assembly;
4342

4443
/// <summary>
4544
/// Initializes a new instance of the <see cref="AssemblyTypeSource"/> class.

src/Spring/Spring.Core/Context/Attributes/ConfigurationClassEnhancer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public override Type BuildProxyType()
173173
new ConfigurationClassProxyMethodBuilder(typeBuilder, this, false, targetMethods),
174174
BaseType, this.DeclaredMembersOnly);
175175

176-
Type proxyType = typeBuilder.CreateType();
176+
Type proxyType = typeBuilder.CreateTypeInfo();
177177

178178
// set target method references
179179
foreach (DictionaryEntry entry in targetMethods)

0 commit comments

Comments
 (0)