Exemple #1
0
        public NamedValue <TValue> DeepCloneWithValue(TValue value)
        {
            var result = new NamedValue <TValue>(
                this.Name?.DeepClone(),
                value);

            return(result);
        }
Exemple #2
0
        /// <inheritdoc />
        public bool Equals(NamedValue <TValue> other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

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

            var result = this.Name.IsEqualTo(other.Name, StringComparer.Ordinal) &&
                         this.Value.IsEqualTo(other.Value);

            return(result);
        }