Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            int hashCode = -778295832;

            if (Uid != null)
            {
                hashCode += Uid.GetHashCode();
            }

            if (SourceTaxUid != null)
            {
                hashCode += SourceTaxUid.GetHashCode();
            }

            if (CatalogObjectId != null)
            {
                hashCode += CatalogObjectId.GetHashCode();
            }

            if (Name != null)
            {
                hashCode += Name.GetHashCode();
            }

            if (Type != null)
            {
                hashCode += Type.GetHashCode();
            }

            if (Percentage != null)
            {
                hashCode += Percentage.GetHashCode();
            }

            if (AppliedMoney != null)
            {
                hashCode += AppliedMoney.GetHashCode();
            }

            if (Scope != null)
            {
                hashCode += Scope.GetHashCode();
            }

            return(hashCode);
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is OrderReturnTax other &&
                   ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) &&
                   ((SourceTaxUid == null && other.SourceTaxUid == null) || (SourceTaxUid?.Equals(other.SourceTaxUid) == true)) &&
                   ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) &&
                   ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) &&
                   ((Type == null && other.Type == null) || (Type?.Equals(other.Type) == true)) &&
                   ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) &&
                   ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) &&
                   ((Scope == null && other.Scope == null) || (Scope?.Equals(other.Scope) == true)));
        }