public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } ErrorResult <TError> other = obj as ErrorResult <TError>; if (other != null) { return(Equals(other)); } if (obj.GetType() == typeof(TError)) { return(Equals((TError)obj)); } return(false); }
public bool Equals(ErrorResult <TError> other) { if (!ErrorCode.Equals(other.ErrorCode)) { return(false); } if (ErrorMessage != other.ErrorMessage) { return(false); } if (_validationErrors != null && other._validationErrors == null) { return(false); } if (_validationErrors == null && other._validationErrors != null) { return(false); } if (_validationErrors != null && other._validationErrors != null && _validationErrors.Equals(other._validationErrors)) { return(false); } return(true); }
public void Deconstruct(out TResult result, out ErrorResult <TError> error) => (result, error) = (this.SuccessResult, this.ErrorResult);
public ErrorResultException(ErrorResult <TError> errorResult) { }