Author: mhutch
Date: 2006-07-25 08:29:31 -0400 (Tue, 25 Jul 2006)
New Revision: 62953

Modified:
   
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/BindingService.cs
Log:
Ouch, horrible errors. Test code before committing!


Modified: 
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/BindingService.cs
===================================================================
--- 
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/BindingService.cs
  2006-07-25 12:21:45 UTC (rev 62952)
+++ 
trunk/monodevelop/Extras/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/BindingService.cs
  2006-07-25 12:29:31 UTC (rev 62953)
@@ -29,10 +29,10 @@
                                        if (throwIfExists || (memProp == null))
                                                throw new MemberExistsException 
(cls.Name, member, MemberType.Property);
                                        
-                                       if (memProp.Type.BaseType == 
prop.ReturnType.FullyQualifiedName)
+                                       if (memProp.Type.BaseType != 
prop.ReturnType.FullyQualifiedName)
                                                throw new 
InvalidOperationException ("Return type does not match");
                                        
-                                       break;
+                                       return;
                                }
                        }
                                
@@ -44,25 +44,25 @@
                                        if (throwIfExists || (memMeth == null))
                                                throw new MemberExistsException 
(cls.Name, member, MemberType.Method);
                                        
-                                       if (memMeth.ReturnType.BaseType == 
meth.ReturnType.FullyQualifiedName)
+                                       if (memMeth.ReturnType.BaseType != 
meth.ReturnType.FullyQualifiedName)
                                                throw new 
InvalidOperationException ("Return type does not match");
                                        
-                                       break;
+                                       return;
                                }
                        }
                        
                        //check for identical event names
-                       foreach (IEvent ev in cls.Methods) {
+                       foreach (IEvent ev in cls.Events) {
                                if (string.Compare (ev.Name, member.Name, 
ignoreCase) == 0) {
                                        CodeMemberEvent memEv = member as 
CodeMemberEvent;
                                        
                                        if (throwIfExists || (memEv == null))
                                                throw new MemberExistsException 
(cls.Name, member, MemberType.Event);
                                        
-                                       if (memEv.Type.BaseType == 
ev.ReturnType.FullyQualifiedName)
+                                       if (memEv.Type.BaseType != 
ev.ReturnType.FullyQualifiedName)
                                                throw new 
InvalidOperationException ("Return type does not match");
 
-                                       break;
+                                       return;
                                }
                        }
                                
@@ -74,10 +74,10 @@
                                        if (throwIfExists || (memField == null))
                                                throw new MemberExistsException 
(cls.Name, member, MemberType.Method);
                                        
-                                       if (memField.Type.BaseType == 
field.ReturnType.FullyQualifiedName)
+                                       if (memField.Type.BaseType != 
field.ReturnType.FullyQualifiedName)
                                                throw new 
InvalidOperationException ("Return type does not match");
                                        
-                                       break;
+                                       return;
                                }
                        }
                        

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to