コード例 #1
0
        /// <summary>
        /// Compares the response to <paramref name="other"/> for base equivalence.
        /// Api rate information is disgarded when comparing.
        /// </summary>
        /// <param name="other">Other response to compare.</param>
        /// <returns>True if both responses are equivalent.</returns>
        public virtual bool IsEquivalentTo(PVOutputBaseResponse other)
        {
            if (other == null)
            {
                return(false);
            }

            return(IsSuccess == other.IsSuccess && ((Error == null && other.Error == null) || Error.IsEquivalentTo(other.Error)));
        }
コード例 #2
0
 /// <summary>
 /// Compares the response to <paramref name="other"/> for base equivalence.
 /// Api rate information is disgarded when comparing.
 /// <strong>Please note that the contents of Values are not compared.</strong>
 /// </summary>
 /// <param name="other">Other response to compare.</param>
 /// <returns>True if both responses are equivalent.</returns>
 public override bool IsEquivalentTo(PVOutputBaseResponse other)
 => base.IsEquivalentTo(other) && HasValues == ((PVOutputArrayResponse <TResponseContentType>)other).HasValues;
コード例 #3
0
 /// <summary>
 /// Compares the response to <paramref name="other"/> for base equivalence.
 /// Api rate information is disgarded when comparing.
 /// </summary>
 /// <param name="other">Other response to compare.</param>
 /// <returns>True if both responses are equivalent.</returns>
 public override bool IsEquivalentTo(PVOutputBaseResponse other)
 => base.IsEquivalentTo(other) && SuccesMessage.Equals(((PVOutputBasicResponse)other).SuccesMessage, StringComparison.OrdinalIgnoreCase);