Skip to content

Commit 7b163f0

Browse files
authored
Enable implicit usings (#224)
1 parent c1494dd commit 7b163f0

File tree

1,111 files changed

+5940
-8483
lines changed

Some content is hidden

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

1,111 files changed

+5940
-8483
lines changed

build-support/nuke-build/Configuration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
21
using System.ComponentModel;
3-
using System.Linq;
42
using Nuke.Common.Tooling;
53

64
[TypeConverter(typeof(TypeConverter<Configuration>))]

src/Directory.Build.props

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<Company>SpringSource</Company>
1818
<Copyright>Copyright 2002-2021 Spring.NET Framework Team.</Copyright>
1919
<Trademark>Apache License, Version 2.0</Trademark>
20-
20+
2121
<CommonLoggingVersion>3.4.1</CommonLoggingVersion>
2222

2323
<Authors>SpringSource</Authors>
24-
<PackageIcon>SpringSource_Leaves32x32.png</PackageIcon>
24+
<PackageIcon>SpringSource_Leaves32x32.png</PackageIcon>
2525
<PackageIconUrl>https://springframework.net/images/SpringSource_Leaves32x32.png</PackageIconUrl>
26-
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
26+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
2727
<PackageProjectUrl>https://www.springframework.net/</PackageProjectUrl>
2828
<PackageTags>Library</PackageTags>
2929

@@ -45,27 +45,29 @@
4545
<LangVersion>latest</LangVersion>
4646
<TargetFullFrameworkVersion>net462</TargetFullFrameworkVersion>
4747

48+
<ImplicitUsings>enable</ImplicitUsings>
49+
4850
</PropertyGroup>
49-
51+
5052
<ItemGroup Condition="'$(SourceLinkEnabled)' != 'false'">
51-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
53+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
5254
</ItemGroup>
53-
55+
5456
<ItemGroup>
55-
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="4.0.0" PrivateAssets="All" />
57+
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0.1" PrivateAssets="All"/>
5658
</ItemGroup>
5759

5860
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
59-
<DebugType>Full</DebugType>
61+
<DebugType>Full</DebugType>
6062
<DefineConstants>$(DefineConstants);DEBUG_DYNAMIC;</DefineConstants>
6163
</PropertyGroup>
6264

6365
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
6466
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
6567
</PropertyGroup>
66-
68+
6769
<ItemGroup>
6870
<None Include="..\..\SpringSource_Leaves32x32.png" Pack="true" Visible="false" PackagePath=""/>
69-
</ItemGroup>
71+
</ItemGroup>
7072

7173
</Project>

src/Spring/Spring.Aop/Aop/Config/AopNamespaceUtils.cs

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
2423
using System.Xml;
2524
using Spring.Aop.Framework.AutoProxy;
2625
using Spring.Objects.Factory.Config;
@@ -38,48 +37,48 @@ namespace Spring.Aop.Config
3837
/// </summary>
3938
/// <author>Rob Harrop</author>
4039
/// <author>Juergen Hoeller</author>
41-
/// <author>Mark Pollack (.NET)</author>
40+
/// <author>Mark Pollack (.NET)</author>
4241
/// <author>Erich Eichinger (.NET)</author>
4342
public class AopNamespaceUtils
4443
{
4544
/// <summary>
4645
/// The object name of the internally managed auto-proxy creator.
4746
/// </summary>
48-
public static readonly string AUTO_PROXY_CREATOR_OBJECT_NAME = "Spring.Aop.Config.InternalAutoProxyCreator";
49-
50-
/// <summary>
51-
/// The type of the APC that handles advisors with object role <see cref="ObjectRole.ROLE_INFRASTRUCTURE"/>.
52-
/// </summary>
47+
public static readonly string AUTO_PROXY_CREATOR_OBJECT_NAME = "Spring.Aop.Config.InternalAutoProxyCreator";
48+
49+
/// <summary>
50+
/// The type of the APC that handles advisors with object role <see cref="ObjectRole.ROLE_INFRASTRUCTURE"/>.
51+
/// </summary>
5352
private static readonly Type InfrastructureAutoProxyCreatorType = typeof(InfrastructureAdvisorAutoProxyCreator);
54-
53+
5554
/// <summary>
5655
/// Registers the internal auto proxy creator if necessary.
5756
/// </summary>
5857
/// <param name="parserContext">The parser context.</param>
5958
/// <param name="sourceElement">The source element.</param>
6059
public static void RegisterAutoProxyCreatorIfNecessary(ParserContext parserContext, XmlElement sourceElement)
61-
{
62-
AssertUtils.ArgumentNotNull(parserContext, "parserContext");
63-
IObjectDefinitionRegistry registry = parserContext.Registry;
60+
{
61+
AssertUtils.ArgumentNotNull(parserContext, "parserContext");
62+
IObjectDefinitionRegistry registry = parserContext.Registry;
6463
RegisterAutoProxyCreatorIfNecessary(registry);
65-
}
66-
67-
/// <summary>
68-
/// Registers the internal auto proxy creator if necessary.
69-
/// </summary>
70-
public static void RegisterAutoProxyCreatorIfNecessary(IObjectDefinitionRegistry registry)
71-
{
72-
AssertUtils.ArgumentNotNull(registry, "registry");
73-
74-
if (!registry.ContainsObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME))
75-
{
76-
RootObjectDefinition objectDefinition = new RootObjectDefinition(InfrastructureAutoProxyCreatorType);
77-
objectDefinition.Role = ObjectRole.ROLE_INFRASTRUCTURE;
78-
objectDefinition.PropertyValues.Add("order", int.MaxValue);
79-
registry.RegisterObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME, objectDefinition);
80-
}
81-
}
82-
64+
}
65+
66+
/// <summary>
67+
/// Registers the internal auto proxy creator if necessary.
68+
/// </summary>
69+
public static void RegisterAutoProxyCreatorIfNecessary(IObjectDefinitionRegistry registry)
70+
{
71+
AssertUtils.ArgumentNotNull(registry, "registry");
72+
73+
if (!registry.ContainsObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME))
74+
{
75+
RootObjectDefinition objectDefinition = new RootObjectDefinition(InfrastructureAutoProxyCreatorType);
76+
objectDefinition.Role = ObjectRole.ROLE_INFRASTRUCTURE;
77+
objectDefinition.PropertyValues.Add("order", int.MaxValue);
78+
registry.RegisterObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME, objectDefinition);
79+
}
80+
}
81+
8382
/// <summary>
8483
/// Forces the auto proxy creator to use decorator proxy.
8584
/// </summary>

