[Mono-bugs] [Bug 575672] New: gui-compare doesn't detect incorrectly implemented interfaces

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 1 06:05:00 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=575672

http://bugzilla.novell.com/show_bug.cgi?id=575672#c0


           Summary: gui-compare doesn't detect incorrectly implemented
                    interfaces
    Classification: Mono
           Product: Mono: Tools
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: tools
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: amcgovern at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


I was just working on moonlight and noticed that the ObservableCollection <T>
class provided in the libraries was implemented incorrectly and gui-compare
didn't notice the mistake.

The INotifyPropertyChanged.PropertyChanged event should be explicitly
implemented and a protected version supplied. We had implemented it as a normal
public event. Applying this patch fixes the implementation, but either way
gui-compare says that there are no errors:

Index: ObservableCollection_T.cs
===================================================================
--- ObservableCollection_T.cs    (revision 150623)
+++ ObservableCollection_T.cs    (working copy)
@@ -85,6 +85,11 @@
         }

         public event NotifyCollectionChangedEventHandler CollectionChanged;
-        public event PropertyChangedEventHandler PropertyChanged;
+        protected event PropertyChangedEventHandler PropertyChanged;
+
+        event PropertyChangedEventHandler
INotifyPropertyChanged.PropertyChanged {
+            add { PropertyChanged += value; }
+            remove { PropertyChanged -= value; }
+        }
     }
 }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list