SPRNET-1425
-changed version info to reflect 1.3.2
This commit is contained in:
20
readme.txt
20
readme.txt
@@ -1,11 +1,11 @@
|
||||
THE SPRING.NET FRAMEWORK, Release 1.3.1 (December 10, 2010)
|
||||
THE SPRING.NET FRAMEWORK, Release 1.3.2 (April 1, 2011)
|
||||
--------------------------------------------------------------------
|
||||
http://www.springframework.net/
|
||||
|
||||
|
||||
1. INTRODUCTION
|
||||
|
||||
The 1.3.1 release of Spring.NET contains
|
||||
The 1.3.2 release of Spring.NET contains
|
||||
|
||||
* A full featured Inversion of Control container
|
||||
* An Aspect Oriented Programming framework
|
||||
@@ -20,7 +20,7 @@ The 1.3.1 release of Spring.NET contains
|
||||
* Portable Service Abstractions
|
||||
- Export plain .NET objects via .NET Remoting, Web Service or .NET Serviced Component and create client side proxies based on endpoint URL and service interface.
|
||||
* NHibernate Integation
|
||||
- NHibernate 1.0, 1.2, 2.0, 2.1, and 3.0 integration to simplify use of NHibernate and participate in Spring's declarative transaction management functionality.
|
||||
- NHibernate 1.0, 1.2, 2.0, 2.1, 3.0, and 3.1 integration to simplify use of NHibernate and participate in Spring's declarative transaction management functionality.
|
||||
* ASP.NET AJAX Integration
|
||||
- Exporter to expose plain object on which Dependency Injection and AOP have been applied to JavaScript.
|
||||
* NUnit and MSTest integration
|
||||
@@ -65,6 +65,7 @@ Release contents:
|
||||
* "lib/NHibernate20" contains NHibernate 2.0 dlls
|
||||
* "lib/NHibernate21" contains NHibernate 2.1 dlls
|
||||
* "lib/NHibernate30" contains NHibernate 3.0 dlls
|
||||
* "lib/NHibernate31" contains NHibernate 3.1 dlls
|
||||
* "doc" contains reference documentation, MSDN-style API help, and the Spring.NET xsd.
|
||||
* "examples" contains sample applications.
|
||||
* "build-support" contains additonal applications need to build using NAnt as some convenience
|
||||
@@ -112,6 +113,10 @@ The "bin" directory contains the following distinct dll files for use in applica
|
||||
- Contents: NHibernate 3.0 integration
|
||||
- Dependencies: Spring.Core, Spring.Aop, Spring.Data, NHibernate
|
||||
|
||||
* "Spring.Data.NHibernate31" (~90 KB)
|
||||
- Contents: NHibernate 3.1 integration
|
||||
- Dependencies: Spring.Core, Spring.Aop, Spring.Data, NHibernate
|
||||
|
||||
* "Spring.Services" (~70 KB)
|
||||
- Contents: Web Services, Remoting, and Enterprise Component based services.
|
||||
- Dependencies: Spring.Core, Spring.Aop
|
||||
@@ -179,8 +184,9 @@ Documented sample applications can be found in "examples":
|
||||
|
||||
VS.NET
|
||||
------
|
||||
There are four solution file for different version of VS.NET
|
||||
There are five solution file for different version of VS.NET
|
||||
|
||||
* Spring.Net.2002.sln for use with VS.NET 2002
|
||||
* Spring.Net.2003.sln for use with VS.NET 2003
|
||||
* Spring.Net.2005.sln for use with VS.NET 2005
|
||||
* Spring.Net.2008.sln for use with VS.NET 2008
|
||||
@@ -190,10 +196,10 @@ Note:
|
||||
When building on Vista/Windows7 with activated UAC, you might get an error:
|
||||
|
||||
xcopy
|
||||
"C:\Spring.Net\Spring.NET-1.3.0\Spring.NET\test\Spring\Spring.Core.Tests\Spring.Core.Tests.dll.config"
|
||||
"C:\Spring.Net\Spring.NET-1.3.2\Spring.NET\test\Spring\Spring.Core.Tests\Spring.Core.Tests.dll.config"
|
||||
..\..\..\..\build\VS.Net.2008\Spring.Core.Tests\Debug\ /y /s /q-Command exited with Code 9009. Spring.Core.Tests.2008
|
||||
|
||||
In this case you need to run Visual Studio with Administrator-permissions.
|
||||
In this case you need to run Visual Studio with Administrator-permissions. (note that the first part of this path is an example only)
|
||||
|
||||
NAnt
|
||||
----
|
||||
@@ -204,7 +210,7 @@ To build the source and run the unit tests type
|
||||
|
||||
build test
|
||||
|
||||
If you want to run the build to create strongly signed assemblies you can generate a key file by executing the following command
|
||||
If you want to run the build to create strongly signed assemblies you can generate a key file by executing the following command (assuming that sn.exe is properly on your search path):
|
||||
|
||||
sn -k Spring.Net.snk
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ using System.Reflection;
|
||||
#endif
|
||||
[assembly: AssemblyCompany("http://www.springframework.net")]
|
||||
[assembly: AssemblyProduct("Spring.NET Framework 1.3.1")]
|
||||
[assembly: AssemblyCopyright("Copyright 2002-2010 Spring.NET Framework Team.")]
|
||||
[assembly: AssemblyCopyright("Copyright 2002-2011 Spring.NET Framework Team.")]
|
||||
[assembly: AssemblyTrademark("Apache License, Version 2.0")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -35,17 +35,17 @@ using System.Reflection;
|
||||
// (e.g., add any new ones at the TOP of this construct!)
|
||||
|
||||
#if NET_4_0
|
||||
[assembly: AssemblyVersion("1.3.1.40001")]
|
||||
[assembly: AssemblyVersion("1.3.2.40001")]
|
||||
#elif NET_3_5
|
||||
[assembly: AssemblyVersion("1.3.1.35001")]
|
||||
[assembly: AssemblyVersion("1.3.2.35001")]
|
||||
#elif NET_3_0
|
||||
[assembly: AssemblyVersion("1.3.1.30001")]
|
||||
[assembly: AssemblyVersion("1.3.2.30001")]
|
||||
#elif NET_2_0
|
||||
[assembly: AssemblyVersion("1.3.1.20001")]
|
||||
[assembly: AssemblyVersion("1.3.2.20001")]
|
||||
#elif NET_1_1
|
||||
[assembly: AssemblyVersion("1.3.1.11001")]
|
||||
[assembly: AssemblyVersion("1.3.2.11001")]
|
||||
#elif NET_1_0
|
||||
[assembly: AssemblyVersion("1.3.1.10001")]
|
||||
[assembly: AssemblyVersion("1.3.2.10001")]
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -254,7 +254,7 @@ namespace Spring.Aop.Framework
|
||||
{
|
||||
if (this.interceptors == null ||
|
||||
this.currentInterceptorIndex == this.interceptors.Count)
|
||||
{
|
||||
{
|
||||
AssertJoinpoint();
|
||||
return InvokeJoinpoint();
|
||||
}
|
||||
@@ -299,24 +299,24 @@ namespace Spring.Aop.Framework
|
||||
protected abstract IMethodInvocation PrepareMethodInvocationForProceed(
|
||||
IMethodInvocation invocation);
|
||||
|
||||
/// <summary>
|
||||
/// Performs sanity checks, whether the actual joinpoint may be invoked
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// By default checks that the underlying target is not null and the called method is implemented
|
||||
/// by the target's type.
|
||||
/// </remarks>
|
||||
/// <exception cref="ArgumentNullException">if <see cref="target"/> is <c>null</c>.</exception>
|
||||
/// <summary>
|
||||
/// Performs sanity checks, whether the actual joinpoint may be invoked
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// By default checks that the underlying target is not null and the called method is implemented
|
||||
/// by the target's type.
|
||||
/// </remarks>
|
||||
/// <exception cref="ArgumentNullException">if <see cref="target"/> is <c>null</c>.</exception>
|
||||
/// <exception cref="NotSupportedException">if the <see cref="target"/> 's type does not implement <see cref="method"/>.</exception>
|
||||
protected virtual void AssertJoinpoint()
|
||||
{
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(target, "target");
|
||||
// if (this.method != null
|
||||
// && !this.method.DeclaringType.IsAssignableFrom(target.GetType()))
|
||||
// {
|
||||
// // This means the target type doesn't implement the interface.
|
||||
// // Since no interceptor has handled the call, we throw a sensible exception here.
|
||||
// throw new NotSupportedException(string.Format("Interface method '{0}.{1}()' was not handled by any interceptor and the underlying target type '{2}' does not implement this method.", method.DeclaringType.FullName, method.Name, target.GetType().FullName));
|
||||
// {
|
||||
// // This means the target type doesn't implement the interface.
|
||||
// // Since no interceptor has handled the call, we throw a sensible exception here.
|
||||
// throw new NotSupportedException(string.Format("Interface method '{0}.{1}()' was not handled by any interceptor and the underlying target type '{2}' does not implement this method.", method.DeclaringType.FullName, method.Name, target.GetType().FullName));
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -39,7 +39,7 @@ namespace Spring.Aop.Framework.Adapter
|
||||
/// interface.
|
||||
/// </summary>
|
||||
/// <author>Rod Johnson</author>
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
[Serializable]
|
||||
public class DefaultAdvisorAdapterRegistry : IAdvisorAdapterRegistry
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -27,7 +27,7 @@ namespace Spring.Aop.Framework.Adapter
|
||||
/// <see cref="IAdvisorAdapterRegistry"/> instance.
|
||||
/// </summary>
|
||||
/// <author>Rod Johnson</author>
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
[Serializable]
|
||||
public sealed class GlobalAdvisorAdapterRegistry : DefaultAdvisorAdapterRegistry
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -310,7 +310,7 @@ namespace Spring.Aop.Framework.Adapter
|
||||
handlerMethod.Invoke(this.throwsAdvice, handlerArgs);
|
||||
}
|
||||
catch (TargetInvocationException ex)
|
||||
{
|
||||
{
|
||||
throw ReflectionUtils.UnwrapTargetInvocationException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -112,14 +112,14 @@ namespace Spring.Aop.Framework
|
||||
|
||||
/// <summary>
|
||||
/// The advisor chain factory.
|
||||
/// </summary>
|
||||
private IAdvisorChainFactory advisorChainFactory;
|
||||
|
||||
/// <summary>
|
||||
/// If no explicit interfaces are specified, interfaces will be automatically determined
|
||||
/// from the target type
|
||||
/// </summary>
|
||||
private bool autoDetectInterfaces;
|
||||
/// </summary>
|
||||
private IAdvisorChainFactory advisorChainFactory;
|
||||
|
||||
/// <summary>
|
||||
/// If no explicit interfaces are specified, interfaces will be automatically determined
|
||||
/// from the target type
|
||||
/// </summary>
|
||||
private bool autoDetectInterfaces;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -131,10 +131,10 @@ namespace Spring.Aop.Framework
|
||||
/// default advisor chain factory.
|
||||
/// </summary>
|
||||
public AdvisedSupport()
|
||||
{
|
||||
this.advisorChainFactory = new HashtableCachingAdvisorChainFactory();
|
||||
this.AddListener(this.advisorChainFactory);
|
||||
this.autoDetectInterfaces = true;
|
||||
{
|
||||
this.advisorChainFactory = new HashtableCachingAdvisorChainFactory();
|
||||
this.AddListener(this.advisorChainFactory);
|
||||
this.autoDetectInterfaces = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -155,38 +155,38 @@ namespace Spring.Aop.Framework
|
||||
AddInterfaceInternal(intf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="Spring.Aop.Framework.ProxyFactory"/>
|
||||
/// class that proxys all of the interfaces exposed by the supplied
|
||||
/// <paramref name="target"/>.
|
||||
/// </summary>
|
||||
/// <param name="target">The object to proxy.</param>
|
||||
/// <exception cref="AopConfigException">
|
||||
/// If the <paramref name="target"/> is <cref lang="null"/>.
|
||||
/// </exception>
|
||||
public AdvisedSupport(object target)
|
||||
: this(GetInterfaces(target))
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="Spring.Aop.Framework.ProxyFactory"/>
|
||||
/// class that proxys all of the interfaces exposed by the supplied
|
||||
/// <paramref name="targetSource"/>'s target.
|
||||
/// </summary>
|
||||
/// <param name="targetSource">The <see cref="ITargetSource"/> providing access to the object to proxy.</param>
|
||||
/// <exception cref="AopConfigException">
|
||||
/// If the <paramref name="targetSource"/> is <cref lang="null"/>.
|
||||
/// </exception>
|
||||
public AdvisedSupport(ITargetSource targetSource)
|
||||
: this(GetInterfaces(targetSource != null ? targetSource.TargetType : null))
|
||||
{
|
||||
TargetSource = targetSource;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="Spring.Aop.Framework.ProxyFactory"/>
|
||||
/// class that proxys all of the interfaces exposed by the supplied
|
||||
/// <paramref name="target"/>.
|
||||
/// </summary>
|
||||
/// <param name="target">The object to proxy.</param>
|
||||
/// <exception cref="AopConfigException">
|
||||
/// If the <paramref name="target"/> is <cref lang="null"/>.
|
||||
/// </exception>
|
||||
public AdvisedSupport(object target)
|
||||
: this(GetInterfaces(target))
|
||||
{
|
||||
Target = target;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="Spring.Aop.Framework.ProxyFactory"/>
|
||||
/// class that proxys all of the interfaces exposed by the supplied
|
||||
/// <paramref name="targetSource"/>'s target.
|
||||
/// </summary>
|
||||
/// <param name="targetSource">The <see cref="ITargetSource"/> providing access to the object to proxy.</param>
|
||||
/// <exception cref="AopConfigException">
|
||||
/// If the <paramref name="targetSource"/> is <cref lang="null"/>.
|
||||
/// </exception>
|
||||
public AdvisedSupport(ITargetSource targetSource)
|
||||
: this(GetInterfaces(targetSource != null ? targetSource.TargetType : null))
|
||||
{
|
||||
TargetSource = targetSource;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IAdvised implementation
|
||||
@@ -214,10 +214,10 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(value, "AdvisorChainFactory");
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(value, "AdvisorChainFactory");
|
||||
lock (this.SyncRoot)
|
||||
{
|
||||
{
|
||||
if (this.advisorChainFactory != null)
|
||||
{
|
||||
RemoveListener(this.advisorChainFactory);
|
||||
@@ -313,22 +313,22 @@ namespace Spring.Aop.Framework
|
||||
SetInterfacesInternal(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set interfaces to be proxied, bypassing locking and <see cref="ProxyConfig.IsFrozen"/>
|
||||
/// </summary>
|
||||
protected void SetInterfacesInternal(Type[] value)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set interfaces to be proxied, bypassing locking and <see cref="ProxyConfig.IsFrozen"/>
|
||||
/// </summary>
|
||||
protected void SetInterfacesInternal(Type[] value)
|
||||
{
|
||||
this.interfaceMap.Clear();
|
||||
if (value != null)
|
||||
{
|
||||
{
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
{
|
||||
AddInterfaceInternal(value[i]);
|
||||
}
|
||||
}
|
||||
InterfacesChanged();
|
||||
}
|
||||
InterfacesChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -611,7 +611,7 @@ namespace Spring.Aop.Framework
|
||||
if (index == -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
RemoveAdvisorInternal(index);
|
||||
return true;
|
||||
}
|
||||
@@ -917,7 +917,7 @@ namespace Spring.Aop.Framework
|
||||
/// As <see cref="System.Object.ToString()"/> will normally be passed straight through
|
||||
/// to the advised target, this method returns the <see cref="System.Object.ToString()"/>
|
||||
/// equivalent for the AOP proxy itself.
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
/// <remarks>To override this format, override <see cref="ToProxyConfigStringInternal"/></remarks>
|
||||
/// <returns>
|
||||
/// A <see cref="System.String"/> description of the proxy configuration.
|
||||
@@ -925,53 +925,53 @@ namespace Spring.Aop.Framework
|
||||
public string ToProxyConfigString()
|
||||
{
|
||||
lock (this.SyncRoot)
|
||||
{
|
||||
{
|
||||
return ToProxyConfigStringInternal();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns textual information about this configuration object
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns textual information about this configuration object
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected virtual string ToProxyConfigStringInternal()
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder(this.GetType().FullName + ":\n");
|
||||
buffer.Append(this.interfaceMap.Count + " interfaces=[");
|
||||
this.InterfacesToString(buffer);
|
||||
buffer.Append("];\n");
|
||||
buffer.Append(this._advisors.Count + " pointcuts=[");
|
||||
this.AdvisorsToString(buffer);
|
||||
buffer.Append("];\n");
|
||||
buffer.Append("targetSource=[" + this.m_targetSource + "];\n");
|
||||
buffer.Append("advisorChainFactory=" + this.advisorChainFactory + ";\n");
|
||||
buffer.Append(base.ToString());
|
||||
return buffer.ToString();
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder(this.GetType().FullName + ":\n");
|
||||
buffer.Append(this.interfaceMap.Count + " interfaces=[");
|
||||
this.InterfacesToString(buffer);
|
||||
buffer.Append("];\n");
|
||||
buffer.Append(this._advisors.Count + " pointcuts=[");
|
||||
this.AdvisorsToString(buffer);
|
||||
buffer.Append("];\n");
|
||||
buffer.Append("targetSource=[" + this.m_targetSource + "];\n");
|
||||
buffer.Append("advisorChainFactory=" + this.advisorChainFactory + ";\n");
|
||||
buffer.Append(base.ToString());
|
||||
return buffer.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the target type behind the implementing object.
|
||||
/// Ttypically a proxy configuration or an actual proxy.
|
||||
/// </summary>
|
||||
/// <value>The type of the target or null if not known.</value>
|
||||
public Type TargetType
|
||||
{
|
||||
get { return TargetSource.TargetType; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If no explicit interfaces are specified, interfaces will be automatically determined
|
||||
/// from the target type on proxy creation. Defaults to true
|
||||
/// </summary>
|
||||
public bool AutoDetectInterfaces
|
||||
{
|
||||
get { return autoDetectInterfaces; }
|
||||
set { autoDetectInterfaces = value; }
|
||||
}
|
||||
#region Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the target type behind the implementing object.
|
||||
/// Ttypically a proxy configuration or an actual proxy.
|
||||
/// </summary>
|
||||
/// <value>The type of the target or null if not known.</value>
|
||||
public Type TargetType
|
||||
{
|
||||
get { return TargetSource.TargetType; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If no explicit interfaces are specified, interfaces will be automatically determined
|
||||
/// from the target type on proxy creation. Defaults to true
|
||||
/// </summary>
|
||||
public bool AutoDetectInterfaces
|
||||
{
|
||||
get { return autoDetectInterfaces; }
|
||||
set { autoDetectInterfaces = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the target object that is to be advised.
|
||||
@@ -1348,8 +1348,8 @@ namespace Spring.Aop.Framework
|
||||
this._advisorsArray = advisorsArray;
|
||||
}
|
||||
|
||||
#region IAdvisedSupportListener support
|
||||
|
||||
#region IAdvisedSupportListener support
|
||||
|
||||
/// <summary>
|
||||
/// Callback method that is invoked when the list of proxied interfaces
|
||||
/// has changed.
|
||||
@@ -1402,11 +1402,11 @@ namespace Spring.Aop.Framework
|
||||
{
|
||||
listener.Activated(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Creates an AOP proxy using this instance's configuration data.
|
||||
/// </summary>
|
||||
@@ -1422,32 +1422,32 @@ namespace Spring.Aop.Framework
|
||||
protected internal virtual IAopProxy CreateAopProxy()
|
||||
{
|
||||
lock (this.SyncRoot)
|
||||
{
|
||||
if (this.autoDetectInterfaces && CountNonIntroductionInterfaces() == 0
|
||||
// && !this.ProxyTargetType
|
||||
)
|
||||
{
|
||||
this.interfaceMap.Clear();
|
||||
// add all target interfaces
|
||||
Type[] targetInterfaces = ReflectionUtils.GetInterfaces(this.TargetType);
|
||||
foreach(Type targetInterface in targetInterfaces )
|
||||
{
|
||||
this.interfaceMap[targetInterface] = null;
|
||||
}
|
||||
// add introduced interfaces
|
||||
foreach(IIntroductionAdvisor introduction in this._introductions)
|
||||
{
|
||||
foreach(Type introducedInterface in introduction.Interfaces)
|
||||
{
|
||||
this.interfaceMap[introducedInterface] = introduction;
|
||||
}
|
||||
}
|
||||
|
||||
if (targetInterfaces.Length > 0)
|
||||
{
|
||||
InterfacesChanged();
|
||||
}
|
||||
}
|
||||
{
|
||||
if (this.autoDetectInterfaces && CountNonIntroductionInterfaces() == 0
|
||||
// && !this.ProxyTargetType
|
||||
)
|
||||
{
|
||||
this.interfaceMap.Clear();
|
||||
// add all target interfaces
|
||||
Type[] targetInterfaces = ReflectionUtils.GetInterfaces(this.TargetType);
|
||||
foreach(Type targetInterface in targetInterfaces )
|
||||
{
|
||||
this.interfaceMap[targetInterface] = null;
|
||||
}
|
||||
// add introduced interfaces
|
||||
foreach(IIntroductionAdvisor introduction in this._introductions)
|
||||
{
|
||||
foreach(Type introducedInterface in introduction.Interfaces)
|
||||
{
|
||||
this.interfaceMap[introducedInterface] = introduction;
|
||||
}
|
||||
}
|
||||
|
||||
if (targetInterfaces.Length > 0)
|
||||
{
|
||||
InterfacesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.isActive)
|
||||
{
|
||||
@@ -1457,20 +1457,20 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the number of <see cref="Interfaces"/> not delegating to one of the <see cref="Introductions"/>.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Calculates the number of <see cref="Interfaces"/> not delegating to one of the <see cref="Introductions"/>.
|
||||
/// </summary>
|
||||
private int CountNonIntroductionInterfaces()
|
||||
{
|
||||
int c = 0;
|
||||
foreach(Type interfaceType in this.interfaceMap.Keys)
|
||||
{
|
||||
if (this.interfaceMap[interfaceType] == null)
|
||||
{
|
||||
c++;
|
||||
}
|
||||
}
|
||||
return c;
|
||||
{
|
||||
int c = 0;
|
||||
foreach(Type interfaceType in this.interfaceMap.Keys)
|
||||
{
|
||||
if (this.interfaceMap[interfaceType] == null)
|
||||
{
|
||||
c++;
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1491,8 +1491,8 @@ namespace Spring.Aop.Framework
|
||||
/// instance.
|
||||
/// </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 ArrayList(other.Advisors), new ArrayList(other.Introductions));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1511,10 +1511,10 @@ namespace Spring.Aop.Framework
|
||||
/// The <see cref="Spring.Aop.Framework.AdvisedSupport"/> instance
|
||||
/// containing the configiration data that is to be copied into this
|
||||
/// instance.
|
||||
/// </param>
|
||||
/// <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>
|
||||
/// </param>
|
||||
/// <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)
|
||||
{
|
||||
CopyFrom(other);
|
||||
@@ -1522,23 +1522,23 @@ namespace Spring.Aop.Framework
|
||||
this.m_targetSource = targetSource;
|
||||
// this.cachedProxyType = other.cachedProxyType;
|
||||
// this.cachedProxyConstructor = other.cachedProxyConstructor;
|
||||
this.Interfaces = (Type[]) CollectionUtils.ToArray(other.Interfaces, typeof(Type));
|
||||
foreach (Type intf in other.interfaceMap.Keys)
|
||||
{
|
||||
this.interfaceMap[intf] = other.interfaceMap[intf];
|
||||
}
|
||||
this.Interfaces = (Type[]) CollectionUtils.ToArray(other.Interfaces, typeof(Type));
|
||||
foreach (Type intf in other.interfaceMap.Keys)
|
||||
{
|
||||
this.interfaceMap[intf] = other.interfaceMap[intf];
|
||||
}
|
||||
this._advisors = new ArrayList();
|
||||
foreach (IAdvisor advisor in advisors)
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(advisor, "Advisor must not be null");
|
||||
AssertUtils.ArgumentNotNull(advisor, "Advisor must not be null");
|
||||
AddAdvisor(advisor);
|
||||
}
|
||||
this._introductions = new ArrayList();
|
||||
foreach (IIntroductionAdvisor advisor in introductions)
|
||||
{
|
||||
// TODO (EE): implement
|
||||
// ValidateIntroductionAdvisor((IIntroductionAdvisor) advisor);
|
||||
AssertUtils.ArgumentNotNull(advisor, "IntroductionAdvisor must not be null");
|
||||
{
|
||||
// TODO (EE): implement
|
||||
// ValidateIntroductionAdvisor((IIntroductionAdvisor) advisor);
|
||||
AssertUtils.ArgumentNotNull(advisor, "IntroductionAdvisor must not be null");
|
||||
AddIntroduction(advisor);
|
||||
}
|
||||
UpdateAdvisorsArray();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -81,27 +81,27 @@ namespace Spring.Aop.Framework
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the current call is executed under control of an AOP proxy.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>
|
||||
/// Will be <cref lang="null"/> unless the
|
||||
/// <see cref="Spring.Aop.Framework.ProxyConfig.ExposeProxy"/> property
|
||||
/// on the controlling proxy has been set to <see langword="true"/>.
|
||||
/// </p>
|
||||
/// <p>
|
||||
/// The default value for the
|
||||
/// <see cref="Spring.Aop.Framework.ProxyConfig.ExposeProxy"/> property
|
||||
/// is <see langword="false"/>, for performance reasons.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
/// <summary>
|
||||
/// Indicates if the current call is executed under control of an AOP proxy.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>
|
||||
/// Will be <cref lang="null"/> unless the
|
||||
/// <see cref="Spring.Aop.Framework.ProxyConfig.ExposeProxy"/> property
|
||||
/// on the controlling proxy has been set to <see langword="true"/>.
|
||||
/// </p>
|
||||
/// <p>
|
||||
/// The default value for the
|
||||
/// <see cref="Spring.Aop.Framework.ProxyConfig.ExposeProxy"/> property
|
||||
/// is <see langword="false"/>, for performance reasons.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
public static bool IsActive
|
||||
{
|
||||
get
|
||||
{
|
||||
{
|
||||
get
|
||||
{
|
||||
return (tls_ProxyStack != null && tls_ProxyStack.Count > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2011 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
|
||||
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Common.Logging;
|
||||
using Spring.Aop.Framework.DynamicProxy;
|
||||
using Spring.Core;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Aop.Framework.DynamicProxy;
|
||||
using Spring.Core;
|
||||
using Spring.Objects.Factory;
|
||||
using Spring.Objects.Factory.Config;
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract IObjectPostProcessor implementation that creates AOP proxies.
|
||||
/// This class is completely generic; it contains no special code to handle
|
||||
/// any particular aspects, such as pooling aspects.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>Subclasses must implement the abstract FindCandidateAdvisors() method
|
||||
/// to return a list of Advisors applying to any object. Subclasses can also
|
||||
/// override the inherited ShouldSkip() method to exclude certain objects
|
||||
/// from autoproxying, but they must be careful to invoke the ShouldSkip()
|
||||
/// method of this class, which tries to avoid circular reference problems
|
||||
/// and infinite loops.</p>
|
||||
/// <p>Advisors or advices requiring ordering should implement the Ordered interface.
|
||||
/// This class sorts advisors by Ordered order value. Advisors that don't implement
|
||||
/// the Ordered interface will be considered to be unordered, and will appear
|
||||
/// at the end of the advisor chain in undefined order.</p>
|
||||
/// </remarks>
|
||||
/// <seealso cref="Spring.Aop.Framework.AutoProxy.AbstractAdvisorAutoProxyCreator.FindCandidateAdvisors"/>
|
||||
/// <author>Rod Johnson</author>
|
||||
using Spring.Util;
|
||||
|
||||
#endregion
|
||||
|
||||
namespace Spring.Aop.Framework.AutoProxy
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstract IObjectPostProcessor implementation that creates AOP proxies.
|
||||
/// This class is completely generic; it contains no special code to handle
|
||||
/// any particular aspects, such as pooling aspects.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>Subclasses must implement the abstract FindCandidateAdvisors() method
|
||||
/// to return a list of Advisors applying to any object. Subclasses can also
|
||||
/// override the inherited ShouldSkip() method to exclude certain objects
|
||||
/// from autoproxying, but they must be careful to invoke the ShouldSkip()
|
||||
/// method of this class, which tries to avoid circular reference problems
|
||||
/// and infinite loops.</p>
|
||||
/// <p>Advisors or advices requiring ordering should implement the Ordered interface.
|
||||
/// This class sorts advisors by Ordered order value. Advisors that don't implement
|
||||
/// the Ordered interface will be considered to be unordered, and will appear
|
||||
/// at the end of the advisor chain in undefined order.</p>
|
||||
/// </remarks>
|
||||
/// <seealso cref="Spring.Aop.Framework.AutoProxy.AbstractAdvisorAutoProxyCreator.FindCandidateAdvisors"/>
|
||||
/// <author>Rod Johnson</author>
|
||||
/// <author>Adhari C Mahendra (.NET)</author>
|
||||
/// <author>Erich Eichinger</author>
|
||||
public abstract class AbstractAdvisorAutoProxyCreator : AbstractAutoProxyCreator
|
||||
{
|
||||
private readonly ILog Log;
|
||||
private IAdvisorRetrievalHelper _advisorRetrievalHelper;
|
||||
|
||||
/// <author>Erich Eichinger</author>
|
||||
public abstract class AbstractAdvisorAutoProxyCreator : AbstractAutoProxyCreator
|
||||
{
|
||||
private readonly ILog Log;
|
||||
private IAdvisorRetrievalHelper _advisorRetrievalHelper;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize
|
||||
/// </summary>
|
||||
protected AbstractAdvisorAutoProxyCreator()
|
||||
/// </summary>
|
||||
protected AbstractAdvisorAutoProxyCreator()
|
||||
{
|
||||
Log = LogManager.GetLogger(this.GetType());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We override this method to ensure that all candidate advisors are materialized
|
||||
/// under a stack trace including this object. Otherwise, the dependencies won't
|
||||
/// be apparent to the circular-reference prevention strategy in AbstractObjectFactory.
|
||||
/// </summary>
|
||||
public override IObjectFactory ObjectFactory
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!(value is IConfigurableListableObjectFactory))
|
||||
{
|
||||
throw new InvalidOperationException("Can not use AdvisorAutoProxyCreator without a ConfigurableListableObjectFactory");
|
||||
}
|
||||
/// <summary>
|
||||
/// We override this method to ensure that all candidate advisors are materialized
|
||||
/// under a stack trace including this object. Otherwise, the dependencies won't
|
||||
/// be apparent to the circular-reference prevention strategy in AbstractObjectFactory.
|
||||
/// </summary>
|
||||
public override IObjectFactory ObjectFactory
|
||||
{
|
||||
set
|
||||
{
|
||||
if (!(value is IConfigurableListableObjectFactory))
|
||||
{
|
||||
throw new InvalidOperationException("Can not use AdvisorAutoProxyCreator without a ConfigurableListableObjectFactory");
|
||||
}
|
||||
base.ObjectFactory = value;
|
||||
InitObjectFactory((IConfigurableListableObjectFactory)value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An new <see cref="IConfigurableListableObjectFactory"/> was set. Initialize this creator instance
|
||||
/// according to the specified object factory.
|
||||
/// </summary>
|
||||
/// <param name="objectFactory"></param>
|
||||
protected virtual void InitObjectFactory(IConfigurableListableObjectFactory objectFactory)
|
||||
/// <param name="objectFactory"></param>
|
||||
protected virtual void InitObjectFactory(IConfigurableListableObjectFactory objectFactory)
|
||||
{
|
||||
_advisorRetrievalHelper = CreateAdvisorRetrievalHelper(objectFactory);
|
||||
}
|
||||
@@ -107,19 +107,19 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
protected virtual IAdvisorRetrievalHelper CreateAdvisorRetrievalHelper(IConfigurableListableObjectFactory objectFactory)
|
||||
{
|
||||
return new ObjectFactoryAdvisorRetrievalHelperAdapter(this, objectFactory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return whether the given object is to be proxied, what additional
|
||||
/// advices (e.g. AOP Alliance interceptors) and advisors to apply.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>The previous targetName of this method was "GetInterceptorAndAdvisorForObject".
|
||||
/// It has been renamed in the course of general terminology clarification
|
||||
/// in Spring 1.1. An AOP Alliance Interceptor is just a special form of
|
||||
/// Advice, so the generic Advice term is preferred now.</p>
|
||||
/// <p>The third parameter, customTargetSource, is new in Spring 1.1;
|
||||
/// add it to existing implementations of this method.</p>
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return whether the given object is to be proxied, what additional
|
||||
/// advices (e.g. AOP Alliance interceptors) and advisors to apply.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <p>The previous targetName of this method was "GetInterceptorAndAdvisorForObject".
|
||||
/// It has been renamed in the course of general terminology clarification
|
||||
/// in Spring 1.1. An AOP Alliance Interceptor is just a special form of
|
||||
/// Advice, so the generic Advice term is preferred now.</p>
|
||||
/// <p>The third parameter, customTargetSource, is new in Spring 1.1;
|
||||
/// add it to existing implementations of this method.</p>
|
||||
/// </remarks>
|
||||
/// <param name="targetType">the type of the target object</param>
|
||||
/// <param name="targetName">the name of the target object</param>
|
||||
@@ -130,34 +130,34 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// 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)
|
||||
{
|
||||
IList advisors = FindEligibleAdvisors(targetType, targetName);
|
||||
if (advisors.Count == 0)
|
||||
{
|
||||
return DO_NOT_PROXY;
|
||||
}
|
||||
return (object[]) CollectionUtils.ToArray(advisors, typeof (object));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find all eligible advices and for autoproxying this class.
|
||||
/// </summary>
|
||||
protected override object[] GetAdvicesAndAdvisorsForObject(Type targetType, string targetName, ITargetSource customTargetSource)
|
||||
{
|
||||
IList advisors = FindEligibleAdvisors(targetType, targetName);
|
||||
if (advisors.Count == 0)
|
||||
{
|
||||
return DO_NOT_PROXY;
|
||||
}
|
||||
return (object[]) CollectionUtils.ToArray(advisors, typeof (object));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find all eligible advices and for autoproxying this class.
|
||||
/// </summary>
|
||||
/// <param name="targetType">the type of the object to be advised</param>
|
||||
/// <param name="targetName">the name of the object to be advised</param>
|
||||
/// <param name="targetName">the name of the object to be advised</param>
|
||||
/// <returns>
|
||||
/// 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)
|
||||
{
|
||||
IList candidateAdvisors = FindCandidateAdvisors(targetType, targetName);
|
||||
/// </returns>
|
||||
protected IList FindEligibleAdvisors(Type targetType, string targetName)
|
||||
{
|
||||
IList candidateAdvisors = FindCandidateAdvisors(targetType, targetName);
|
||||
IList eligibleAdvisors = FindAdvisorsThatCanApply(candidateAdvisors, targetType, targetName);
|
||||
|
||||
ExtendAdvisors(eligibleAdvisors, targetType, targetName);
|
||||
eligibleAdvisors = SortAdvisors(eligibleAdvisors);
|
||||
|
||||
return eligibleAdvisors;
|
||||
|
||||
return eligibleAdvisors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -217,32 +217,32 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
if (logger.IsInfoEnabled)
|
||||
{
|
||||
logger.Info(string.Format("Candidate advisor [{0}] rejected for targetType [{1}]", candidate, targetType));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return eligibleAdvisors;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sorts the advisors.
|
||||
/// </summary>
|
||||
/// <param name="advisors">The advisors.</param>
|
||||
/// <returns></returns>
|
||||
protected virtual IList SortAdvisors(IList advisors)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sorts the advisors.
|
||||
/// </summary>
|
||||
/// <param name="advisors">The advisors.</param>
|
||||
/// <returns></returns>
|
||||
protected virtual IList SortAdvisors(IList advisors)
|
||||
{
|
||||
if (advisors.Count==0)
|
||||
{
|
||||
return advisors;
|
||||
}
|
||||
|
||||
if (advisors is ArrayList)
|
||||
((ArrayList) advisors).Sort(new OrderComparator());
|
||||
else if (advisors is Array)
|
||||
Array.Sort((Array) advisors, new OrderComparator());
|
||||
return advisors;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (advisors is ArrayList)
|
||||
((ArrayList) advisors).Sort(new OrderComparator());
|
||||
else if (advisors is Array)
|
||||
Array.Sort((Array) advisors, new OrderComparator());
|
||||
return advisors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extension hook that subclasses can override to add additional advisors for the given object,
|
||||
/// given the sorted advisors obtained to date.<br/>
|
||||
@@ -256,9 +256,9 @@ 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 advisors, Type objectType, string objectName)
|
||||
{}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the given advisor is eligible for the specified target. The default implementation
|
||||
/// always returns true.
|
||||
@@ -269,8 +269,8 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
protected virtual bool IsEligibleAdvisorObject(string advisorName, Type targetType, string targetName)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class ObjectFactoryAdvisorRetrievalHelperAdapter : ObjectFactoryAdvisorRetrievalHelper
|
||||
{
|
||||
private readonly AbstractAdvisorAutoProxyCreator _owner;
|
||||
@@ -285,6 +285,6 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
return base.IsEligibleObject(advisorName, objectType, objectName)
|
||||
&& _owner.IsEligibleAdvisorObject(advisorName, objectType, objectName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
@@ -54,9 +54,9 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <remarks>
|
||||
/// Whether an object shall be proxied or not is determined by the result of <see cref="IsEligibleForProxying"/>.
|
||||
/// </remarks>
|
||||
/// <param name="targetType">ingored</param>
|
||||
/// <param name="targetName">ignored</param>
|
||||
/// <param name="customTargetSource">ignored</param>
|
||||
/// <param name="targetType">ingored</param>
|
||||
/// <param name="targetName">ignored</param>
|
||||
/// <param name="customTargetSource">ignored</param>
|
||||
/// <returns>
|
||||
/// Always <see cref="AbstractAutoProxyCreator.PROXY_WITHOUT_ADDITIONAL_INTERCEPTORS"/> to indicate, that the object shall be proxied.
|
||||
/// </returns>
|
||||
@@ -73,7 +73,7 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// Override this method to allow or reject proxying for the given object.
|
||||
/// </remarks>
|
||||
/// <param name="targetType">the object's type</param>
|
||||
/// <param name="targetName">the name of the object</param>
|
||||
/// <param name="targetName">the name of the object</param>
|
||||
/// <seealso cref="AbstractAutoProxyCreator.ShouldSkip"/>
|
||||
/// <returns>whether the given object shall be proxied.</returns>
|
||||
protected abstract bool IsEligibleForProxying( Type targetType, string targetName );
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -63,8 +63,8 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
/// <summary>
|
||||
/// Determines, whether the given object shall be proxied by matching <paramref name="targetType"/> against <see cref="AttributeTypes"/>.
|
||||
/// </summary>
|
||||
/// <param name="targetType">the object's type</param>
|
||||
/// <param name="targetName">the name of the object</param>
|
||||
/// <param name="targetType">the object's type</param>
|
||||
/// <param name="targetName">the name of the object</param>
|
||||
protected override bool IsEligibleForProxying( Type targetType, string targetName )
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(this.AttributeTypes, "AttributeTypes");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -21,8 +21,8 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Spring.Context;
|
||||
using System.Collections;
|
||||
using Spring.Context;
|
||||
using Spring.Objects.Factory;
|
||||
|
||||
#endregion
|
||||
@@ -72,69 +72,70 @@ namespace Spring.Aop.Framework.AutoProxy
|
||||
set { advisorObjectNamePrefix = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IObjectNameAware Members
|
||||
|
||||
/// <summary>
|
||||
/// Set the name of the object in the object factory that created this object.
|
||||
/// </summary>
|
||||
/// <value>The name of the object in the factory.</value>
|
||||
/// <remarks>
|
||||
/// <p>
|
||||
/// Invoked after population of normal object properties but before an init
|
||||
/// callback like <see cref="T:Spring.Objects.Factory.IInitializingObject"/>'s
|
||||
/// <see cref="M:Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
|
||||
/// method or a custom init-method.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
public string ObjectName
|
||||
{
|
||||
set
|
||||
{
|
||||
// If no infrastructure object name prefix has been set, override it.
|
||||
if (advisorObjectNamePrefix == null)
|
||||
{
|
||||
advisorObjectNamePrefix = value + SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Find all possible advisor candidates to use in auto-proxying
|
||||
/// </summary>
|
||||
/// <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)
|
||||
{
|
||||
if (cachedAdvisors == null) {
|
||||
cachedAdvisors = base.FindCandidateAdvisors(targetType, targetName);
|
||||
}
|
||||
return cachedAdvisors;
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Whether the given advisor is eligible for the specified target.
|
||||
/// </summary>
|
||||
/// <param name="advisorName">the advisor name</param>
|
||||
/// <param name="targetType">the target object's type</param>
|
||||
/// <param name="targetName">the target object's name</param>
|
||||
protected override bool IsEligibleAdvisorObject(string advisorName, Type targetType, string targetName)
|
||||
{
|
||||
return (!usePrefix || advisorName.StartsWith(advisorObjectNamePrefix))
|
||||
&& base.IsEligibleAdvisorObject(advisorName, targetType, targetName);
|
||||
}
|
||||
#region IObjectNameAware Members
|
||||
|
||||
/// <summary>
|
||||
/// Validate configuration
|
||||
/// <summary>
|
||||
/// Set the name of the object in the object factory that created this object.
|
||||
/// </summary>
|
||||
public virtual void AfterPropertiesSet()
|
||||
{
|
||||
// eagerly resolve advisors at this stage already to prevent circular dep problems.
|
||||
// TODO (EE): fix instantiation process to make test "AdvisorAutoProxyCreatorCircularReferencesTests" work.
|
||||
cachedAdvisors = base.FindCandidateAdvisors(null, null);
|
||||
}
|
||||
/// <value>The name of the object in the factory.</value>
|
||||
/// <remarks>
|
||||
/// <p>
|
||||
/// Invoked after population of normal object properties but before an init
|
||||
/// callback like <see cref="T:Spring.Objects.Factory.IInitializingObject"/>'s
|
||||
/// <see cref="M:Spring.Objects.Factory.IInitializingObject.AfterPropertiesSet"/>
|
||||
/// method or a custom init-method.
|
||||
/// </p>
|
||||
/// </remarks>
|
||||
public string ObjectName
|
||||
{
|
||||
set
|
||||
{
|
||||
// If no infrastructure object name prefix has been set, override it.
|
||||
if (advisorObjectNamePrefix == null)
|
||||
{
|
||||
advisorObjectNamePrefix = value + SEPARATOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Find all possible advisor candidates to use in auto-proxying
|
||||
/// </summary>
|
||||
/// <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)
|
||||
{
|
||||
if (cachedAdvisors == null) {
|
||||
cachedAdvisors = base.FindCandidateAdvisors(targetType, targetName);
|
||||
}
|
||||
return cachedAdvisors;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether the given advisor is eligible for the specified target.
|
||||
/// </summary>
|
||||
/// <param name="advisorName">the advisor name</param>
|
||||
/// <param name="targetType">the target object's type</param>
|
||||
/// <param name="targetName">the target object's name</param>
|
||||
protected override bool IsEligibleAdvisorObject(string advisorName, Type targetType, string targetName)
|
||||
{
|
||||
return (!usePrefix || advisorName.StartsWith(advisorObjectNamePrefix))
|
||||
&& base.IsEligibleAdvisorObject(advisorName, targetType, targetName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate configuration
|
||||
/// </summary>
|
||||
public virtual void AfterPropertiesSet()
|
||||
{
|
||||
// eagerly resolve advisors at this stage already to prevent circular dep problems.
|
||||
// TODO (EE): fix instantiation process to make test "AdvisorAutoProxyCreatorCircularReferencesTests" work.
|
||||
cachedAdvisors = base.FindCandidateAdvisors(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
@@ -88,22 +88,22 @@ namespace Spring.Aop.Framework
|
||||
/// If invoking the joinpoint resulted in an exception.
|
||||
/// </exception>
|
||||
/// <see cref="Spring.Aop.Framework.AbstractMethodInvocation.InvokeJoinpoint"/>
|
||||
protected override object InvokeJoinpoint()
|
||||
{
|
||||
protected override object InvokeJoinpoint()
|
||||
{
|
||||
MethodInfo targetMethodInfo = ((this.proxyMethod == null)) ? method : this.proxyMethod;
|
||||
|
||||
IDynamicMethod targetMethod = new SafeMethod(targetMethodInfo);
|
||||
|
||||
try
|
||||
try
|
||||
{
|
||||
AssertUtils.Understands(target, "target", targetMethodInfo);
|
||||
return targetMethod.Invoke(target, arguments);
|
||||
}
|
||||
// Only happens if fallback to standard reflection.
|
||||
catch (TargetInvocationException ex)
|
||||
{
|
||||
throw ReflectionUtils.UnwrapTargetInvocationException(ex);
|
||||
}
|
||||
return targetMethod.Invoke(target, arguments);
|
||||
}
|
||||
// Only happens if fallback to standard reflection.
|
||||
catch (TargetInvocationException ex)
|
||||
{
|
||||
throw ReflectionUtils.UnwrapTargetInvocationException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -88,16 +88,16 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
#if DEBUG
|
||||
target.SetLocalSymInfo("target");
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates the IL instructions that pushes
|
||||
/// the target instance on which calls should be delegated to.
|
||||
/// </summary>
|
||||
/// <param name="il">The IL generator to use.</param>
|
||||
protected override void PushTarget(ILGenerator il)
|
||||
{
|
||||
il.Emit(OpCodes.Ldloc, target);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates the IL instructions that pushes
|
||||
/// the target instance on which calls should be delegated to.
|
||||
/// </summary>
|
||||
/// <param name="il">The IL generator to use.</param>
|
||||
protected override void PushTarget(ILGenerator il)
|
||||
{
|
||||
il.Emit(OpCodes.Ldloc, target);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -110,17 +110,17 @@ namespace Spring.Aop.Framework.DynamicProxy
|
||||
/// </param>
|
||||
protected override void GenerateMethodLogic(
|
||||
ILGenerator il, MethodInfo method, MethodInfo interfaceMethod)
|
||||
{
|
||||
PushAdvisedProxy(il);
|
||||
il.Emit(OpCodes.Ldfld, References.TargetSourceField);
|
||||
il.EmitCall(OpCodes.Callvirt, References.GetTargetMethod, null);
|
||||
{
|
||||
PushAdvisedProxy(il);
|
||||
il.Emit(OpCodes.Ldfld, References.TargetSourceField);
|
||||
il.EmitCall(OpCodes.Callvirt, References.GetTargetMethod, null);
|
||||
il.Emit(OpCodes.Stloc, target);
|
||||
|
||||
base.GenerateMethodLogic(il, method, interfaceMethod);
|
||||
|
||||
PushAdvisedProxy(il);
|
||||
il.Emit(OpCodes.Ldfld, References.TargetSourceField);
|
||||
PushTarget(il);
|
||||
base.GenerateMethodLogic(il, method, interfaceMethod);
|
||||
|
||||
PushAdvisedProxy(il);
|
||||
il.Emit(OpCodes.Ldfld, References.TargetSourceField);
|
||||
PushTarget(il);
|
||||
il.EmitCall(OpCodes.Callvirt, References.GetReleaseTargetMethod, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -38,7 +38,7 @@ namespace Spring.Aop.Framework
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
[Serializable]
|
||||
public sealed class HashtableCachingAdvisorChainFactory : IAdvisorChainFactory
|
||||
{
|
||||
{
|
||||
private readonly IDictionary methodCache = new ListDictionary();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -21,11 +21,11 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using System.Reflection;
|
||||
using Spring.Aop.Framework.DynamicProxy;
|
||||
using Spring.Core.TypeResolution;
|
||||
using Spring.Util;
|
||||
using Spring.Util;
|
||||
using Spring.Reflection.Dynamic;
|
||||
|
||||
#endregion
|
||||
@@ -52,16 +52,16 @@ namespace Spring.Aop.Framework
|
||||
[Serializable]
|
||||
public class ProxyConfig
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private static readonly IDynamicConstructor cachedAopProxyFactoryDynCtor =
|
||||
#region Fields
|
||||
|
||||
private static readonly IDynamicConstructor cachedAopProxyFactoryDynCtor =
|
||||
new SafeConstructor(typeof(ProxyConfig).Assembly.GetType("Spring.Aop.Framework.DynamicProxy.CachedAopProxyFactory", false, false).GetConstructor(Type.EmptyTypes));
|
||||
|
||||
private bool proxyTargetType;
|
||||
private bool proxyTargetAttributes = true;
|
||||
private bool optimize;
|
||||
private bool frozen;
|
||||
|
||||
private bool frozen;
|
||||
|
||||
private IAopProxyFactory aopProxyFactory = cachedAopProxyFactoryDynCtor.Invoke(ObjectUtils.EmptyObjects) as IAopProxyFactory;
|
||||
|
||||
private bool exposeProxy;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -74,36 +74,36 @@ namespace Spring.Aop.Framework
|
||||
/// </remarks>
|
||||
/// <param name="interfaces">The interfaces to implement.</param>
|
||||
public ProxyFactory(Type[] interfaces) : base(interfaces)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="ProxyFactory"/> class for the
|
||||
/// given interface and interceptor.
|
||||
/// </summary>
|
||||
/// <remarks>Convenience method for creating a proxy for a single interceptor
|
||||
/// , assuming that the interceptor handles all calls itself rather than delegating
|
||||
/// to a target, like in the case of remoting proxies.</remarks>
|
||||
/// <param name="proxyInterface">The interface that the proxy should implement.</param>
|
||||
/// <param name="interceptor">The interceptor that the proxy should invoke.</param>
|
||||
public ProxyFactory(Type proxyInterface, IInterceptor interceptor)
|
||||
{
|
||||
AddInterface(proxyInterface);
|
||||
AddAdvice(interceptor);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create a new instance of the <see cref="ProxyFactory"/> class for the specified
|
||||
/// <see cref="ITargetSource"/> making the proxy implement the specified interface.
|
||||
/// </summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="proxyInterface">The interface that the proxy should implement.</param>
|
||||
/// <param name="targetSource">The target source that the proxy should invoek.</param>
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="ProxyFactory"/> class for the
|
||||
/// given interface and interceptor.
|
||||
/// </summary>
|
||||
/// <remarks>Convenience method for creating a proxy for a single interceptor
|
||||
/// , assuming that the interceptor handles all calls itself rather than delegating
|
||||
/// to a target, like in the case of remoting proxies.</remarks>
|
||||
/// <param name="proxyInterface">The interface that the proxy should implement.</param>
|
||||
/// <param name="interceptor">The interceptor that the proxy should invoke.</param>
|
||||
public ProxyFactory(Type proxyInterface, IInterceptor interceptor)
|
||||
{
|
||||
AddInterface(proxyInterface);
|
||||
AddAdvice(interceptor);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create a new instance of the <see cref="ProxyFactory"/> class for the specified
|
||||
/// <see cref="ITargetSource"/> making the proxy implement the specified interface.
|
||||
/// </summary>
|
||||
/// <remarks></remarks>
|
||||
/// <param name="proxyInterface">The interface that the proxy should implement.</param>
|
||||
/// <param name="targetSource">The target source that the proxy should invoek.</param>
|
||||
public ProxyFactory(Type proxyInterface, ITargetSource targetSource)
|
||||
{
|
||||
AddInterface(proxyInterface);
|
||||
TargetSource = targetSource;
|
||||
{
|
||||
AddInterface(proxyInterface);
|
||||
TargetSource = targetSource;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 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 <20> 2002-2011 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -91,9 +91,9 @@ namespace Spring.Aop.Framework
|
||||
protected override object InvokeJoinpoint()
|
||||
{
|
||||
try
|
||||
{
|
||||
MethodInfo targetMethodInfo = ((this.proxyMethod == null)) ? method : this.proxyMethod;
|
||||
|
||||
{
|
||||
MethodInfo targetMethodInfo = ((this.proxyMethod == null)) ? method : this.proxyMethod;
|
||||
|
||||
AssertUtils.Understands(target, "target", targetMethodInfo);
|
||||
return targetMethodInfo.Invoke(target, arguments);
|
||||
}
|
||||
@@ -101,7 +101,7 @@ namespace Spring.Aop.Framework
|
||||
{
|
||||
throw ReflectionUtils.UnwrapTargetInvocationException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="Spring.Aop.Framework.ReflectiveMethodInvocation"/> instance
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -63,15 +63,15 @@ namespace Spring.Aop.Support
|
||||
/// Creates a new instance of the
|
||||
/// <see cref="AttributeMatchMethodPointcutAdvisor"/> class
|
||||
/// for the supplied <paramref name="advice"/>.
|
||||
/// </summary>
|
||||
/// <param name="attribute">
|
||||
/// The <see cref="System.Attribute"/> to match.
|
||||
/// </param>
|
||||
/// <param name="inherit">
|
||||
/// Flag that controls whether or not the inheritance tree of the
|
||||
/// method to be included in the search for the <see cref="Attribute"/>?
|
||||
/// </param>
|
||||
/// <param name="advice">the advice to apply if the pointcut matches</param>
|
||||
/// </summary>
|
||||
/// <param name="attribute">
|
||||
/// The <see cref="System.Attribute"/> to match.
|
||||
/// </param>
|
||||
/// <param name="inherit">
|
||||
/// Flag that controls whether or not the inheritance tree of the
|
||||
/// method to be included in the search for the <see cref="Attribute"/>?
|
||||
/// </param>
|
||||
/// <param name="advice">the advice to apply if the pointcut matches</param>
|
||||
public AttributeMatchMethodPointcutAdvisor(Type attribute, bool inherit, IAdvice advice)
|
||||
:base(attribute, inherit)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -237,44 +237,44 @@ namespace Spring.Aop.Support
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2 IntroductionAdvisors are considered equal if
|
||||
/// a) they are of the same type
|
||||
/// b) their introduction advices are equal
|
||||
/// c) they introduce the same interfaces
|
||||
/// </summary>
|
||||
public bool Equals(DefaultIntroductionAdvisor other)
|
||||
{
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
if (other.GetType() != this.GetType())
|
||||
return false;
|
||||
return Equals(other._introduction, _introduction) && Equals(other._interfaces, _interfaces);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2 IntroductionAdvisors are considered equal if
|
||||
/// a) they are of the same type
|
||||
/// b) their introduction advices are equal
|
||||
/// c) they introduce the same interfaces
|
||||
/// </summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return Equals(obj as DefaultIntroductionAdvisor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2 IntroductionAdvisors are considered equal if
|
||||
/// a) they are of the same type
|
||||
/// b) their introduction advices are equal
|
||||
/// c) they introduce the same interfaces
|
||||
/// </summary>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((_introduction != null ? _introduction.GetHashCode() : 0)*397) ^ (_interfaces != null ? _interfaces.GetHashCode() : 0);
|
||||
}
|
||||
/// <summary>
|
||||
/// 2 IntroductionAdvisors are considered equal if
|
||||
/// a) they are of the same type
|
||||
/// b) their introduction advices are equal
|
||||
/// c) they introduce the same interfaces
|
||||
/// </summary>
|
||||
public bool Equals(DefaultIntroductionAdvisor other)
|
||||
{
|
||||
if (ReferenceEquals(null, other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
if (other.GetType() != this.GetType())
|
||||
return false;
|
||||
return Equals(other._introduction, _introduction) && Equals(other._interfaces, _interfaces);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2 IntroductionAdvisors are considered equal if
|
||||
/// a) they are of the same type
|
||||
/// b) their introduction advices are equal
|
||||
/// c) they introduce the same interfaces
|
||||
/// </summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return Equals(obj as DefaultIntroductionAdvisor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2 IntroductionAdvisors are considered equal if
|
||||
/// a) they are of the same type
|
||||
/// b) their introduction advices are equal
|
||||
/// c) they introduce the same interfaces
|
||||
/// </summary>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((_introduction != null ? _introduction.GetHashCode() : 0)*397) ^ (_interfaces != null ? _interfaces.GetHashCode() : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -89,27 +89,27 @@ namespace Spring.Aop.Support
|
||||
{
|
||||
get { return pointcut; }
|
||||
set { pointcut = value;}
|
||||
}
|
||||
|
||||
|
||||
///<summary>
|
||||
/// 2 <see cref="DefaultPointcutAdvisor"/>s are considered equal, if
|
||||
/// a) their pointcuts are equal
|
||||
/// b) their advices are equal
|
||||
///</summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return base.Equals(obj as DefaultPointcutAdvisor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates a unique hashcode based on advice + pointcut
|
||||
/// </summary>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
|
||||
///<summary>
|
||||
/// 2 <see cref="DefaultPointcutAdvisor"/>s are considered equal, if
|
||||
/// a) their pointcuts are equal
|
||||
/// b) their advices are equal
|
||||
///</summary>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return base.Equals(obj as DefaultPointcutAdvisor);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Calculates a unique hashcode based on advice + pointcut
|
||||
/// </summary>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String"/> that represents the current
|
||||
/// <see cref="System.Object"/>.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -32,8 +32,8 @@ namespace Spring.Aop.Support
|
||||
/// care about arguments at runtime.
|
||||
/// </summary>
|
||||
/// <author>Rod Johnson</author>
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
[Serializable]
|
||||
/// <author>Aleksandar Seovic (.NET)</author>
|
||||
[Serializable]
|
||||
public abstract class DynamicMethodMatcher : IMethodMatcher
|
||||
{
|
||||
#region Constructor (s) / Destructor
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -21,7 +21,7 @@
|
||||
#region Imports
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
#endregion
|
||||
@@ -98,23 +98,23 @@ namespace Spring.Aop.Support
|
||||
/// <returns>
|
||||
/// <see langword="true"/> if this this method matches statically.
|
||||
/// </returns>
|
||||
public abstract bool Matches(MethodInfo method, Type targetType);
|
||||
|
||||
|
||||
#region Serialization Support
|
||||
|
||||
void IDeserializationCallback.OnDeserialization(object sender)
|
||||
{
|
||||
OnDeserialization(sender);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override in case you need to initialized non-serialized fields on deserialization.
|
||||
/// </summary>
|
||||
protected virtual void OnDeserialization(object sender)
|
||||
{
|
||||
public abstract bool Matches(MethodInfo method, Type targetType);
|
||||
|
||||
|
||||
#region Serialization Support
|
||||
|
||||
void IDeserializationCallback.OnDeserialization(object sender)
|
||||
{
|
||||
OnDeserialization(sender);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Override in case you need to initialized non-serialized fields on deserialization.
|
||||
/// </summary>
|
||||
protected virtual void OnDeserialization(object sender)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -27,11 +27,11 @@ using Spring.Util;
|
||||
|
||||
namespace Spring.Aop.Support
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple <see cref="Spring.Aop.ITypeFilter"/> implementation that matches
|
||||
/// <summary>
|
||||
/// Simple <see cref="Spring.Aop.ITypeFilter"/> implementation that matches
|
||||
/// a given <see cref="Type"/>'s <see cref="Type.FullName"/> against <see cref="TypeNamePatterns"/>.
|
||||
/// For a list of supported pattern syntax see <see cref="PatternMatchUtils.SimpleMatch(string[],string)"/>.
|
||||
/// </summary>
|
||||
/// For a list of supported pattern syntax see <see cref="PatternMatchUtils.SimpleMatch(string[],string)"/>.
|
||||
/// </summary>
|
||||
/// <author>Erich Eichinger</author>
|
||||
/// <seealso cref="PatternMatchUtils.SimpleMatch(string[],string)"/>
|
||||
public class TypeNameTypeFilter : ITypeFilter
|
||||
@@ -58,14 +58,14 @@ namespace Spring.Aop.Support
|
||||
_typeNamePatterns = patterns;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does the supplied type's <see cref="Type.FullName"/> match any of the <see cref="TypeNamePatterns"/>?
|
||||
/// </summary>
|
||||
/// <param name="type">
|
||||
/// The candidate <see cref="System.Type"/>.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// <see langword="true"/> if the <paramref name="type"/> matches any of the <see cref="TypeNamePatterns"/>.
|
||||
/// <summary>
|
||||
/// Does the supplied type's <see cref="Type.FullName"/> match any of the <see cref="TypeNamePatterns"/>?
|
||||
/// </summary>
|
||||
/// <param name="type">
|
||||
/// The candidate <see cref="System.Type"/>.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// <see langword="true"/> if the <paramref name="type"/> matches any of the <see cref="TypeNamePatterns"/>.
|
||||
/// </returns>
|
||||
public bool Matches(Type type)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -85,7 +85,7 @@ namespace Spring.Aop.Support
|
||||
|
||||
/// <summary>
|
||||
/// Internal method matcher class for union pointcut.
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
private sealed class PointcutUnionMethodMatcher : IMethodMatcher
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -67,12 +67,12 @@ namespace Spring.Aop.Target
|
||||
/// </remarks>
|
||||
public virtual Type TargetType
|
||||
{
|
||||
get
|
||||
{
|
||||
lock(this)
|
||||
{
|
||||
return _target.GetType();
|
||||
}
|
||||
get
|
||||
{
|
||||
lock(this)
|
||||
{
|
||||
return _target.GetType();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#region License
|
||||
|
||||
/*
|
||||
* Copyright <20> 2002-2010 the original author or authors.
|
||||
* Copyright <20> 2002-2011 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.
|
||||
@@ -44,7 +44,7 @@ namespace Spring.Aop.Target
|
||||
[Serializable]
|
||||
public sealed class SingletonTargetSource : ITargetSource
|
||||
{
|
||||
private readonly object target;
|
||||
private readonly object target;
|
||||
private readonly Type targetType;
|
||||
|
||||
/// <summary>
|
||||
@@ -67,7 +67,7 @@ namespace Spring.Aop.Target
|
||||
/// for the specified target object.
|
||||
/// </summary>
|
||||
/// <param name="target">The target object to expose.</param>
|
||||
/// <param name="targetType">The type of <paramref name="target"/> to expose.</param>
|
||||
/// <param name="targetType">The type of <paramref name="target"/> to expose.</param>
|
||||
/// <exception cref="System.ArgumentNullException">
|
||||
/// If the supplied <paramref name="target"/> is
|
||||
/// <see langword="null"/>.
|
||||
@@ -76,7 +76,7 @@ namespace Spring.Aop.Target
|
||||
{
|
||||
AssertUtils.ArgumentNotNull(target, "target");
|
||||
AssertUtils.ArgumentNotNull(targetType, "targetType");
|
||||
this.target = target;
|
||||
this.target = target;
|
||||
this.targetType = targetType;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user