/// <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;
 }
示例#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();
         _dialog = null;
         _listView?.Dispose();
         _listView = null;
         _adapter?.Dispose();
         _adapter = null;
         _context = null;
     }
     base.Dispose(disposing);
 }
 /// <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;
         }
     }
     base.Dispose(disposing);
 }