コード例 #1
0
        public bool Equals(Result <TSuccess, TFailure> other)
        {
            if (isSuccess != other.isSuccess)
            {
                return(false);
            }

            if (isSuccess)
            {
                return(SuccessComparer.Equals(success, other.success));
            }

            return(FailureComparer.Equals(failure, other.failure));
        }
コード例 #2
0
 public override int GetHashCode()
 =>
 HashCode.Combine(EqualityContract, FailureComparer.GetHashCode(failure));
コード例 #3
0
 public bool Equals(FailureBuilder <TFailure> other)
 =>
 FailureComparer.Equals(failure, other.failure);