User: xtoff
Date: 2009/10/30 06:10 AM
Modified:
/DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/
EventToGenerate.cs
/DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/Emitters/
EventEmitter.cs, PropertyEmitter.cs
Log:
- fixed duplicated generation of event methods.
File Changes:
Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/Emitters/
===========================================================================
File [modified]: EventEmitter.cs
Delta lines: +4 -47
===================================================================
---
DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/Emitters/PropertyEmitter.cs
2009-10-30 10:42:36 UTC (rev 6295)
+++
DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/Emitters/PropertyEmitter.cs
2009-10-30 13:10:49 UTC (rev 6296)
@@ -21,8 +21,8 @@
public class PropertyEmitter : IMemberEmitter
{
- private PropertyBuilder builder;
- private AbstractTypeEmitter parentTypeEmitter;
+ private readonly PropertyBuilder builder;
+ private readonly AbstractTypeEmitter parentTypeEmitter;
private MethodEmitter getMethod;
private MethodEmitter setMethod;
@@ -69,35 +69,11 @@
}
}
- public MethodEmitter GetMethod
- {
- get { return getMethod; }
- set { getMethod = value; }
- }
-
- public MethodEmitter SetMethod
- {
- get { return setMethod; }
- set { setMethod = value; }
- }
-
- public MethodEmitter CreateGetMethod()
- {
- return CreateGetMethod(MethodAttributes.Public |
- MethodAttributes.Virtual |
- MethodAttributes.SpecialName);
- }
-
- public MethodEmitter CreateGetMethod(MethodAttributes attrs,
params Type[] parameters)
- {
- return CreateGetMethod("get_" + builder.Name, attrs,
parameters);
- }
-
public MethodEmitter CreateGetMethod(string name,
MethodAttributes attrs, params Type[] parameters)
{
if (getMethod != null)
{
- throw new InvalidOperationException("A
getMethod exists");
+ throw new InvalidOperationException("A get
method exists");
}
if (parameters.Length == 0)
@@ -115,30 +91,11 @@
return getMethod;
}
- public MethodEmitter CreateSetMethod()
- {
- return CreateSetMethod(MethodAttributes.Public |
- MethodAttributes.Virtual |
- MethodAttributes.SpecialName);
- }
-
- public MethodEmitter CreateSetMethod(Type arg)
- {
- return CreateSetMethod(MethodAttributes.Public |
- MethodAttributes.Virtual |
- MethodAttributes.SpecialName,
arg);
- }
-
- public MethodEmitter CreateSetMethod(MethodAttributes attrs,
params Type[] parameters)
- {
- return CreateSetMethod("set_" + builder.Name, attrs,
parameters);
- }
-
public MethodEmitter CreateSetMethod(string name,
MethodAttributes attrs, params Type[] parameters)
{
if (setMethod != null)
{
- throw new InvalidOperationException("A
setMethod exists");
+ throw new InvalidOperationException("A set
method exists");
}
File [modified]: PropertyEmitter.cs
Delta lines: +0 -11
===================================================================
--- DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/EventToGenerate.cs
2009-10-30 10:42:36 UTC (rev 6295)
+++ DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/EventToGenerate.cs
2009-10-30 13:10:49 UTC (rev 6296)
@@ -116,17 +116,6 @@
}
}
- public MethodInfo AddMethod
- {
- get { return adder.Method; }
-
- }
-
- public MethodInfo RemoveMethod
- {
- get { return remover.Method; }
-
- }
public MethodToGenerate Adder
{
Directory: /DynamicProxy/trunk/src/Castle.DynamicProxy/Generators/
==================================================================
File [modified]: EventToGenerate.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
-~----------~----~----~----~------~----~------~--~---