src/Spring/Spring.Aop/Aop/Framework/AbstractMethodInvocation.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
2423
using System.Collections;
2524
using System.Reflection;
2625
using System.Text;
@@ -293,7 +292,7 @@ InterceptorAndDynamicMethodMatcher dynamicMatcher
293292
}
294293

295294
/// <summary>
296-
/// Retrieves a new <see cref="AopAlliance.Intercept.IMethodInvocation"/> instance
295+
/// Retrieves a new <see cref="AopAlliance.Intercept.IMethodInvocation"/> instance
297296
/// for the next Proceed method call.
298297
/// </summary>
299298
/// <param name="invocation">
@@ -318,7 +317,7 @@ protected abstract IMethodInvocation PrepareMethodInvocationForProceed(
318317
protected virtual void AssertJoinpoint()
319318
{
320319
AssertUtils.ArgumentNotNull(target, "target");
321-
// if (this.method != null
320+
// if (this.method != null
322321
// && !this.method.DeclaringType.IsAssignableFrom(target.GetType()))
323322
// {
324323
// // This means the target type doesn't implement the interface.
@@ -351,9 +350,9 @@ protected virtual void AssertJoinpoint()
351350
/// <remarks>
352351
/// <p>
353352
/// <note type="implementnotes">
354-
/// Does <b>not</b> invoke <see cref="System.Object.ToString()"/> on the
353+
/// Does <b>not</b> invoke <see cref="System.Object.ToString()"/> on the
355354
/// <see cref="Spring.Aop.Framework.AbstractMethodInvocation.This"/> target
356-
/// object, as that too may be proxied.
355+
/// object, as that too may be proxied.
357356
/// </note>
358357
/// </p>
359358
/// </remarks>
@@ -377,4 +376,4 @@ public override string ToString()
377376
return buffer.ToString();
378377
}
379378
}
380-
}
379+
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
2423
using AopAlliance.Aop;
2524
using AopAlliance.Intercept;
2625

@@ -77,4 +76,4 @@ public virtual IInterceptor GetInterceptor(IAdvisor advisor)
7776
return new AfterReturningAdviceInterceptor(advice);
7877
}
7978
}
80-
}
79+
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
2423
using AopAlliance.Intercept;
2524
using Spring.Util;
2625

@@ -93,4 +92,4 @@ public object Invoke(IMethodInvocation invocation)
9392
return returnValue;
9493
}
9594
}
96-
}
95+
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
2423
using AopAlliance.Aop;
2524
using AopAlliance.Intercept;
2625

@@ -77,4 +76,4 @@ public virtual IInterceptor GetInterceptor(IAdvisor advisor)
7776
return new MethodBeforeAdviceInterceptor(advice);
7877
}
7978
}
80-
}
79+
}

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,9 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
24-
using System.Collections.Generic;
25-
2623
using AopAlliance.Aop;
2724
using AopAlliance.Intercept;
2825
using Spring.Aop.Support;
@@ -42,7 +39,7 @@ namespace Spring.Aop.Framework.Adapter
4239
public class DefaultAdvisorAdapterRegistry : IAdvisorAdapterRegistry
4340
{
4441
private readonly IList<IAdvisorAdapter> adapters = new List<IAdvisorAdapter>();
45-
42+
4643
/// <summary>
4744
/// Creates a new instance of the
4845
/// <see cref="Spring.Aop.Framework.Adapter.DefaultAdvisorAdapterRegistry"/> class.
@@ -61,7 +58,7 @@ public DefaultAdvisorAdapterRegistry()
6158
RegisterAdvisorAdapter(new AfterReturningAdviceAdapter());
6259
RegisterAdvisorAdapter(new ThrowsAdviceAdapter());
6360
}
64-
61+
6562
/// <summary>
6663
/// Returns an <see cref="Spring.Aop.IAdvisor"/> wrapping the supplied
6764
/// <paramref name="advice"/>.
@@ -71,7 +68,7 @@ public DefaultAdvisorAdapterRegistry()
7168
/// <see cref="Spring.Aop.IBeforeAdvice"/> or
7269
/// <see cref="Spring.Aop.IThrowsAdvice"/>.
7370
/// </param>
74-
/// <returns>
71+
/// <returns>
7572
/// An <see cref="Spring.Aop.IAdvisor"/> wrapping the supplied
7673
/// <paramref name="advice"/>. Never returns <cref lang="null"/>. If
7774
/// the <paramref name="advice"/> parameter is an
@@ -151,4 +148,4 @@ public virtual void RegisterAdvisorAdapter(IAdvisorAdapter adapter)
151148
this.adapters.Add(adapter);
152149
}
153150
}
154-
}
151+
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -18,8 +18,6 @@
1818

1919
#endregion
2020

21-
using System;
22-
2321
namespace Spring.Aop.Framework.Adapter
2422
{
2523
/// <summary>
@@ -64,4 +62,4 @@ private GlobalAdvisorAdapterRegistry()
6462

6563
#endregion
6664
}
67-
}
65+
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#region License
22

33
/*
4-
* Copyright © 2002-2011 the original author or authors.
4+
* Copyright 2002-2011 the original author or authors.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");
77
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020

2121
#region Imports
2222

23-
using System;
2423
using AopAlliance.Intercept;
2524
using Spring.Util;
2625

@@ -89,4 +88,4 @@ public object Invoke(IMethodInvocation invocation)
8988
return invocation.Proceed();
9089
}
9190
}
92-
}
91+
}

0 commit comments

Comments
 (0)