public override int GetHashCode() { int hash = 1; if (Sucesso != false) { hash ^= Sucesso.GetHashCode(); } if (Mensagem.Length != 0) { hash ^= Mensagem.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override bool Equals(object obj) { try { if (!(obj is Resultado <TSucesso, TFalha>)) { return(false); } var other = (Resultado <TSucesso, TFalha>)obj; return(EhSucesso ? Sucesso.Equals(other.Sucesso) : Falha.Equals(other.Falha)); } catch (Exception) { return(false); } }
public override int GetHashCode() => EhSucesso ? Sucesso.GetHashCode() : Falha.GetHashCode();