Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/25/11 13:23:45 (13 years ago)
Author:
mkommend
Message:

ticket #1324: Added argument null checks in (Add|Insert|Remove|Update)ListViewItem and UpdateListViewItem(Image|Text) methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs

    r5302 r5371  
    175175    }
    176176    private void AddListViewItem(ListViewItem listViewItem) {
     177      if (listViewItem == null) throw new ArgumentNullException();
    177178      itemsListView.Items.Add(listViewItem);
    178179      IRun run = listViewItem.Tag as IRun;
     
    186187    }
    187188    private void RemoveListViewItem(ListViewItem listViewItem) {
     189      if (listViewItem == null) throw new ArgumentNullException();
    188190      IRun run = listViewItem.Tag as IRun;
    189191      if (run != null) {
     
    197199    }
    198200    private void UpdateListViewItemImage(ListViewItem listViewItem) {
     201      if (listViewItem == null) throw new ArgumentNullException();
    199202      IRun item = listViewItem.Tag as IRun;
    200203      int i = listViewItem.ImageIndex;
     
    204207    }
    205208    private void UpdateListViewItemText(ListViewItem listViewItem) {
     209      if (listViewItem == null) throw new ArgumentNullException();
    206210      IRun item = listViewItem.Tag as IRun;
    207211      listViewItem.Text = item == null ? "null" : item.ToString();
Note: See TracChangeset for help on using the changeset viewer.