/// <summary>
        /// Determines whether this data generation hint is equal to other data generation hint.
        /// </summary>
        /// <param name="other">The other data generation hint.</param>
        /// <returns>True if this <see cref="DataGenerationHint"/> is equal to the <paramref name="other"/>, false otherwise.</returns>
        public override bool Equals(DataGenerationHint other)
        {
            if (other == null)
            {
                return false;
            }

            return this.GetType() == other.GetType();
        }
        /// <summary>
        /// Adds a data generation hint.
        /// </summary>
        /// <param name="hint">The data generation hint to add.</param>
        public void Add(DataGenerationHint hint)
        {
            ExceptionUtilities.CheckArgumentNotNull(hint, "hint");

            if (!this.hints.Any(h => h.Equals(hint)))
            {
                this.hints.Add(hint);
            }
        }
        /// <summary>
        /// Adds a data generation hint.
        /// </summary>
        /// <param name="hint">The data generation hint to add.</param>
        public void Add(DataGenerationHint hint)
        {
            ExceptionUtilities.CheckArgumentNotNull(hint, "hint");

            if (!this.hints.Any(h => h.Equals(hint)))
            {
                this.hints.Add(hint);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Determines whether this data generation hint is equal to other data generation hint.
        /// </summary>
        /// <param name="other">The other data generation hint.</param>
        /// <returns>True if this <see cref="DataGenerationHint"/> is equal to the <paramref name="other"/>, false otherwise.</returns>
        public override bool Equals(DataGenerationHint other)
        {
            if (other == null)
            {
                return(false);
            }

            return(this.GetType() == other.GetType());
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Determines whether this data generation hint is equal to other data generation hint.
        /// </summary>
        /// <param name="other">The other data generation hint.</param>
        /// <returns>True if this <see cref="DataGenerationHint"/> is equal to the <paramref name="other"/>, false otherwise.</returns>
        public override bool Equals(DataGenerationHint other)
        {
            if (other == null || other.GetType() != this.GetType())
            {
                return(false);
            }

            DataGenerationHint <TValue> otherHintWithValue = (DataGenerationHint <TValue>)other;

            return(ValueComparer.Instance.Equals(this.Value, otherHintWithValue.Value));
        }