Ejemplo n.º 1
0
 public override bool IsEquivalentTo(ServiceErrorDto?other)
 {
     return(other != null &&
            Code == other.Code &&
            Message == other.Message &&
            ServiceDataUtility.AreEquivalentObjects(DetailsObject, other.DetailsObject) &&
            ServiceDataUtility.AreEquivalentDtos(InnerError, other.InnerError));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Check service results for equivalence.
        /// </summary>
        public bool IsEquivalentTo(ServiceResult other)
        {
            if (other == null)
            {
                return(false);
            }

            if (IsFailure)
            {
                return(other.IsFailure && ServiceDataUtility.AreEquivalentDtos(m_error, other.m_error));
            }

            Type valueType = InternalValueType;

            if (valueType == null)
            {
                return(other.InternalValueType == null);
            }

            return(IsInternalValueEquivalent(other));
        }