public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } Attack other = (Attack)obj; /* * return new EqualsBuilder(). * append(user, other.getUser()). * append(detectionPoint, other.getDetectionPoint()). * append(timestamp, other.getTimestamp()). * append(detectionSystemId, other.getDetectionSystemId()). * append(resource, other.getResource()). * isEquals(); */ if (user.Equals(other.GetUser()) && detectionPoint.Equals(other.GetDetectionPoint()) && timestamp.Equals(other.GetTimestamp()) && detectionSystemId.Equals(other.GetDetectionSystemId()) && resource.Equals(other.getResource())) { return(true); } else { return(false); } }
public bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } Response other = (Response)obj; /*return new EqualsBuilder(). * Append(user, other.GetUser()). * Append(timestamp, other.GetTimestamp()). * Append(action, other.getAction()). * Append(interval, other.getInterval()). * Append(detectionSystemId, other.GetDetectionSystemId()). * isEquals();*/ if (user.Equals(other.GetUser()) && timestamp.Equals(other.GetTimestamp()) && action.Equals(other.getAction()) && interval.Equals(other.getInterval()) && detectionSystemId.Equals(other.GetDetectionSystemId())) { return(true); } else { return(false); } }