/// <summary>
 /// Creates an actual proxy instance based on the supplied <paramref name="advisedSupport"/>
 /// </summary>
 /// <param name="advisedSupport"></param>
 /// <returns></returns>
 protected override IAopProxy DoCreateAopProxyInstance(AdvisedSupport advisedSupport)
 {
     if (advisedSupport.ProxyType == null)
     {
         IProxyTypeBuilder typeBuilder;
         if ((advisedSupport.ProxyTargetType) ||
             (advisedSupport.Interfaces.Length == 0))
         {
             typeBuilder = new DecoratorAopProxyTypeBuilder(advisedSupport);
         }
         else
         {
             typeBuilder = new CompositionAopProxyTypeBuilder(advisedSupport);
         }
         advisedSupport.ProxyType = BuildProxyType(typeBuilder);
         advisedSupport.ProxyConstructor = advisedSupport.ProxyType.GetConstructor(new Type[] { typeof(IAdvised) });
     }
     return (IAopProxy)advisedSupport.ProxyConstructor.Invoke(new object[] { advisedSupport });
 }
 /// <summary>
 /// Creates an actual proxy instance based on the supplied <paramref name="advisedSupport"/>
 /// </summary>
 /// <param name="advisedSupport"></param>
 /// <returns></returns>
 protected override IAopProxy DoCreateAopProxyInstance(AdvisedSupport advisedSupport)
 {
     if (advisedSupport.ProxyType == null)
     {
         IProxyTypeBuilder typeBuilder;
         if ((advisedSupport.ProxyTargetType) ||
             (advisedSupport.Interfaces.Count == 0))
         {
             typeBuilder = new DecoratorAopProxyTypeBuilder(advisedSupport);
         }
         else
         {
             typeBuilder = new CompositionAopProxyTypeBuilder(advisedSupport);
         }
         advisedSupport.ProxyType        = BuildProxyType(typeBuilder);
         advisedSupport.ProxyConstructor = advisedSupport.ProxyType.GetConstructor(new Type[] { typeof(IAdvised) });
     }
     return((IAopProxy)advisedSupport.ProxyConstructor.Invoke(new object[] { advisedSupport }));
 }