fixing up minor issues from pulling sprnet-generics branch
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Spring.Context;
|
||||
using Spring.Context.Support;
|
||||
@@ -47,7 +47,7 @@ namespace Spring.AopQuickStart
|
||||
{
|
||||
// Create AOP proxy using Spring.NET IoC container.
|
||||
IApplicationContext ctx = ContextRegistry.GetContext();
|
||||
IDictionary commands = ctx.GetObjectsOfType(typeof(ICommand));
|
||||
IDictionary<string, ICommand> commands = ctx.GetObjects<ICommand>();
|
||||
|
||||
foreach (ICommand command in commands.Values)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using NUnit.Framework;
|
||||
using Spring.Aop.Config;
|
||||
@@ -30,7 +30,6 @@ using Spring.Context.Support;
|
||||
using Spring.Data.Common;
|
||||
using Spring.Data.Config;
|
||||
using Spring.Data.Core;
|
||||
using Spring.Objects.Factory.Support;
|
||||
using Spring.Objects.Factory.Xml;
|
||||
using Spring.Transaction.Config;
|
||||
using Spring.TxQuickStart.Services;
|
||||
@@ -55,7 +54,7 @@ namespace Spring.TxQuickStart
|
||||
NamespaceParserRegistry.RegisterParser(typeof(TxNamespaceParser));
|
||||
NamespaceParserRegistry.RegisterParser(typeof(AopNamespaceParser));
|
||||
IApplicationContext context = CreateContextFromXml();
|
||||
IDictionary dict = context.GetObjectsOfType(typeof (IAccountManager));
|
||||
IDictionary<string, IAccountManager> dict = context.GetObjects<IAccountManager>();
|
||||
accountManager = context["accountManager"] as IAccountManager;
|
||||
CleanDb(context);
|
||||
}
|
||||
|
||||
BIN
lib/Net/3.5/Apache.NMS.ActiveMQ.dll
Normal file
BIN
lib/Net/3.5/Apache.NMS.ActiveMQ.dll
Normal file
Binary file not shown.
8199
lib/Net/3.5/Apache.NMS.ActiveMQ.xml
Normal file
8199
lib/Net/3.5/Apache.NMS.ActiveMQ.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/3.5/Apache.NMS.dll
Normal file
BIN
lib/Net/3.5/Apache.NMS.dll
Normal file
Binary file not shown.
2736
lib/Net/3.5/Apache.NMS.xml
Normal file
2736
lib/Net/3.5/Apache.NMS.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/3.5/Common.Logging.dll
Normal file
BIN
lib/Net/3.5/Common.Logging.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/Ionic.Zlib.dll
Normal file
BIN
lib/Net/3.5/Ionic.Zlib.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/NUnitAsp.dll
Normal file
BIN
lib/Net/3.5/NUnitAsp.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/NUnitAspEx.dll
Normal file
BIN
lib/Net/3.5/NUnitAspEx.dll
Normal file
Binary file not shown.
139
lib/Net/3.5/NUnitAspEx.xml
Normal file
139
lib/Net/3.5/NUnitAspEx.xml
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NUnitAspEx</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NUnitAspEx.Client.AspFixtureRequest">
|
||||
<summary>
|
||||
Encapsulates a request from within a testsuite using the "asptest://" pseudo-protocol.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.CustomizableHttpWebRequest">
|
||||
<summary>
|
||||
Encapsulates the ugly details of deriving from HttpWebRequest.
|
||||
</summary>
|
||||
<remarks>
|
||||
Since various frameworks like NUnitAsp rely on the output of WebRequest.Create() being of type HttpWebRequest
|
||||
but HttpWebRequest is not customizable the easy way, this class shields further derived classes from the ugly reflection details.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.#ctor(System.Uri)">
|
||||
<summary>
|
||||
Creates a new instance for the given uri.
|
||||
</summary>
|
||||
<param name="uri">the <see cref="P:NUnitAspEx.Client.CustomizableHttpWebRequest.Uri"/> to create this request for.</param>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.CreateHttpWebRequestSerializationInfo(System.Uri)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="uri"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.SubmitRequest(System.Byte[],System.IO.Stream)">
|
||||
<summary>
|
||||
Override this method in your derived class and call <see cref="M:NUnitAspEx.Client.CustomizableHttpWebRequest.SetResponse(System.Net.HttpWebResponse)"/> to set the response object.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.CreateOutputStream">
|
||||
<summary>
|
||||
Create the stream to be used for uploading content.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.AspFixtureResponse">
|
||||
<summary>
|
||||
Encapsulates a response from an <see cref="T:NUnitAspEx.Client.AspFixtureRequest"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.CustomizableHttpWebResponse">
|
||||
<summary>
|
||||
Encapsulates the ugly details of deriving from HttpWebResponse.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.HttpReflectionUtils">
|
||||
<summary>
|
||||
Summary description for HttpReflectionUtils.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.HttpWebClient">
|
||||
<summary>
|
||||
Summary description for HttpWebClient.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Core.AspFixtureHost">
|
||||
<summary>
|
||||
An AspFixtureHost lives inside it's own AppDomain with an initialized HttpRuntime.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.IAspFixtureHost">
|
||||
<summary>
|
||||
Summary description for IAspFixtureHost.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.CreateInstance(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
Creates a new Host instance within a new AppDomain based on the passed in Properties.
|
||||
</summary>
|
||||
<remarks>
|
||||
You must not call this method from within an existing Host's AppDomain.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.ShutDown(NUnitAspEx.Core.AspFixtureHost)">
|
||||
<summary>
|
||||
Unload the passed Host's AppDomain.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.InitializeLifetimeService">
|
||||
<summary>
|
||||
Return null to avoid timing out of remoting references
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.Initialize(System.String,System.AppDomain,System.IO.TextWriter,System.String[])">
|
||||
<summary>
|
||||
Initializes the newly created host instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.Current">
|
||||
<summary>
|
||||
Use this property to gain access to the Host from within the Host's AppDomain
|
||||
</summary>
|
||||
<remarks>
|
||||
This property is set only within the Host's AppDomain.
|
||||
Outside the AppDomain it will always return null.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.SyncRoot">
|
||||
<summary>
|
||||
Use to synchronize access to this host instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.CreatorDomain">
|
||||
<summary>
|
||||
Returns a reference to the AppDomain, that created this Host instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.RootLocation">
|
||||
<summary>
|
||||
Returns the physical assembly reference location this AppDomain has been created from.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.AspTestClient">
|
||||
<summary>
|
||||
Summary description for AspTestClient.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.AspTestContext">
|
||||
<summary>
|
||||
Summary description for AspTestContext.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.AspTestExecutionModule">
|
||||
<summary>
|
||||
Summary description for AspTestExecutionModule.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
BIN
lib/Net/3.5/NVelocity.dll
Normal file
BIN
lib/Net/3.5/NVelocity.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/Rhino.Mocks.dll
Normal file
BIN
lib/Net/3.5/Rhino.Mocks.dll
Normal file
Binary file not shown.
5624
lib/Net/3.5/Rhino.Mocks.xml
Normal file
5624
lib/Net/3.5/Rhino.Mocks.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/3.5/log4net.dll
Normal file
BIN
lib/Net/3.5/log4net.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/nunit.core.dll
Normal file
BIN
lib/Net/3.5/nunit.core.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/nunit.core.interfaces.dll
Normal file
BIN
lib/Net/3.5/nunit.core.interfaces.dll
Normal file
Binary file not shown.
BIN
lib/Net/3.5/nunit.framework.dll
Normal file
BIN
lib/Net/3.5/nunit.framework.dll
Normal file
Binary file not shown.
10228
lib/Net/3.5/nunit.framework.xml
Normal file
10228
lib/Net/3.5/nunit.framework.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/4.0/Apache.NMS.ActiveMQ.dll
Normal file
BIN
lib/Net/4.0/Apache.NMS.ActiveMQ.dll
Normal file
Binary file not shown.
8199
lib/Net/4.0/Apache.NMS.ActiveMQ.xml
Normal file
8199
lib/Net/4.0/Apache.NMS.ActiveMQ.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/4.0/Apache.NMS.dll
Normal file
BIN
lib/Net/4.0/Apache.NMS.dll
Normal file
Binary file not shown.
2736
lib/Net/4.0/Apache.NMS.xml
Normal file
2736
lib/Net/4.0/Apache.NMS.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/4.0/Common.Logging.dll
Normal file
BIN
lib/Net/4.0/Common.Logging.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/Ionic.Zlib.dll
Normal file
BIN
lib/Net/4.0/Ionic.Zlib.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/NUnitAsp.dll
Normal file
BIN
lib/Net/4.0/NUnitAsp.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/NUnitAspEx.dll
Normal file
BIN
lib/Net/4.0/NUnitAspEx.dll
Normal file
Binary file not shown.
139
lib/Net/4.0/NUnitAspEx.xml
Normal file
139
lib/Net/4.0/NUnitAspEx.xml
Normal file
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>NUnitAspEx</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:NUnitAspEx.Client.AspFixtureRequest">
|
||||
<summary>
|
||||
Encapsulates a request from within a testsuite using the "asptest://" pseudo-protocol.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.CustomizableHttpWebRequest">
|
||||
<summary>
|
||||
Encapsulates the ugly details of deriving from HttpWebRequest.
|
||||
</summary>
|
||||
<remarks>
|
||||
Since various frameworks like NUnitAsp rely on the output of WebRequest.Create() being of type HttpWebRequest
|
||||
but HttpWebRequest is not customizable the easy way, this class shields further derived classes from the ugly reflection details.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.#ctor(System.Uri)">
|
||||
<summary>
|
||||
Creates a new instance for the given uri.
|
||||
</summary>
|
||||
<param name="uri">the <see cref="P:NUnitAspEx.Client.CustomizableHttpWebRequest.Uri"/> to create this request for.</param>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.CreateHttpWebRequestSerializationInfo(System.Uri)">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
<param name="uri"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.SubmitRequest(System.Byte[],System.IO.Stream)">
|
||||
<summary>
|
||||
Override this method in your derived class and call <see cref="M:NUnitAspEx.Client.CustomizableHttpWebRequest.SetResponse(System.Net.HttpWebResponse)"/> to set the response object.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Client.CustomizableHttpWebRequest.CreateOutputStream">
|
||||
<summary>
|
||||
Create the stream to be used for uploading content.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.AspFixtureResponse">
|
||||
<summary>
|
||||
Encapsulates a response from an <see cref="T:NUnitAspEx.Client.AspFixtureRequest"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.CustomizableHttpWebResponse">
|
||||
<summary>
|
||||
Encapsulates the ugly details of deriving from HttpWebResponse.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.HttpReflectionUtils">
|
||||
<summary>
|
||||
Summary description for HttpReflectionUtils.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Client.HttpWebClient">
|
||||
<summary>
|
||||
Summary description for HttpWebClient.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.Core.AspFixtureHost">
|
||||
<summary>
|
||||
An AspFixtureHost lives inside it's own AppDomain with an initialized HttpRuntime.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.IAspFixtureHost">
|
||||
<summary>
|
||||
Summary description for IAspFixtureHost.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.CreateInstance(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
Creates a new Host instance within a new AppDomain based on the passed in Properties.
|
||||
</summary>
|
||||
<remarks>
|
||||
You must not call this method from within an existing Host's AppDomain.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.ShutDown(NUnitAspEx.Core.AspFixtureHost)">
|
||||
<summary>
|
||||
Unload the passed Host's AppDomain.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.InitializeLifetimeService">
|
||||
<summary>
|
||||
Return null to avoid timing out of remoting references
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:NUnitAspEx.Core.AspFixtureHost.Initialize(System.String,System.AppDomain,System.IO.TextWriter,System.String[])">
|
||||
<summary>
|
||||
Initializes the newly created host instance.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.Current">
|
||||
<summary>
|
||||
Use this property to gain access to the Host from within the Host's AppDomain
|
||||
</summary>
|
||||
<remarks>
|
||||
This property is set only within the Host's AppDomain.
|
||||
Outside the AppDomain it will always return null.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.SyncRoot">
|
||||
<summary>
|
||||
Use to synchronize access to this host instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.CreatorDomain">
|
||||
<summary>
|
||||
Returns a reference to the AppDomain, that created this Host instance
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:NUnitAspEx.Core.AspFixtureHost.RootLocation">
|
||||
<summary>
|
||||
Returns the physical assembly reference location this AppDomain has been created from.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.AspTestClient">
|
||||
<summary>
|
||||
Summary description for AspTestClient.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.AspTestContext">
|
||||
<summary>
|
||||
Summary description for AspTestContext.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:NUnitAspEx.AspTestExecutionModule">
|
||||
<summary>
|
||||
Summary description for AspTestExecutionModule.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
BIN
lib/Net/4.0/NVelocity.dll
Normal file
BIN
lib/Net/4.0/NVelocity.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/Rhino.Mocks.dll
Normal file
BIN
lib/Net/4.0/Rhino.Mocks.dll
Normal file
Binary file not shown.
5624
lib/Net/4.0/Rhino.Mocks.xml
Normal file
5624
lib/Net/4.0/Rhino.Mocks.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
lib/Net/4.0/log4net.dll
Normal file
BIN
lib/Net/4.0/log4net.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/nunit.core.dll
Normal file
BIN
lib/Net/4.0/nunit.core.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/nunit.core.interfaces.dll
Normal file
BIN
lib/Net/4.0/nunit.core.interfaces.dll
Normal file
Binary file not shown.
BIN
lib/Net/4.0/nunit.framework.dll
Normal file
BIN
lib/Net/4.0/nunit.framework.dll
Normal file
Binary file not shown.
10228
lib/Net/4.0/nunit.framework.xml
Normal file
10228
lib/Net/4.0/nunit.framework.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using Spring.Objects.Factory.Xml;
|
||||
|
||||
namespace Spring.Aop.Config
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace Spring.Aop.Framework
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder("Invocation: method '");
|
||||
buffer.Append(Method.Name).Append("', ").Append("arguments ");
|
||||
buffer.Append(this.arguments != null ? StringUtils.ArrayToCommaDelimitedString(this.arguments) : "[none]");
|
||||
buffer.Append(this.arguments != null ? StringUtils.CollectionToCommaDelimitedString(this.arguments) : "[none]");
|
||||
buffer.Append("; ");
|
||||
if (this.target == null)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using Spring.Objects.Factory.Config;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -21,12 +21,10 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
using Spring.Aop;
|
||||
using Spring.Aop.Support;
|
||||
|
||||
#endregion
|
||||
@@ -43,7 +41,7 @@ namespace Spring.Aop.Framework.Adapter
|
||||
[Serializable]
|
||||
public class DefaultAdvisorAdapterRegistry : IAdvisorAdapterRegistry
|
||||
{
|
||||
private readonly IList adapters = new ArrayList();
|
||||
private readonly IList<IAdvisorAdapter> adapters = new List<IAdvisorAdapter>();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Aop;
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
using AopAlliance.Intercept;
|
||||
using Spring.Aop;
|
||||
|
||||
using Spring.Aop.Support;
|
||||
using Spring.Aop.Target;
|
||||
using Spring.Util;
|
||||
using Spring.Proxy;
|
||||
|
||||
namespace Spring.Aop.Framework
|
||||
{
|
||||
@@ -65,7 +65,7 @@ namespace Spring.Aop.Framework
|
||||
/// will be wrapped in an advice before being added to this list.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
private IList _advisors = new ArrayList();
|
||||
private List<IAdvisor> _advisors = new List<IAdvisor>();
|
||||
|
||||
/// <summary>
|
||||
/// Array updated on changes to the advisors list, which is easier to
|
||||
@@ -76,7 +76,7 @@ namespace Spring.Aop.Framework
|
||||
/// <summary>
|
||||
/// List of introductions.
|
||||
/// </summary>
|
||||
private ArrayList _introductions = new ArrayList();
|
||||
private List<IIntroductionAdvisor> _introductions = new List<IIntroductionAdvisor>();
|
||||
|
||||
/// <summary>
|
||||
/// Interface map specifying which object should interface methods be
|
||||
@@ -88,7 +88,7 @@ namespace Spring.Aop.Framework
|
||||
/// to the target object.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
private readonly IDictionary interfaceMap = new ListDictionary();
|
||||
private readonly Dictionary<Type, IIntroductionAdvisor> interfaceMap = new Dictionary<Type, IIntroductionAdvisor>();
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Spring.Aop.ITargetSource"/> for this instance.
|
||||
@@ -108,7 +108,7 @@ namespace Spring.Aop.Framework
|
||||
/// <summary>
|
||||
/// The list of <see cref="Spring.Aop.Framework.AdvisedSupport"/> event listeners.
|
||||
/// </summary>
|
||||
private readonly IList listeners = new ArrayList();
|
||||
private readonly IList<IAdvisedSupportListener> listeners = new List<IAdvisedSupportListener>();
|
||||
|
||||
/// <summary>
|
||||
/// The advisor chain factory.
|
||||
@@ -274,7 +274,7 @@ namespace Spring.Aop.Framework
|
||||
|
||||
for (int i = 0; i < this._introductions.Count; i++)
|
||||
{
|
||||
IIntroductionAdvisor advisor = (IIntroductionAdvisor) this._introductions[i];
|
||||
IIntroductionAdvisor advisor = this._introductions[i];
|
||||
canBeSerialized = advisor.GetType().IsSerializable
|
||||
&& advisor.Advice.GetType().IsSerializable;
|
||||
if (!canBeSerialized) return false;
|
||||
@@ -294,7 +294,7 @@ namespace Spring.Aop.Framework
|
||||
/// to be (or that are being) proxied by this proxy.
|
||||
/// </value>
|
||||
/// <seealso cref="Spring.Aop.Framework.IAdvised.Interfaces"/>
|
||||
public virtual Type[] Interfaces
|
||||
public virtual IList<Type> Interfaces
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -318,12 +318,12 @@ namespace Spring.Aop.Framework
|
||||
/// <summary>
|
||||
/// Set interfaces to be proxied, bypassing locking and <see cref="ProxyConfig.IsFrozen"/>
|
||||
/// </summary>
|
||||
protected void SetInterfacesInternal(Type[] value)
|
||||
protected void SetInterfacesInternal(IList<Type> value)
|
||||
{
|
||||
this.interfaceMap.Clear();
|
||||
if (value != null)
|
||||
{
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
for (int i = 0; i < value.Count; i++)
|
||||
{
|
||||
AddInterfaceInternal(value[i]);
|
||||
}
|
||||
@@ -392,14 +392,9 @@ namespace Spring.Aop.Framework
|
||||
/// instances that have been applied to this proxy.
|
||||
/// </value>
|
||||
/// <seealso cref="Spring.Aop.Framework.IAdvised.Advisors"/>
|
||||
public virtual IAdvisor[] Advisors
|
||||
public virtual IList<IAdvisor> Advisors
|
||||
{
|
||||
get
|
||||
{
|
||||
{
|
||||
return _advisorsArray;
|
||||
}
|
||||
}
|
||||
get { return _advisorsArray; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -419,13 +414,13 @@ namespace Spring.Aop.Framework
|
||||
/// instances that have been applied to this proxy.
|
||||
/// </value>
|
||||
/// <seealso cref="Spring.Aop.Framework.IAdvised.Introductions"/>
|
||||
public virtual IIntroductionAdvisor[] Introductions
|
||||
public virtual IList<IIntroductionAdvisor> Introductions
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (this.SyncRoot)
|
||||
{
|
||||
return (IIntroductionAdvisor[])this._introductions.ToArray(typeof(IIntroductionAdvisor));
|
||||
return this._introductions;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -680,7 +675,7 @@ namespace Spring.Aop.Framework
|
||||
"Introduction index " + index + " is out of bounds: Only have " + _introductions.Count +
|
||||
" introductions.");
|
||||
}
|
||||
IIntroductionAdvisor advisor = (IIntroductionAdvisor)_introductions[index];
|
||||
IIntroductionAdvisor advisor = _introductions[index];
|
||||
// remove all interfaces introduced by the advisor...
|
||||
foreach (Type intf in advisor.Interfaces)
|
||||
{
|
||||
@@ -830,8 +825,7 @@ namespace Spring.Aop.Framework
|
||||
int pos = this._introductions.Count;
|
||||
for (int i = 0; i < pos; i++)
|
||||
{
|
||||
IIntroductionAdvisor introduction
|
||||
= (IIntroductionAdvisor)this._introductions[i];
|
||||
IIntroductionAdvisor introduction = this._introductions[i];
|
||||
if (introduction.Advice.GetType() == introductionType)
|
||||
{
|
||||
pos = i;
|
||||
@@ -1123,7 +1117,7 @@ namespace Spring.Aop.Framework
|
||||
DieIfFrozen("Cannot remove interface: configuration is frozen.");
|
||||
lock (this.SyncRoot)
|
||||
{
|
||||
if (intf != null && this.interfaceMap.Contains(intf))
|
||||
if (intf != null && this.interfaceMap.ContainsKey(intf))
|
||||
{
|
||||
this.interfaceMap.Remove(intf);
|
||||
InterfacesChanged();
|
||||
@@ -1188,7 +1182,7 @@ namespace Spring.Aop.Framework
|
||||
{
|
||||
for (int i = 0; i < this._advisors.Count; ++i)
|
||||
{
|
||||
IAdvisor advisor = (IAdvisor)this._advisors[i];
|
||||
IAdvisor advisor = this._advisors[i];
|
||||
if (advisor.Advice == advice)
|
||||
{
|
||||
return i;
|
||||
@@ -1492,7 +1486,7 @@ namespace Spring.Aop.Framework
|
||||
/// </param>
|
||||
protected internal virtual void CopyConfigurationFrom(AdvisedSupport other)
|
||||
{
|
||||
CopyConfigurationFrom(other, other.TargetSource, new ArrayList(other.Advisors), new ArrayList(other.Introductions));
|
||||
CopyConfigurationFrom(other, other.TargetSource, new List<IAdvisor>(other.Advisors), new List<IIntroductionAdvisor>(other.Introductions));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1515,25 +1509,25 @@ namespace Spring.Aop.Framework
|
||||
/// <param name="targetSource">the new target source</param>
|
||||
/// <param name="advisors">the advisors for the chain</param>
|
||||
/// <param name="introductions">the introductions for the chain</param>
|
||||
protected internal virtual void CopyConfigurationFrom(AdvisedSupport other, ITargetSource targetSource, IList advisors, IList introductions)
|
||||
protected internal virtual void CopyConfigurationFrom(AdvisedSupport other, ITargetSource targetSource, IList<IAdvisor> advisors, IList<IIntroductionAdvisor> introductions)
|
||||
{
|
||||
CopyFrom(other);
|
||||
this.AdvisorChainFactory = other.advisorChainFactory;
|
||||
this.m_targetSource = targetSource;
|
||||
// this.cachedProxyType = other.cachedProxyType;
|
||||
// this.cachedProxyConstructor = other.cachedProxyConstructor;
|
||||
this.Interfaces = (Type[]) CollectionUtils.ToArray(other.Interfaces, typeof(Type));
|
||||
this.Interfaces = new List<Type>(other.Interfaces);
|
||||
foreach (Type intf in other.interfaceMap.Keys)
|
||||
{
|
||||
this.interfaceMap[intf] = other.interfaceMap[intf];
|
||||
}
|
||||
this._advisors = new ArrayList();
|
||||
this._advisors = new List<IAdvisor>();
|
||||
foreach (IAdvisor advisor in advisors)
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(advisor, "Advisor must not be null");
|
||||
AddAdvisor(advisor);
|
||||
}
|
||||
this._introductions = new ArrayList();
|
||||
this._introductions = new List<IIntroductionAdvisor>();
|
||||
foreach (IIntroductionAdvisor advisor in introductions)
|
||||
{
|
||||
// TODO (EE): implement
|
||||
@@ -1575,7 +1569,7 @@ namespace Spring.Aop.Framework
|
||||
foreach (Type intf in this.interfaceMap.Keys)
|
||||
{
|
||||
buffer.Append(separator).Append("[").Append(intf.FullName).Append("] -> ");
|
||||
IIntroductionAdvisor advisor = this.interfaceMap[intf] as IIntroductionAdvisor;
|
||||
IIntroductionAdvisor advisor = this.interfaceMap[intf];
|
||||
if (advisor == null)
|
||||
{
|
||||
if (TargetSource.TargetType != null)
|
||||
|
||||
@@ -21,9 +21,11 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
using Spring.Aop.Framework.Adapter;
|
||||
|
||||
#endregion
|
||||
@@ -62,10 +64,10 @@ namespace Spring.Aop.Framework
|
||||
/// <see cref="AopAlliance.Intercept.IMethodInterceptor"/> (if there's
|
||||
/// a dynamic method matcher that needs evaluation at runtime).
|
||||
/// </returns>
|
||||
public static IList CalculateInterceptors(
|
||||
public static IList<object> CalculateInterceptors(
|
||||
IAdvised config, object proxy, MethodInfo method, Type targetType)
|
||||
{
|
||||
IList interceptors = new ArrayList(config.Advisors.Length);
|
||||
IList<object> interceptors = new List<object>(config.Advisors.Count);
|
||||
foreach (IAdvisor advisor in config.Advisors)
|
||||
{
|
||||
if (advisor is IPointcutAdvisor)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Spring.Threading;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
|
||||
using Spring.Collections;
|
||||
using Spring.Util;
|
||||
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Common.Logging;
|
||||
using Spring.Aop.Framework.DynamicProxy;
|
||||
|
||||
using Spring.Core;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Objects.Factory.Config;
|
||||
using Spring.Util;
|
||||
using System.Linq;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -124,20 +126,20 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the type of the target object</param>
|
||||
/// <param name="targetName">the name of the target object</param>
|
||||
/// <param name="customTargetSource">targetSource returned by TargetSource property:
|
||||
/// may be ignored. Will be null unless a custom target source is in use.</param>
|
||||
/// may be ignored. Will be null unless a custom target source is in use.</param>
|
||||
/// <returns>
|
||||
/// an array of additional interceptors for the particular object;
|
||||
/// or an empty array if no additional interceptors but just the common ones;
|
||||
/// or null if no proxy at all, not even with the common interceptors.
|
||||
/// </returns>
|
||||
protected override object[] GetAdvicesAndAdvisorsForObject(Type targetType, string targetName, ITargetSource customTargetSource)
|
||||
protected override IList<object> GetAdvicesAndAdvisorsForObject(Type targetType, string targetName, ITargetSource customTargetSource)
|
||||
{
|
||||
IList advisors = FindEligibleAdvisors(targetType, targetName);
|
||||
IList<IAdvisor> advisors = FindEligibleAdvisors(targetType, targetName);
|
||||
if (advisors.Count == 0)
|
||||
{
|
||||
return DO_NOT_PROXY;
|
||||
}
|
||||
return (object[]) CollectionUtils.ToArray(advisors, typeof (object));
|
||||
return advisors.Cast<object>().ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -149,10 +151,10 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// the empty list, not null, if there are no pointcuts or interceptors.
|
||||
/// The by-order sorted list of advisors otherwise
|
||||
/// </returns>
|
||||
protected IList FindEligibleAdvisors(Type targetType, string targetName)
|
||||
protected IList<IAdvisor> FindEligibleAdvisors(Type targetType, string targetName)
|
||||
{
|
||||
IList candidateAdvisors = FindCandidateAdvisors(targetType, targetName);
|
||||
IList eligibleAdvisors = FindAdvisorsThatCanApply(candidateAdvisors, targetType, targetName);
|
||||
IList<IAdvisor> candidateAdvisors = FindCandidateAdvisors(targetType, targetName);
|
||||
IList<IAdvisor> eligibleAdvisors = FindAdvisorsThatCanApply(candidateAdvisors, targetType, targetName);
|
||||
|
||||
ExtendAdvisors(eligibleAdvisors, targetType, targetName);
|
||||
eligibleAdvisors = SortAdvisors(eligibleAdvisors);
|
||||
@@ -166,7 +168,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the type of the object to be advised</param>
|
||||
/// <param name="targetName">the name of the object to be advised</param>
|
||||
/// <returns>the list of candidate advisors</returns>
|
||||
protected virtual IList FindCandidateAdvisors(Type targetType, string targetName)
|
||||
protected virtual IList<IAdvisor> FindCandidateAdvisors(Type targetType, string targetName)
|
||||
{
|
||||
return _advisorRetrievalHelper.FindAdvisorObjects(targetType, targetName);
|
||||
}
|
||||
@@ -179,14 +181,14 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the target object's type</param>
|
||||
/// <param name="targetName">the target object's name</param>
|
||||
/// <returns>the list of applicable advisors</returns>
|
||||
protected virtual IList FindAdvisorsThatCanApply(IList candidateAdvisors, Type targetType, string targetName)
|
||||
protected virtual IList<IAdvisor> FindAdvisorsThatCanApply(IList<IAdvisor> candidateAdvisors, Type targetType, string targetName)
|
||||
{
|
||||
if (candidateAdvisors.Count==0)
|
||||
{
|
||||
return candidateAdvisors;
|
||||
}
|
||||
|
||||
ArrayList eligibleAdvisors = new ArrayList();
|
||||
List<IAdvisor> eligibleAdvisors = new List<IAdvisor>();
|
||||
foreach(IAdvisor candidate in candidateAdvisors)
|
||||
{
|
||||
if (candidate is IIntroductionAdvisor && AopUtils.CanApply(candidate, targetType, null))
|
||||
@@ -229,14 +231,16 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// </summary>
|
||||
/// <param name="advisors">The advisors.</param>
|
||||
/// <returns></returns>
|
||||
protected virtual IList SortAdvisors(IList advisors)
|
||||
protected virtual IList<IAdvisor> SortAdvisors(IList<IAdvisor> advisors)
|
||||
{
|
||||
if (advisors.Count==0)
|
||||
{
|
||||
return advisors;
|
||||
}
|
||||
}
|
||||
|
||||
if (advisors is ArrayList)
|
||||
if (advisors is List<IAdvisor>)
|
||||
((List<IAdvisor>)advisors).Sort(new OrderComparator<IAdvisor>());
|
||||
else if (advisors is ArrayList)
|
||||
((ArrayList) advisors).Sort(new OrderComparator());
|
||||
else if (advisors is Array)
|
||||
Array.Sort((Array) advisors, new OrderComparator());
|
||||
@@ -256,7 +260,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="advisors">Advisors that have already been identified as applying to a given object</param>
|
||||
/// <param name="objectType">the type of the object to be advised</param>
|
||||
/// <param name="objectName">the name of the object to be advised</param>
|
||||
protected virtual void ExtendAdvisors(IList advisors, Type objectType, string objectName)
|
||||
protected virtual void ExtendAdvisors(IList<IAdvisor> advisors, Type objectType, string objectName)
|
||||
{}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -20,10 +20,15 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Remoting;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
|
||||
using Common.Logging;
|
||||
|
||||
using Spring.Aop.Framework.Adapter;
|
||||
using Spring.Aop.Target;
|
||||
using Spring.Collections;
|
||||
@@ -31,7 +36,6 @@ using Spring.Core;
|
||||
using Spring.Objects;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Objects.Factory.Config;
|
||||
using Spring.Util;
|
||||
|
||||
namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
@@ -79,13 +83,13 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <summary>
|
||||
/// Convenience constant for subclasses: Return value for "do not proxy".
|
||||
/// </summary>
|
||||
protected static readonly object[] DO_NOT_PROXY = null;
|
||||
protected static readonly IList<object> DO_NOT_PROXY = null;
|
||||
|
||||
/// <summary>
|
||||
/// Convenience constant for subclasses: Return value for
|
||||
/// "proxy without additional interceptors, just the common ones".
|
||||
/// </summary>
|
||||
protected static readonly object[] PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS = new object[0];
|
||||
protected static readonly IList<object> PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS = new List<object>(0);
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -283,8 +287,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
}
|
||||
|
||||
//ITargetSource targetSource = GetCustomTargetSource(obj.GetType(), objectName);
|
||||
object[] specificInterceptors;
|
||||
specificInterceptors = GetAdvicesAndAdvisorsForObject(objectType, objectName, null);
|
||||
IList<object> specificInterceptors = GetAdvicesAndAdvisorsForObject(objectType, objectName, null);
|
||||
|
||||
|
||||
// proxy if we have advice or if a TargetSourceCreator wants to do some
|
||||
@@ -455,11 +458,11 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the new object instance</param>
|
||||
/// <param name="targetName">the name of the object</param>
|
||||
/// <param name="customTargetSource">targetSource returned by TargetSource property:
|
||||
/// may be ignored. Will be null unless a custom target source is in use.</param>
|
||||
/// may be ignored. Will be null unless a custom target source is in use.</param>
|
||||
/// <returns>an array of additional interceptors for the particular object;
|
||||
/// or an empty array if no additional interceptors but just the common ones;
|
||||
/// or null if no proxy at all, not even with the common interceptors.</returns>
|
||||
protected abstract object[] GetAdvicesAndAdvisorsForObject(Type targetType, string targetName, ITargetSource customTargetSource);
|
||||
protected abstract IList<object> GetAdvicesAndAdvisorsForObject(Type targetType, string targetName, ITargetSource customTargetSource);
|
||||
|
||||
/// <summary>
|
||||
/// Create an AOP proxy for the given object.
|
||||
@@ -467,10 +470,10 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">Type of the object.</param>
|
||||
/// <param name="targetName">The name of the object.</param>
|
||||
/// <param name="specificInterceptors">The set of interceptors that is specific to this
|
||||
/// object (may be empty but not null)</param>
|
||||
/// object (may be empty but not null)</param>
|
||||
/// <param name="targetSource">The target source for the proxy, already pre-configured to access the object.</param>
|
||||
/// <returns>The AOP Proxy for the object.</returns>
|
||||
protected virtual object CreateProxy(Type targetType, string targetName, object[] specificInterceptors, ITargetSource targetSource)
|
||||
protected virtual object CreateProxy(Type targetType, string targetName, IList<object> specificInterceptors, ITargetSource targetSource)
|
||||
{
|
||||
ProxyFactory proxyFactory = CreateProxyFactory();
|
||||
// copy our properties (proxyTargetClass) inherited from ProxyConfig
|
||||
@@ -491,7 +494,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
}
|
||||
|
||||
|
||||
IAdvisor[] advisors = BuildAdvisors(targetName, specificInterceptors);
|
||||
IList<IAdvisor> advisors = BuildAdvisors(targetName, specificInterceptors);
|
||||
|
||||
foreach (IAdvisor advisor in advisors)
|
||||
{
|
||||
@@ -526,14 +529,14 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// </summary>
|
||||
/// <param name="targetName">The name of the object.</param>
|
||||
/// <param name="specificInterceptors">The set of interceptors that is specific to this
|
||||
/// object (may be empty, but not null)</param>
|
||||
/// object (may be empty, but not null)</param>
|
||||
/// <returns>The list of Advisors for the given object</returns>
|
||||
protected virtual IAdvisor[] BuildAdvisors(string targetName, object[] specificInterceptors)
|
||||
protected virtual IList<IAdvisor> BuildAdvisors(string targetName, IList<object> specificInterceptors)
|
||||
{
|
||||
// handle prototypes correctly
|
||||
IAdvisor[] commonInterceptors = ResolveInterceptorNames();
|
||||
IList<IAdvisor> commonInterceptors = ResolveInterceptorNames();
|
||||
|
||||
ArrayList allInterceptors = new ArrayList();
|
||||
List<object> allInterceptors = new List<object>();
|
||||
if (specificInterceptors != null)
|
||||
{
|
||||
allInterceptors.AddRange(specificInterceptors);
|
||||
@@ -541,26 +544,26 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
if (applyCommonInterceptorsFirst)
|
||||
{
|
||||
allInterceptors.InsertRange(0, commonInterceptors);
|
||||
allInterceptors.InsertRange(0, commonInterceptors.Cast<object>());
|
||||
}
|
||||
else
|
||||
{
|
||||
allInterceptors.AddRange(commonInterceptors);
|
||||
allInterceptors.AddRange(commonInterceptors.Cast<object>());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (logger.IsInfoEnabled)
|
||||
{
|
||||
int nrOfCommonInterceptors = commonInterceptors != null ? commonInterceptors.Length : 0;
|
||||
int nrOfSpecificInterceptors = specificInterceptors != null ? specificInterceptors.Length : 0;
|
||||
int nrOfCommonInterceptors = commonInterceptors != null ? commonInterceptors.Count : 0;
|
||||
int nrOfSpecificInterceptors = specificInterceptors != null ? specificInterceptors.Count : 0;
|
||||
logger.Info(string.Format("Creating implicit proxy for object '{0}' with {1} common interceptors and {2} specific interceptors", targetName, nrOfCommonInterceptors, nrOfSpecificInterceptors));
|
||||
}
|
||||
|
||||
|
||||
IAdvisor[] advisors = new IAdvisor[allInterceptors.Count];
|
||||
List<IAdvisor> advisors = new List<IAdvisor>(allInterceptors.Count);
|
||||
for (int i = 0; i < allInterceptors.Count; i++)
|
||||
{
|
||||
advisors[i] = advisorAdapterRegistry.Wrap(allInterceptors[i]);
|
||||
advisors.Add(advisorAdapterRegistry.Wrap(allInterceptors[i]));
|
||||
}
|
||||
return advisors;
|
||||
}
|
||||
@@ -581,9 +584,9 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private IAdvisor[] ResolveInterceptorNames()
|
||||
private IList<IAdvisor> ResolveInterceptorNames()
|
||||
{
|
||||
ArrayList advisors = new ArrayList();
|
||||
List<IAdvisor> advisors = new List<IAdvisor>();
|
||||
foreach (string name in interceptorNames)
|
||||
{
|
||||
object next = owningObjectFactory.GetObject(name);
|
||||
@@ -596,7 +599,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
advisors.Add(advisorAdapterRegistry.Wrap(next));
|
||||
}
|
||||
}
|
||||
return (IAdvisor[])advisors.ToArray(typeof(IAdvisor));
|
||||
return advisors;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -656,7 +659,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
if (targetSource != null)
|
||||
{
|
||||
targetSourcedObjects.Add(objectName);
|
||||
object[] specificInterceptors = GetAdvicesAndAdvisorsForObject(objectType, objectName, targetSource);
|
||||
IList<object> specificInterceptors = GetAdvicesAndAdvisorsForObject(objectType, objectName, targetSource);
|
||||
return CreateProxy(objectType, objectName, specificInterceptors, targetSource);
|
||||
}
|
||||
return null;
|
||||
@@ -684,8 +687,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// been set.</param>
|
||||
/// <param name="objectName">Name of the object.</param>
|
||||
/// <returns>The passed in PropertyValues</returns>
|
||||
public IPropertyValues PostProcessPropertyValues(IPropertyValues pvs, PropertyInfo[] pis, object objectInstance,
|
||||
string objectName)
|
||||
public IPropertyValues PostProcessPropertyValues(IPropertyValues pvs, IList<PropertyInfo> pis, object objectInstance, string objectName)
|
||||
{
|
||||
return pvs;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Util;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -61,7 +59,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// Always <see cref="AbstractAutoProxyCreator.PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS"/> to indicate, that the object shall be proxied.
|
||||
/// </returns>
|
||||
/// <seealso cref="AbstractAutoProxyCreator.PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS"/>
|
||||
protected override object[] GetAdvicesAndAdvisorsForObject( Type targetType, string targetName, ITargetSource customTargetSource )
|
||||
protected override IList<object> GetAdvicesAndAdvisorsForObject(Type targetType, string targetName, ITargetSource customTargetSource)
|
||||
{
|
||||
return PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Spring.Aop.Support;
|
||||
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Spring.Context;
|
||||
using System.Collections.Generic;
|
||||
using Spring.Objects.Factory;
|
||||
|
||||
#endregion
|
||||
@@ -45,7 +45,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
public static readonly string SEPARATOR = ".";
|
||||
private bool usePrefix;
|
||||
private string advisorObjectNamePrefix;
|
||||
private IList cachedAdvisors;
|
||||
private IList<IAdvisor> cachedAdvisors;
|
||||
|
||||
#region Properties
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the type of the object to be advised</param>
|
||||
/// <param name="targetName">the name of the object to be advised</param>
|
||||
/// <returns>the list of candidate advisors</returns>
|
||||
protected override IList FindCandidateAdvisors(Type targetType, string targetName)
|
||||
protected override IList<IAdvisor> FindCandidateAdvisors(Type targetType, string targetName)
|
||||
{
|
||||
if (cachedAdvisors == null) {
|
||||
cachedAdvisors = base.FindCandidateAdvisors(targetType, targetName);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
@@ -13,6 +14,6 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <summary>
|
||||
/// Get the list of advisor objects to apply on the target.
|
||||
/// </summary>
|
||||
IList FindAdvisorObjects(Type targetType, string targetName);
|
||||
IList<IAdvisor> FindAdvisorObjects(Type targetType, string targetName);
|
||||
}
|
||||
}
|
||||
@@ -22,14 +22,14 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
|
||||
using Spring.Util;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Objects.Factory.Config;
|
||||
using Spring.Objects.Factory.Support;
|
||||
using Spring.Aop;
|
||||
using Spring.Aop.Framework;
|
||||
using Spring.Aop.Framework.Adapter;
|
||||
using Spring.Aop.Framework.DynamicProxy;
|
||||
using Spring.Core;
|
||||
@@ -176,8 +176,8 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// </remarks>
|
||||
public void PostProcessObjectFactory(IConfigurableListableObjectFactory factory)
|
||||
{
|
||||
string[] objectDefinitionNames = factory.GetObjectDefinitionNames();
|
||||
for (int i = 0; i < objectDefinitionNames.Length; ++i)
|
||||
IList<string> objectDefinitionNames = factory.GetObjectDefinitionNames();
|
||||
for (int i = 0; i < objectDefinitionNames.Count; ++i)
|
||||
{
|
||||
string name = objectDefinitionNames[i];
|
||||
if (IsObjectNameMatch(name))
|
||||
@@ -260,7 +260,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
proxyFactory.Interfaces = Type.EmptyTypes;
|
||||
}
|
||||
|
||||
IAdvisor[] advisors = ResolveInterceptorNames();
|
||||
IList<IAdvisor> advisors = ResolveInterceptorNames();
|
||||
foreach (IAdvisor advisor in advisors)
|
||||
{
|
||||
if (advisor is IIntroductionAdvisor)
|
||||
@@ -307,9 +307,9 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private IAdvisor[] ResolveInterceptorNames()
|
||||
private IList<IAdvisor> ResolveInterceptorNames()
|
||||
{
|
||||
ArrayList advisors = new ArrayList();
|
||||
List<IAdvisor> advisors = new List<IAdvisor>();
|
||||
foreach (string name in interceptorNames)
|
||||
{
|
||||
object next = objectFactory.GetObject(name);
|
||||
@@ -322,7 +322,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
advisors.Add(advisorAdapterRegistry.Wrap(next));
|
||||
}
|
||||
}
|
||||
return (IAdvisor[])advisors.ToArray(typeof(IAdvisor));
|
||||
return advisors;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Common.Logging;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Objects.Factory.Config;
|
||||
@@ -36,7 +37,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
private readonly ILog _log;
|
||||
private readonly IConfigurableListableObjectFactory _objectFactory;
|
||||
private string[] _cachedObjectNames;
|
||||
private List<string> _cachedObjectNames;
|
||||
|
||||
/// <summary>
|
||||
/// The object factory to lookup advisors from
|
||||
@@ -62,18 +63,18 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the type of the object to be advised</param>
|
||||
/// <param name="targetName">the name of the object to be advised</param>
|
||||
/// <returns>A list of eligible <see cref="IAdvisor"/> instances</returns>
|
||||
public virtual IList FindAdvisorObjects(Type targetType, string targetName)
|
||||
public virtual IList<IAdvisor> FindAdvisorObjects(Type targetType, string targetName)
|
||||
{
|
||||
string[] advisorNames = GetAdvisorCandidateNames(targetType, targetName);
|
||||
IList<string> advisorNames = GetAdvisorCandidateNames(targetType, targetName);
|
||||
|
||||
ArrayList advisors = new ArrayList();
|
||||
List<IAdvisor> advisors = new List<IAdvisor>();
|
||||
|
||||
if (advisorNames.Length == 0)
|
||||
if (advisorNames.Count == 0)
|
||||
{
|
||||
return advisors;
|
||||
}
|
||||
|
||||
for (int i = 0; i < advisorNames.Length; i++)
|
||||
for (int i = 0; i < advisorNames.Count; i++)
|
||||
{
|
||||
string name = advisorNames[i];
|
||||
if (IsEligibleObject(name, targetType, targetName) && !_objectFactory.IsCurrentlyInCreation(name))
|
||||
@@ -111,12 +112,12 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// </summary>
|
||||
/// <param name="advisors">the advisor list</param>
|
||||
/// <param name="advisorName">the object name of the advisor to add</param>
|
||||
private void AddAdvisorCandidate(ArrayList advisors, string advisorName)
|
||||
private void AddAdvisorCandidate(List<IAdvisor> advisors, string advisorName)
|
||||
{
|
||||
object advisorCandidate = _objectFactory.GetObject(advisorName);
|
||||
if (advisorCandidate is IAdvisor)
|
||||
{
|
||||
advisors.Add(advisorCandidate);
|
||||
advisors.Add((IAdvisor) advisorCandidate);
|
||||
}
|
||||
else if (advisorCandidate is IAdvisors)
|
||||
{
|
||||
@@ -135,7 +136,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <param name="targetType">the type of the object to be advised</param>
|
||||
/// <param name="targetName">the name of the object to be advised</param>
|
||||
/// <returns>a non-null string array of advisor candidate names</returns>
|
||||
protected virtual string[] GetAdvisorCandidateNames(Type targetType, string targetName)
|
||||
protected virtual IList<string> GetAdvisorCandidateNames(Type targetType, string targetName)
|
||||
{
|
||||
if (_cachedObjectNames == null)
|
||||
{
|
||||
@@ -143,12 +144,12 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
if (_cachedObjectNames == null)
|
||||
{
|
||||
ArrayList candidateNameList = new ArrayList();
|
||||
string[] advisorCandidateNames = ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors( _objectFactory, typeof(IAdvisor), true, false);
|
||||
List<string> candidateNameList = new List<string>();
|
||||
IList<string> advisorCandidateNames = ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors( _objectFactory, typeof(IAdvisor), true, false);
|
||||
candidateNameList.AddRange(advisorCandidateNames);
|
||||
string[] advisorsCandidateNames = ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(_objectFactory, typeof(IAdvisors), true, false);
|
||||
IList<string> advisorsCandidateNames = ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(_objectFactory, typeof(IAdvisors), true, false);
|
||||
candidateNameList.AddRange(advisorsCandidateNames);
|
||||
_cachedObjectNames = (string[]) candidateNameList.ToArray(typeof(string));
|
||||
_cachedObjectNames = candidateNameList;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,7 +163,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// </summary>
|
||||
/// <param name="advisorName">the name of the candidate advisor</param>
|
||||
/// <param name="objectType">the type of the object to be advised</param>
|
||||
/// <param name="objectName">the name of the object to be advised</param>
|
||||
/// <param name="objectName">the name of the object to be advised</param>
|
||||
protected virtual bool IsEligibleObject(string advisorName, Type objectType, string objectName )
|
||||
{
|
||||
bool containsObjectDefinition = this.ObjectFactory.ContainsObjectDefinition(advisorName);
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Spring.Objects.Factory;
|
||||
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Spring.Aop.Support;
|
||||
using Spring.Aop.Target;
|
||||
|
||||
@@ -30,7 +31,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
{
|
||||
throw new AopConfigException("Cannot create IAopProxy with null ProxyConfig");
|
||||
}
|
||||
if (advisedSupport.Advisors.Length == 0 && advisedSupport.TargetSource == EmptyTargetSource.Empty)
|
||||
if (advisedSupport.Advisors.Count == 0 && advisedSupport.TargetSource == EmptyTargetSource.Empty)
|
||||
{
|
||||
throw new AopConfigException("Cannot create IAopProxy with no advisors and no target source");
|
||||
}
|
||||
@@ -57,14 +58,14 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
{
|
||||
IAdvised innerProxy = (IAdvised)advisedSupport.TargetSource.GetTarget();
|
||||
// eliminate duplicate advisors
|
||||
ArrayList thisAdvisors = new ArrayList(advisedSupport.Advisors);
|
||||
List<IAdvisor> thisAdvisors = new List<IAdvisor>(advisedSupport.Advisors);
|
||||
foreach (IAdvisor innerAdvisor in innerProxy.Advisors)
|
||||
{
|
||||
foreach (IAdvisor thisAdvisor in thisAdvisors)
|
||||
{
|
||||
if (ReferenceEquals(thisAdvisor, innerAdvisor)
|
||||
|| (thisAdvisor.GetType() == typeof(DefaultPointcutAdvisor)
|
||||
&& ((DefaultPointcutAdvisor)thisAdvisor).Equals(innerAdvisor)
|
||||
&& thisAdvisor.Equals(innerAdvisor)
|
||||
)
|
||||
)
|
||||
{
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Specialized;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
@@ -47,7 +49,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
/// <summary>
|
||||
/// Optimization fields
|
||||
/// </summary>
|
||||
private static IList EmptyList = ArrayList.ReadOnly(new ArrayList());
|
||||
private static IList<object> EmptyList = new ReadOnlyCollection<object>(new object[0]);
|
||||
|
||||
/// <summary>
|
||||
/// IAdvised delegate
|
||||
@@ -163,8 +165,8 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
this.m_targetType = advised.TargetSource.TargetType;
|
||||
|
||||
// initialize introduction advice
|
||||
this.m_introductions = new IAdvice[advised.Introductions.Length];
|
||||
for (int i = 0; i < advised.Introductions.Length; i++)
|
||||
this.m_introductions = new IAdvice[advised.Introductions.Count];
|
||||
for (int i = 0; i < advised.Introductions.Count; i++)
|
||||
{
|
||||
this.m_introductions[i] = advised.Introductions[i].Advice;
|
||||
|
||||
@@ -214,9 +216,9 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
/// <param name="targetType">target type</param>
|
||||
/// <param name="method">target method</param>
|
||||
/// <returns>list of inteceptors for the specified method</returns>
|
||||
public IList GetInterceptors(Type targetType, MethodInfo method)
|
||||
public IList<object> GetInterceptors(Type targetType, MethodInfo method)
|
||||
{
|
||||
if (m_advised.Advisors.Length == 0)
|
||||
if (m_advised.Advisors.Count == 0)
|
||||
{
|
||||
return EmptyList;
|
||||
}
|
||||
@@ -250,17 +252,17 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
get { return m_advised.ProxyTargetAttributes; }
|
||||
}
|
||||
|
||||
IAdvisor[] IAdvised.Advisors
|
||||
IList<IAdvisor> IAdvised.Advisors
|
||||
{
|
||||
get { return m_advised.Advisors; }
|
||||
}
|
||||
|
||||
IIntroductionAdvisor[] IAdvised.Introductions
|
||||
IList<IIntroductionAdvisor> IAdvised.Introductions
|
||||
{
|
||||
get { return m_advised.Introductions; }
|
||||
}
|
||||
|
||||
Type[] IAdvised.Interfaces
|
||||
IList<Type> IAdvised.Interfaces
|
||||
{
|
||||
get { return m_advised.Interfaces; }
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security.Permissions;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
|
||||
@@ -123,27 +124,27 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
/// </summary>
|
||||
private sealed class ProxyTypeCacheKey
|
||||
{
|
||||
private sealed class HashCodeComparer : IComparer
|
||||
private sealed class HashCodeComparer : IComparer<Type>
|
||||
{
|
||||
public int Compare(object x, object y)
|
||||
public int Compare(Type x, Type y)
|
||||
{
|
||||
return x.GetHashCode().CompareTo(y.GetHashCode());
|
||||
}
|
||||
}
|
||||
|
||||
private static IComparer interfaceComparer = new HashCodeComparer();
|
||||
private static HashCodeComparer interfaceComparer = new HashCodeComparer();
|
||||
|
||||
private Type baseType;
|
||||
private Type targetType;
|
||||
private Type[] interfaceTypes;
|
||||
private List<Type> interfaceTypes;
|
||||
private bool proxyTargetAttributes;
|
||||
|
||||
public ProxyTypeCacheKey(Type baseType, Type targetType, Type[] interfaceTypes, bool proxyTargetAttributes)
|
||||
public ProxyTypeCacheKey(Type baseType, Type targetType, IList<Type> interfaceTypes, bool proxyTargetAttributes)
|
||||
{
|
||||
this.baseType = baseType;
|
||||
this.targetType = targetType;
|
||||
Array.Sort(interfaceTypes, interfaceComparer); // sort by GetHashcode()? to have a defined order
|
||||
this.interfaceTypes = interfaceTypes;
|
||||
this.interfaceTypes = new List<Type>(interfaceTypes);
|
||||
this.interfaceTypes.Sort(interfaceComparer); // sort by GetHashcode()? to have a defined order
|
||||
this.proxyTargetAttributes = proxyTargetAttributes;
|
||||
}
|
||||
|
||||
@@ -166,7 +167,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < interfaceTypes.Length; i++)
|
||||
for (int i = 0; i < interfaceTypes.Count; i++)
|
||||
{
|
||||
if (!Equals(interfaceTypes[i], proxyTypeCacheKey.interfaceTypes[i]))
|
||||
{
|
||||
@@ -184,7 +185,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
{
|
||||
int result = baseType.GetHashCode();
|
||||
result = 29*result + targetType.GetHashCode();
|
||||
for (int i = 0; i < interfaceTypes.Length; i++)
|
||||
for (int i = 0; i < interfaceTypes.Count; i++)
|
||||
{
|
||||
result = 29 * result + interfaceTypes[i].GetHashCode();
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
foreach (DictionaryEntry entry in targetMethods)
|
||||
{
|
||||
FieldInfo field = proxyType.GetField((string) entry.Key, BindingFlags.NonPublic | BindingFlags.Static);
|
||||
field.SetValue(proxyType, (MethodInfo) entry.Value);
|
||||
field.SetValue(proxyType, entry.Value);
|
||||
}
|
||||
|
||||
return proxyType;
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
foreach (DictionaryEntry entry in targetMethods)
|
||||
{
|
||||
FieldInfo field = proxyType.GetField((string)entry.Key, BindingFlags.NonPublic | BindingFlags.Static);
|
||||
field.SetValue(proxyType, (MethodInfo)entry.Value);
|
||||
field.SetValue(proxyType, entry.Value);
|
||||
}
|
||||
|
||||
return proxyType;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
{
|
||||
IProxyTypeBuilder typeBuilder;
|
||||
if ((advisedSupport.ProxyTargetType) ||
|
||||
(advisedSupport.Interfaces.Length == 0))
|
||||
(advisedSupport.Interfaces.Count == 0))
|
||||
{
|
||||
typeBuilder = new DecoratorAopProxyTypeBuilder(advisedSupport);
|
||||
}
|
||||
|
||||
@@ -20,11 +20,8 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
using Spring.Util;
|
||||
using Spring.Proxy;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
using Spring.Proxy;
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
foreach (DictionaryEntry entry in targetMethods)
|
||||
{
|
||||
FieldInfo field = proxyType.GetField((string)entry.Key, BindingFlags.NonPublic | BindingFlags.Static);
|
||||
field.SetValue(proxyType, (MethodInfo)entry.Value);
|
||||
field.SetValue(proxyType, entry.Value);
|
||||
}
|
||||
|
||||
// set proxy method references
|
||||
|
||||
@@ -20,13 +20,10 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop.Framework.DynamicProxy
|
||||
|
||||
@@ -20,13 +20,10 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop.Framework.DynamicProxy
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Spring.Collections;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -39,8 +37,8 @@ namespace Spring.Aop.Framework
|
||||
[Serializable]
|
||||
public sealed class HashtableCachingAdvisorChainFactory : IAdvisorChainFactory
|
||||
{
|
||||
private readonly IDictionary methodCache = new ListDictionary();
|
||||
|
||||
private readonly IDictionary<MethodInfo, IList<object>> methodCache = new Dictionary<MethodInfo, IList<object>>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of <see cref="AopAlliance.Intercept.IInterceptor"/> and
|
||||
/// <see cref="Spring.Aop.Framework.InterceptorAndDynamicMethodMatcher"/>
|
||||
@@ -59,10 +57,10 @@ namespace Spring.Aop.Framework
|
||||
/// <see cref="Spring.Aop.Framework.InterceptorAndDynamicMethodMatcher"/>
|
||||
/// instances for the supplied <paramref name="proxy"/>.
|
||||
/// </returns>
|
||||
public IList GetInterceptors(IAdvised advised, object proxy, MethodInfo method, Type targetType)
|
||||
public IList<object> GetInterceptors(IAdvised advised, object proxy, MethodInfo method, Type targetType)
|
||||
{
|
||||
IList cached = (IList)this.methodCache[method];
|
||||
if (cached == null)
|
||||
IList<object> cached;
|
||||
if (!this.methodCache.TryGetValue(method, out cached))
|
||||
{
|
||||
// recalculate...
|
||||
cached = AdvisorChainFactoryUtils.CalculateInterceptors(advised, proxy, method, targetType);
|
||||
|
||||
@@ -22,9 +22,10 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
using Spring.Aop;
|
||||
|
||||
using Spring.Proxy;
|
||||
|
||||
#endregion
|
||||
@@ -109,7 +110,7 @@ namespace Spring.Aop.Framework
|
||||
/// The collection of <see cref="Spring.Aop.IAdvisor"/>
|
||||
/// instances that have been applied to this proxy.
|
||||
/// </value>
|
||||
IAdvisor[] Advisors { get; }
|
||||
IList<IAdvisor> Advisors { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the collection of <see cref="Spring.Aop.IIntroductionAdvisor"/>
|
||||
@@ -127,7 +128,7 @@ namespace Spring.Aop.Framework
|
||||
/// The collection of <see cref="Spring.Aop.IIntroductionAdvisor"/>
|
||||
/// instances that have been applied to this proxy.
|
||||
/// </value>
|
||||
IIntroductionAdvisor[] Introductions { get; }
|
||||
IList<IIntroductionAdvisor> Introductions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the collection of interface <see cref="System.Type"/>s
|
||||
@@ -137,7 +138,7 @@ namespace Spring.Aop.Framework
|
||||
/// The collection of interface <see cref="System.Type"/>s
|
||||
/// to be (or that are being) proxied by this proxy.
|
||||
/// </value>
|
||||
Type[] Interfaces { get; }
|
||||
IList<Type> Interfaces { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the mapping of the proxied interface
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Spring.Aop.Framework
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
#endregion
|
||||
@@ -35,25 +35,24 @@ namespace Spring.Aop.Framework
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
public interface IAdvisorChainFactory : IAdvisedSupportListener
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the list of <see cref="AopAlliance.Intercept.IInterceptor"/> and
|
||||
/// <see cref="Spring.Aop.Framework.InterceptorAndDynamicMethodMatcher"/>
|
||||
/// instances for the supplied <paramref name="proxy"/>.
|
||||
/// </summary>
|
||||
/// <param name="advised">The proxy configuration object.</param>
|
||||
/// <param name="proxy">The object proxy.</param>
|
||||
/// <param name="method">
|
||||
/// The method for which the interceptors are to be evaluated.
|
||||
/// </param>
|
||||
/// <param name="targetType">
|
||||
/// The <see cref="System.Type"/> of the target object.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The list of <see cref="AopAlliance.Intercept.IInterceptor"/> and
|
||||
/// <see cref="Spring.Aop.Framework.InterceptorAndDynamicMethodMatcher"/>
|
||||
/// instances for the supplied <paramref name="proxy"/>.
|
||||
/// </returns>
|
||||
IList GetInterceptors(
|
||||
IAdvised advised, object proxy, MethodInfo method, Type targetType);
|
||||
/// <summary>
|
||||
/// Gets the list of <see cref="AopAlliance.Intercept.IInterceptor"/> and
|
||||
/// <see cref="Spring.Aop.Framework.InterceptorAndDynamicMethodMatcher"/>
|
||||
/// instances for the supplied <paramref name="proxy"/>.
|
||||
/// </summary>
|
||||
/// <param name="advised">The proxy configuration object.</param>
|
||||
/// <param name="proxy">The object proxy.</param>
|
||||
/// <param name="method">
|
||||
/// The method for which the interceptors are to be evaluated.
|
||||
/// </param>
|
||||
/// <param name="targetType">
|
||||
/// The <see cref="System.Type"/> of the target object.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// The list of <see cref="AopAlliance.Intercept.IInterceptor"/> and
|
||||
/// <see cref="Spring.Aop.Framework.InterceptorAndDynamicMethodMatcher"/>
|
||||
/// instances for the supplied <paramref name="proxy"/>.
|
||||
/// </returns>
|
||||
IList<object> GetInterceptors(IAdvised advised, object proxy, MethodInfo method, Type targetType);
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
using Spring.Proxy;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Spring.Aop.Framework
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Spring.Aop.Framework
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
using AopAlliance.Intercept;
|
||||
using Spring.Aop;
|
||||
|
||||
namespace Spring.Aop.Framework
|
||||
{
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using Spring.Aop.Framework.DynamicProxy;
|
||||
using Spring.Core.TypeResolution;
|
||||
|
||||
using Spring.Util;
|
||||
using Spring.Reflection.Dynamic;
|
||||
|
||||
|
||||
@@ -22,10 +22,13 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
using Common.Logging;
|
||||
|
||||
using Spring.Aop.Framework.Adapter;
|
||||
using Spring.Aop.Support;
|
||||
using Spring.Aop.Target;
|
||||
@@ -394,7 +397,7 @@ namespace Spring.Aop.Framework
|
||||
{
|
||||
return this.singletonInstance.GetType();
|
||||
}
|
||||
else if (Interfaces.Length == 1)
|
||||
else if (Interfaces.Count == 1)
|
||||
{
|
||||
return Interfaces[0];
|
||||
}
|
||||
@@ -453,8 +456,8 @@ namespace Spring.Aop.Framework
|
||||
|
||||
// The copy needs a fresh advisor chain, and a fresh TargetSource.
|
||||
ITargetSource targetSource = FreshTargetSource();
|
||||
IList advisorChain = FreshAdvisorChain();
|
||||
IList introductionChain = FreshIntroductionChain();
|
||||
IList<IAdvisor> advisorChain = FreshAdvisorChain();
|
||||
IList<IIntroductionAdvisor> introductionChain = FreshIntroductionChain();
|
||||
AdvisedSupport copy = new AdvisedSupport();
|
||||
copy.CopyConfigurationFrom(this, targetSource, advisorChain, introductionChain);
|
||||
|
||||
@@ -622,16 +625,16 @@ namespace Spring.Aop.Framework
|
||||
/// <summary> Add all global interceptors and pointcuts.</summary>
|
||||
private void AddGlobalAdvisor(IListableObjectFactory objectFactory, string prefix)
|
||||
{
|
||||
string[] globalAspectNames =
|
||||
IList<string> globalAspectNames =
|
||||
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IAdvisors));
|
||||
string[] globalAdvisorNames =
|
||||
IList<string> globalAdvisorNames =
|
||||
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IAdvisor));
|
||||
string[] globalInterceptorNames =
|
||||
IList<string> globalInterceptorNames =
|
||||
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IInterceptor));
|
||||
ArrayList objects = new ArrayList();
|
||||
Hashtable names = new Hashtable();
|
||||
List<object> objects = new List<object>();
|
||||
Dictionary<object, string> names = new Dictionary<object, string>();
|
||||
|
||||
for (int i = 0; i < globalAspectNames.Length; i++)
|
||||
for (int i = 0; i < globalAspectNames.Count; i++)
|
||||
{
|
||||
string name = globalAspectNames[i];
|
||||
if (name.StartsWith(prefix))
|
||||
@@ -648,7 +651,7 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < globalAdvisorNames.Length; i++)
|
||||
for (int i = 0; i < globalAdvisorNames.Count; i++)
|
||||
{
|
||||
string name = globalAdvisorNames[i];
|
||||
if (name.StartsWith(prefix))
|
||||
@@ -662,7 +665,7 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < globalInterceptorNames.Length; i++)
|
||||
for (int i = 0; i < globalInterceptorNames.Count; i++)
|
||||
{
|
||||
string name = globalInterceptorNames[i];
|
||||
if (name.StartsWith(prefix))
|
||||
@@ -672,10 +675,10 @@ namespace Spring.Aop.Framework
|
||||
names[obj] = name;
|
||||
}
|
||||
}
|
||||
((ArrayList)objects).Sort(new OrderComparator());
|
||||
objects.Sort(new OrderComparator());
|
||||
foreach (object obj in objects)
|
||||
{
|
||||
string name = (string)names[obj];
|
||||
string name = names[obj];
|
||||
AddAdvisorOnChainCreation(obj, name);
|
||||
}
|
||||
}
|
||||
@@ -734,16 +737,16 @@ namespace Spring.Aop.Framework
|
||||
/// <summary> Add all global introductions.</summary>
|
||||
private void AddGlobalIntroduction(IListableObjectFactory objectFactory, string prefix)
|
||||
{
|
||||
string[] globalAspectNames =
|
||||
IList<string> globalAspectNames =
|
||||
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IAdvisors));
|
||||
string[] globalAdvisorNames =
|
||||
IList<string> globalAdvisorNames =
|
||||
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IAdvisor));
|
||||
string[] globalIntroductionNames =
|
||||
IList<string> globalIntroductionNames =
|
||||
ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IAdvice));
|
||||
ArrayList objects = new ArrayList();
|
||||
Hashtable names = new Hashtable();
|
||||
Dictionary<object, string> names = new Dictionary<object, string>();
|
||||
|
||||
for (int i = 0; i < globalAspectNames.Length; i++)
|
||||
for (int i = 0; i < globalAspectNames.Count; i++)
|
||||
{
|
||||
string name = globalAspectNames[i];
|
||||
if (name.StartsWith(prefix))
|
||||
@@ -760,7 +763,7 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < globalAdvisorNames.Length; i++)
|
||||
for (int i = 0; i < globalAdvisorNames.Count; i++)
|
||||
{
|
||||
string name = globalAdvisorNames[i];
|
||||
if (name.StartsWith(prefix))
|
||||
@@ -774,7 +777,7 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < globalIntroductionNames.Length; i++)
|
||||
for (int i = 0; i < globalIntroductionNames.Count; i++)
|
||||
{
|
||||
string name = globalIntroductionNames[i];
|
||||
if (name.StartsWith(prefix))
|
||||
@@ -791,7 +794,7 @@ namespace Spring.Aop.Framework
|
||||
objects.Sort(new OrderComparator());
|
||||
foreach (object obj in objects)
|
||||
{
|
||||
string name = (string)names[obj];
|
||||
string name = names[obj];
|
||||
AddIntroductionOnChainCreation(obj, name);
|
||||
}
|
||||
}
|
||||
@@ -845,10 +848,10 @@ namespace Spring.Aop.Framework
|
||||
/// We need to do this every time a new prototype instance is returned,
|
||||
/// to return distinct instances of prototype interfaces and pointcuts.
|
||||
/// </summary>
|
||||
private IList FreshAdvisorChain()
|
||||
private IList<IAdvisor> FreshAdvisorChain()
|
||||
{
|
||||
IAdvisor[] advisors = Advisors;
|
||||
ArrayList freshAdvisors = new ArrayList();
|
||||
IList<IAdvisor> advisors = Advisors;
|
||||
List<IAdvisor> freshAdvisors = new List<IAdvisor>();
|
||||
foreach (IAdvisor advisor in advisors)
|
||||
{
|
||||
if (advisor is PrototypePlaceholder)
|
||||
@@ -878,10 +881,10 @@ namespace Spring.Aop.Framework
|
||||
/// We need to do this every time a new prototype instance is returned,
|
||||
/// to return distinct instances of prototype interfaces and pointcuts.
|
||||
/// </summary>
|
||||
private IList FreshIntroductionChain()
|
||||
private IList<IIntroductionAdvisor> FreshIntroductionChain()
|
||||
{
|
||||
IIntroductionAdvisor[] introductions = Introductions;
|
||||
ArrayList freshIntroductions = new ArrayList();
|
||||
IList<IIntroductionAdvisor> introductions = Introductions;
|
||||
List<IIntroductionAdvisor> freshIntroductions = new List<IIntroductionAdvisor>();
|
||||
foreach (IIntroductionAdvisor introduction in introductions)
|
||||
{
|
||||
if (introduction is PrototypePlaceholder)
|
||||
@@ -896,7 +899,7 @@ namespace Spring.Aop.Framework
|
||||
AssertUtils.ArgumentNotNull(this.objectFactory, "ObjectFactory");
|
||||
|
||||
object introductionObject = this.objectFactory.GetObject(pa.ObjectName);
|
||||
IAdvisor freshIntroduction = NamedObjectToIntroduction(introductionObject);
|
||||
IIntroductionAdvisor freshIntroduction = NamedObjectToIntroduction(introductionObject);
|
||||
freshIntroductions.Add(freshIntroduction);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Aop;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using AopAlliance.Aop;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -41,6 +39,6 @@ namespace Spring.Aop
|
||||
/// <value>
|
||||
/// A list of advisors.
|
||||
/// </value>
|
||||
IList Advisors { get; set; }
|
||||
IList<IAdvisor> Advisors { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -20,8 +20,8 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Aop;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -18,12 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -18,12 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Aop;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -24,9 +24,9 @@ using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security.Permissions;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
using Spring.Core;
|
||||
using Spring.Objects;
|
||||
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
using AopAlliance.Aop;
|
||||
using Spring.Core;
|
||||
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Spring.Aop.Support
|
||||
{
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
using Common.Logging;
|
||||
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Objects.Factory.Support;
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -18,12 +18,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop.Target
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
|
||||
using AopAlliance.Intercept;
|
||||
|
||||
using Spring.Aop.Support;
|
||||
using Spring.Collections;
|
||||
using Spring.Util;
|
||||
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace AopAlliance.Aop
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace AopAlliance.Intercept
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using AopAlliance.Aop;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace AopAlliance.Intercept
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace AopAlliance.Intercept
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Common.Logging;
|
||||
using Spring.Expressions;
|
||||
|
||||
@@ -128,8 +129,6 @@ namespace Spring.Aspects
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this instance can handle the exception the specified exception.
|
||||
/// </summary>
|
||||
@@ -138,7 +137,7 @@ namespace Spring.Aspects
|
||||
/// <returns>
|
||||
/// <c>true</c> if this instance can handle the specified exception; otherwise, <c>false</c>.
|
||||
/// </returns>
|
||||
public bool CanHandleException(Exception ex, IDictionary callContextDictionary)
|
||||
public bool CanHandleException(Exception ex, IDictionary<string, object> callContextDictionary)
|
||||
{
|
||||
if (SourceExceptionNames != null)
|
||||
{
|
||||
@@ -176,7 +175,7 @@ namespace Spring.Aspects
|
||||
/// Handles the exception.
|
||||
/// </summary>
|
||||
/// <returns>The return value from handling the exception, if not rethrown or a new exception is thrown.</returns>
|
||||
public abstract object HandleException(IDictionary callContextDictionary);
|
||||
public abstract object HandleException(IDictionary<string, object> callContextDictionary);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -21,12 +21,14 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
using Common.Logging;
|
||||
|
||||
using Spring.Caching;
|
||||
using Spring.Context;
|
||||
using Spring.Expressions;
|
||||
using System.Collections;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -104,9 +106,9 @@ namespace Spring.Aspects.Cache
|
||||
/// <returns>
|
||||
/// A dictionary containing all method arguments, keyed by method name.
|
||||
/// </returns>
|
||||
protected static IDictionary PrepareVariables(MethodInfo method, object[] arguments)
|
||||
protected static IDictionary<string, object> PrepareVariables(MethodInfo method, object[] arguments)
|
||||
{
|
||||
IDictionary vars = new Hashtable();
|
||||
IDictionary<string, object> vars = new Dictionary<string, object>();
|
||||
|
||||
vars[method.Name] = method;
|
||||
|
||||
@@ -141,7 +143,7 @@ namespace Spring.Aspects.Cache
|
||||
/// If the SpEL expression could not be successfuly resolved to a boolean.
|
||||
/// </exception>
|
||||
protected static bool EvalCondition(string condition,
|
||||
IExpression conditionExpression, object context, IDictionary variables)
|
||||
IExpression conditionExpression, object context, IDictionary<string, object> variables)
|
||||
{
|
||||
if (conditionExpression == null)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user