public override int GetHashCode() { unchecked { var hashCode = TopicName?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ NumberOfPartitions; hashCode = (hashCode * 397) ^ ReplicationFactor.GetHashCode(); hashCode = (hashCode * 397) ^ (ReplicaAssignments?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Configs?.GetHashCode() ?? 0); return(hashCode); } }
public bool Equals(Topic other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(String.Equals(TopicName, other.TopicName) && NumberOfPartitions == other.NumberOfPartitions && ReplicationFactor == other.ReplicationFactor && ReplicaAssignments.HasEqualElementsInOrder(other.ReplicaAssignments) && Configs.HasEqualElementsInOrder(other.Configs)); }