This blog is a knowledge base...where I clip cool tricks and urls

Dynamic Proxy - MultiCast delegates

Too bad the article is in Chinese ....
clipped from www2.cnblogs.com
namespace Castle.DynamicProxy
{
  
using System;

  [Serializable]
  
public class StandardInterceptor : IInterceptor
  
{
    
public StandardInterceptor(){}
    
protected virtual void PreProceed(IInvocation invocation, params object[] args){}
    
protected virtual void PostProceed(IInvocation invocation, ref object returnValue, params object[] args){}

    
public virtual object Intercept(IInvocation invocation, params object[] args)
    
{
      PreProceed(invocation, args);
      
object retValue = invocation.Proceed( args );
      PostProceed(invocation, 
ref retValue, args);
      
return retValue;
    }

  }

}
 blog it

No comments: