Example #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                CellBase.PropertyChanged   -= CellPropertyChanged;
                CellParent.PropertyChanged -= ParentPropertyChanged;
                CellButton1.Click          -= CellButton1_Click;
                CellButton2.Click          -= CellButton2_Click;
                CellButton3.Click          -= CellButton3_Click;

                if (CellBase.Section != null)
                {
                    CellBase.Section.PropertyChanged -= SectionPropertyChanged;
                    CellBase.Section = null;
                }

                CellTitle?.Dispose();
                CellTitle = null;
                CellTitleContent?.Dispose();
                CellTitleContent = null;
                CellAccessory?.Dispose();
                CellAccessory = null;
                CellButton1?.Dispose();
                CellButton1 = null;
                CellButton2?.Dispose();
                CellButton2 = null;
                CellButton3?.Dispose();
                CellButton3 = null;
                CellButtonContent?.Dispose();
                CellButtonContent = null;
                CellContent?.Dispose();
                CellContent = null;
                Cell        = null;

                _iconTokenSource?.Dispose();
                _iconTokenSource = null;
                _Context         = null;

                _backgroundColor?.Dispose();
                _backgroundColor = null;
                _selectedColor?.Dispose();
                _selectedColor = null;
                _ripple?.Dispose();
                _ripple = null;

                Background?.Dispose();
                Background = null;
            }
            base.Dispose(disposing);
        }
Example #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)
            {
                CellBase.PropertyChanged   -= CellPropertyChanged;
                CellParent.PropertyChanged -= ParentPropertyChanged;

                if (CellBase.Section != null)
                {
                    CellBase.Section.PropertyChanged -= SectionPropertyChanged;
                    CellBase.Section = null;
                }

                HintLabel?.Dispose();
                HintLabel = null;
                TitleLabel?.Dispose();
                TitleLabel = null;
                DescriptionLabel?.Dispose();
                DescriptionLabel = null;
                IconView?.SetImageDrawable(null);
                IconView?.SetImageBitmap(null);
                IconView?.Dispose();
                IconView = null;
                ContentStack?.Dispose();
                ContentStack = null;
                AccessoryStack?.Dispose();
                AccessoryStack = null;
                Cell           = null;

                _iconTokenSource?.Dispose();
                _iconTokenSource = null;
                _Context         = null;

                _backgroundColor?.Dispose();
                _backgroundColor = null;
                _selectedColor?.Dispose();
                _selectedColor = null;
                _ripple?.Dispose();
                _ripple = null;

                Background?.Dispose();
                Background = null;
            }
            base.Dispose(disposing);
        }
Example #3
0
 public Result(ColorDrawable drawable, bool resolutionDependent)
     : base(drawable, resolutionDependent, () => drawable.Dispose())
 {
 }