Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv9200/Aop/Framework
Modified Files:
AdvisedSupport.cs AopUtils.cs IAdvised.cs
Log Message:
Update to Common.Logging 1.2
Add Logging advice
Refactoring of ExceptionHandlingAdvice
start of retry advice
misc improvements to spring.aop
Index: AdvisedSupport.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/AdvisedSupport.cs,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** AdvisedSupport.cs 3 Aug 2007 14:38:30 -0000 1.33
--- AdvisedSupport.cs 8 Oct 2007 22:04:50 -0000 1.34
***************
*** 930,935 ****
#endregion
! #region Properties
/// <summary>
/// Sets the target object that is to be advised.
--- 930,948 ----
#endregion
+ #region ITargetTypeAware implementation
! /// <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; }
! }
!
! #endregion
!
! #region Properties
/// <summary>
/// Sets the target object that is to be advised.
Index: IAdvised.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/IAdvised.cs,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** IAdvised.cs 3 Aug 2007 14:38:30 -0000 1.13
--- IAdvised.cs 8 Oct 2007 22:04:50 -0000 1.14
***************
*** 51,55 ****
/// <seealso cref="Spring.Aop.Framework.AdvisedSupport"/>
[ProxyIgnore]
! public interface IAdvised
{
/// <summary>
--- 51,55 ----
/// <seealso cref="Spring.Aop.Framework.AdvisedSupport"/>
[ProxyIgnore]
! public interface IAdvised : ITargetTypeAware
{
/// <summary>
Index: AopUtils.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/AopUtils.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AopUtils.cs 2 Aug 2007 04:15:20 -0000 1.2
--- AopUtils.cs 8 Oct 2007 22:04:50 -0000 1.3
***************
*** 246,249 ****
--- 246,268 ----
#endregion
+
+ /// <summary>
+ /// Gets the type of the target.
+ /// </summary>
+ /// <param name="candidate">The candidate.</param>
+ /// <returns></returns>
+ public static Type GetTargetType(object candidate)
+ {
+ AssertUtils.ArgumentNotNull(candidate,"candidate", "Candidate object must not be null");
+ if (candidate is ITargetTypeAware)
+ {
+ return ((ITargetTypeAware) candidate).TargetType;
+ }
+ if (IsDecoratorAopProxy(candidate))
+ {
+ return candidate.GetType().BaseType;
+ }
+ return candidate.GetType();
+ }
}
}
\ No newline at end of file
|