User: xtoff
Date: 2009/10/29 02:09 AM

Modified:
 /DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/
  ModuleScopeTestCase.cs
 /DynamicProxy/trunk/src/Castle.DynamicProxy/
  AttributeUtil.cs, DefaultProxyBuilder.cs, IProxyBuilder.cs

Log:
 - minor cosmetic changes
 - docs improvement in AttributeUtil

File Changes:

Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy/
=======================================================

File [modified]: AttributeUtil.cs
Delta lines: +7 -18
===================================================================

--- DynamicProxy/trunk/src/Castle.DynamicProxy/DefaultProxyBuilder.cs   
2009-10-28 17:53:05 UTC (rev 6284)
+++ DynamicProxy/trunk/src/Castle.DynamicProxy/DefaultProxyBuilder.cs   
2009-10-29 09:09:51 UTC (rev 6285)
@@ -44,19 +44,14 @@
                {
                        this.scope = scope;
                }
-
                public ModuleScope ModuleScope
                {
                        get { return scope; }
                }
 
-               public virtual Type CreateClassProxy(Type classToProxy, 
ProxyGenerationOptions options)
+               public Type CreateClassProxy(Type classToProxy, 
ProxyGenerationOptions options)
                {
-                       AssertValidType(classToProxy);
-
-                       ClassProxyGenerator generator = new 
ClassProxyGenerator(scope, classToProxy);
-
-                       return generator.GenerateCode(null, options);
+                       return CreateClassProxy(classToProxy, Type.EmptyTypes, 
options);
                }
 
                public Type CreateClassProxy(Type classToProxy, Type[] 
additionalInterfacesToProxy, ProxyGenerationOptions options)
@@ -64,8 +59,7 @@
                        AssertValidType(classToProxy);
                        AssertValidTypes(additionalInterfacesToProxy);
 
-                       ClassProxyGenerator generator = new 
ClassProxyGenerator(scope, classToProxy);
-
+                       var generator = new ClassProxyGenerator(scope, 
classToProxy);
                        return 
generator.GenerateCode(additionalInterfacesToProxy, options);
                }
 
@@ -74,10 +68,8 @@
                        AssertValidType(interfaceToProxy);
                        AssertValidTypes(additionalInterfacesToProxy);
 
-                       InterfaceProxyWithoutTargetGenerator 
generatorWithoutTarget =
-                               new InterfaceProxyWithoutTargetGenerator(scope, 
interfaceToProxy);
-
-                       return 
generatorWithoutTarget.GenerateCode(typeof(object), 
additionalInterfacesToProxy, options);
+                       var generator = new 
InterfaceProxyWithoutTargetGenerator(scope, interfaceToProxy);
+                       return generator.GenerateCode(typeof(object), 
additionalInterfacesToProxy, options);
                }
 
                public Type CreateInterfaceProxyTypeWithTarget(Type 
interfaceToProxy, Type[] additionalInterfacesToProxy, Type targetType,
@@ -86,8 +78,7 @@
                        AssertValidType(interfaceToProxy);
                        AssertValidTypes(additionalInterfacesToProxy);
 
-                       InterfaceProxyWithTargetGenerator generator = new 
InterfaceProxyWithTargetGenerator(scope, interfaceToProxy);
-
+                       var generator = new 
InterfaceProxyWithTargetGenerator(scope, interfaceToProxy);
                        return generator.GenerateCode(targetType, 
additionalInterfacesToProxy, options);
                }
 
@@ -97,9 +88,7 @@
                        AssertValidType(interfaceToProxy);
                        AssertValidTypes(additionalInterfacesToProxy);
 
-                       InterfaceProxyWithTargetInterfaceGenerator generator =
-                               new 
InterfaceProxyWithTargetInterfaceGenerator(scope, interfaceToProxy);
-
+                       var generator = new 
InterfaceProxyWithTargetInterfaceGenerator(scope, interfaceToProxy);
                        return generator.GenerateCode(interfaceToProxy, 
additionalInterfacesToProxy, options);
                }

File [modified]: DefaultProxyBuilder.cs
Delta lines: +1 -0
===================================================================

--- DynamicProxy/trunk/src/Castle.DynamicProxy/IProxyBuilder.cs 2009-10-28 
17:53:05 UTC (rev 6284)
+++ DynamicProxy/trunk/src/Castle.DynamicProxy/IProxyBuilder.cs 2009-10-29 
09:09:51 UTC (rev 6285)
@@ -41,6 +41,7 @@
                /// Note that to avoid this exception, you can mark offending 
type internal, and define <see cref="InternalsVisibleToAttribute"/> 
                /// pointing to Castle Dynamic Proxy assembly, in assembly 
containing that type, if this is appropriate.</exception>
                /// <seealso cref="ClassProxyGenerator"/>
+               [Obsolete("Use thie other overload.")]
                Type CreateClassProxy(Type classToProxy, ProxyGenerationOptions 
options);
 

File [modified]: IProxyBuilder.cs
Delta lines: +1 -2
===================================================================

--- DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/ModuleScopeTestCase.cs     
2009-10-28 17:53:05 UTC (rev 6284)
+++ DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/ModuleScopeTestCase.cs     
2009-10-29 09:09:51 UTC (rev 6285)
@@ -386,8 +386,7 @@
                [Test]
                public void LoadAssemblyIntoCache_CreateClassProxy()
                {
-                       CheckLoadAssemblyIntoCache(
-                               delegate(IProxyBuilder builder) { return 
builder.CreateClassProxy(typeof (object), ProxyGenerationOptions.Default); });
+                       CheckLoadAssemblyIntoCache(builder => 
builder.CreateClassProxy(typeof (object), null, 
ProxyGenerationOptions.Default));
                }
 

Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy.Tests/
=============================================================

File [modified]: ModuleScopeTestCase.cs
Delta lines: +0 -0
===================================================================


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to