コード例 #1
0
 /// <summary>
 /// Dispose the specified disposing.
 /// </summary>
 /// <returns>The dispose.</returns>
 /// <param name="disposing">If set to <c>true</c> disposing.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _dialog?.Dispose();
         _dialog = null;
         _listView?.Dispose();
         _listView = null;
         _adapter?.Dispose();
         _adapter = null;
         _context = null;
         if (_notifyCollection != null)
         {
             _notifyCollection.CollectionChanged -= ItemsSourceCollectionChanged;
             _notifyCollection = null;
         }
         if (_selectedCollection != null)
         {
             _selectedCollection.CollectionChanged -= SelectedItems_CollectionChanged;
             _selectedCollection = null;
         }
         _indicatorView?.RemoveFromParent();
         _indicatorView?.SetImageDrawable(null);
         _indicatorView?.SetImageBitmap(null);
         _indicatorView?.Dispose();
         _indicatorView = null;
     }
     base.Dispose(disposing);
 }
コード例 #2
0
 /// <summary>
 /// Dispose the specified disposing.
 /// </summary>
 /// <returns>The dispose.</returns>
 /// <param name="disposing">If set to <c>true</c> disposing.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         // Dialog.Dispose() does not close an open dialog view so explicitly dismiss it before disposing
         _dialog?.Dismiss();
         _dialog?.Dispose();
         _dialog = null;
         _listView?.Dispose();
         _listView = null;
         _adapter?.Dispose();
         _adapter = null;
         _context = null;
         if (_notifyCollection != null)
         {
             _notifyCollection.CollectionChanged -= ItemsSourceCollectionChanged;
             _notifyCollection = null;
         }
         if (_selectedCollection != null)
         {
             _selectedCollection.CollectionChanged -= SelectedItems_CollectionChanged;
             _selectedCollection = null;
         }
         _indicatorView?.RemoveFromParent();
         _indicatorView?.SetImageDrawable(null);
         _indicatorView?.SetImageBitmap(null);
         _indicatorView?.Dispose();
         _indicatorView = null;
     }
     base.Dispose(disposing);
 }
コード例 #3
0
 /// <summary>
 /// Ons the dismiss.
 /// </summary>
 /// <param name="dialog">Dialog.</param>
 public void OnDismiss(IDialogInterface dialog)
 {
     _dialog.SetOnShowListener(null);
     _dialog.SetOnDismissListener(null);
     _dialog.Dispose();
     _dialog = null;
     _adapter?.Dispose();
     _adapter = null;
     _listView.Dispose();
     _listView     = null;
     this.Selected = false;
 }