@@ -27,21 +27,11 @@ public BookmarkDataProvider (SortedList<int, Entities.Bookmark> bookmarkList)
2727
2828 #endregion
2929
30- #region Delegates
31-
32- public delegate void AllBookmarksRemovedEventHandler ( object sender , EventArgs e ) ;
33-
34- public delegate void BookmarkAddedEventHandler ( object sender , EventArgs e ) ;
35-
36- public delegate void BookmarkRemovedEventHandler ( object sender , EventArgs e ) ;
37-
38- #endregion
39-
4030 #region Events
4131
42- public event BookmarkAddedEventHandler BookmarkAdded ;
43- public event BookmarkRemovedEventHandler BookmarkRemoved ;
44- public event AllBookmarksRemovedEventHandler AllBookmarksRemoved ;
32+ public event EventHandler < EventArgs > BookmarkAdded ;
33+ public event EventHandler < EventArgs > BookmarkRemoved ;
34+ public event EventHandler < EventArgs > AllBookmarksRemoved ;
4535
4636 #endregion
4737
@@ -141,8 +131,10 @@ public void RemoveBookmarkForLine (int lineNum)
141131 OnBookmarkRemoved ( ) ;
142132 }
143133
144- public void RemoveBookmarksForLines ( List < int > lineNumList )
134+ public void RemoveBookmarksForLines ( IEnumerable < int > lineNumList )
145135 {
136+ ArgumentNullException . ThrowIfNull ( lineNumList ) ;
137+
146138 foreach ( var lineNum in lineNumList )
147139 {
148140 _ = BookmarkList . Remove ( lineNum ) ;
@@ -155,6 +147,8 @@ public void RemoveBookmarksForLines (List<int> lineNumList)
155147
156148 public void AddBookmark ( Entities . Bookmark bookmark )
157149 {
150+ ArgumentNullException . ThrowIfNull ( bookmark ) ;
151+
158152 BookmarkList . Add ( bookmark . LineNum , bookmark ) ;
159153 OnBookmarkAdded ( ) ;
160154 }
0 commit comments