/// <inheritdoc />
        public bool Equals(InputCell <TValue> other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (ReferenceEquals(other, null))
            {
                return(false);
            }

            var result = this.Id.IsEqualTo(other.Id, StringComparer.Ordinal) &&
                         this.ColumnsSpanned.IsEqualTo(other.ColumnsSpanned) &&
                         this.Details.IsEqualTo(other.Details, StringComparer.Ordinal) &&
                         this.Validation.IsEqualTo(other.Validation) &&
                         this.ValidationEvents.IsEqualTo(other.ValidationEvents) &&
                         this.DefaultAvailability.IsEqualTo(other.DefaultAvailability) &&
                         this.AvailabilityCheckEvents.IsEqualTo(other.AvailabilityCheckEvents) &&
                         this.AvailabilityCheck.IsEqualTo(other.AvailabilityCheck) &&
                         this.InputEvents.IsEqualTo(other.InputEvents) &&
                         this.ValueFormat.IsEqualTo(other.ValueFormat) &&
                         this.Format.IsEqualTo(other.Format) &&
                         this.HoverOver.IsEqualTo(other.HoverOver);

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Builds a disabled <see cref="IConstOutputCell{TValue}"/>.
        /// </summary>
        /// <typeparam name="TValue">The type of value.</typeparam>
        /// <param name="id">OPTIONAL unique identifier of the cell.  DEFAULT is a cell with no unique identifier.</param>
        /// <param name="columnsSpanned">OPTIONAL number of columns spanned or null if none (cell occupies a single column).  DEFAULT is none.</param>
        /// <param name="details">OPTIONAL details about the cell.  DEFAULT is to omit any details.</param>
        /// <param name="validation">OPTIONAL validation to perform.  DEFAULT is no validation.</param>
        /// <param name="availabilityCheck">OPTIONAL availability check to perform.  DEFAULT is a cell with no availability check.</param>
        /// <param name="valueFormat">OPTIONAL format to apply to the cell value.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="format">OPTIONAL format to apply to the cell.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="hoverOver">OPTIONAL hover-over for the cell.  DEFAULT is no hover-over.</param>
        /// <returns>
        /// The cell.
        /// </returns>
        public static InputCell <TValue> CreateDisabledInput <TValue>(
            string id             = null,
            int?columnsSpanned    = null,
            string details        = null,
            Validation validation = null,
            AvailabilityCheck availabilityCheck   = null,
            ICellValueFormat <TValue> valueFormat = null,
            CellFormat format    = null,
            IHoverOver hoverOver = null)
        {
            var result = new InputCell <TValue>(id, columnsSpanned, details, validation, null, Availability.Disabled, availabilityCheck, null, null, valueFormat, format, hoverOver);

            return(result);
        }
        protected override CellBase DeepCloneInternal()
        {
            var result = new InputCell <TValue>(
                this.Id?.DeepClone(),
                this.ColumnsSpanned?.DeepClone(),
                this.Details?.DeepClone(),
                this.Validation?.DeepClone(),
                this.ValidationEvents?.DeepClone(),
                this.DefaultAvailability.DeepClone(),
                this.AvailabilityCheck?.DeepClone(),
                this.AvailabilityCheckEvents?.DeepClone(),
                this.InputEvents?.DeepClone(),
                this.ValueFormat?.DeepClone(),
                this.Format?.DeepClone(),
                this.HoverOver?.DeepClone());

            return(result);
        }
        public InputCell <TValue> DeepCloneWithHoverOver(IHoverOver hoverOver)
        {
            var result = new InputCell <TValue>(
                this.Id?.DeepClone(),
                this.ColumnsSpanned?.DeepClone(),
                this.Details?.DeepClone(),
                this.Validation?.DeepClone(),
                this.ValidationEvents?.DeepClone(),
                this.DefaultAvailability.DeepClone(),
                this.AvailabilityCheck?.DeepClone(),
                this.AvailabilityCheckEvents?.DeepClone(),
                this.InputEvents?.DeepClone(),
                this.ValueFormat?.DeepClone(),
                this.Format?.DeepClone(),
                hoverOver);

            return(result);
        }
        public override InputCellBase <TValue> DeepCloneWithInputEvents(IReadOnlyList <CellInputEventBase> inputEvents)
        {
            var result = new InputCell <TValue>(
                this.Id?.DeepClone(),
                this.ColumnsSpanned?.DeepClone(),
                this.Details?.DeepClone(),
                this.Validation?.DeepClone(),
                this.ValidationEvents?.DeepClone(),
                this.DefaultAvailability.DeepClone(),
                this.AvailabilityCheck?.DeepClone(),
                this.AvailabilityCheckEvents?.DeepClone(),
                inputEvents,
                this.ValueFormat?.DeepClone(),
                this.Format?.DeepClone(),
                this.HoverOver?.DeepClone());

            return(result);
        }
        public override NotSlottedCellBase DeepCloneWithAvailabilityCheck(AvailabilityCheck availabilityCheck)
        {
            var result = new InputCell <TValue>(
                this.Id?.DeepClone(),
                this.ColumnsSpanned?.DeepClone(),
                this.Details?.DeepClone(),
                this.Validation?.DeepClone(),
                this.ValidationEvents?.DeepClone(),
                this.DefaultAvailability.DeepClone(),
                availabilityCheck,
                this.AvailabilityCheckEvents?.DeepClone(),
                this.InputEvents?.DeepClone(),
                this.ValueFormat?.DeepClone(),
                this.Format?.DeepClone(),
                this.HoverOver?.DeepClone());

            return(result);
        }
        public override CellBase DeepCloneWithDetails(string details)
        {
            var result = new InputCell <TValue>(
                this.Id?.DeepClone(),
                this.ColumnsSpanned?.DeepClone(),
                details,
                this.Validation?.DeepClone(),
                this.ValidationEvents?.DeepClone(),
                this.DefaultAvailability.DeepClone(),
                this.AvailabilityCheck?.DeepClone(),
                this.AvailabilityCheckEvents?.DeepClone(),
                this.InputEvents?.DeepClone(),
                this.ValueFormat?.DeepClone(),
                this.Format?.DeepClone(),
                this.HoverOver?.DeepClone());

            return(result);
        }