// The following methods support the delta reports public bool Equals([AllowNull] UserRoleAllDTO other) { // Check whether the compared object is null. if (other is null) { return(false); } // Check whether the compared object references the same data. if (ReferenceEquals(this, other)) { return(true); } // Check whether the objects’ properties are equal. return(UserId.Equals(other.UserId) && UserFullName.Equals(other.UserFullName) && RoleId.Equals(other.RoleId) && RoleName.Equals(other.RoleName) && RoleDescription.Equals(other.RoleDescription) && RoleOwner_RoleId.Equals(other.RoleOwner_RoleId) && LastCertifiedBy.Equals(other.LastCertifiedBy) && LastCertifiedDate.Equals(other.LastCertifiedDate)); }
// The following methods support the delta reports // Handle equals for everything but the managers / service owners isCertified and the // risk rating. The isCertified stuff gets reset everytime a new cycle happens and // risk rating is calculated from threat and likelihood ratings so we can ignore those public bool Equals([AllowNull] RoleServicePrivAllDTO other) { // Check whether the compared object is null. if (other is null) { return(false); } // Check whether the compared object references the same data. if (ReferenceEquals(this, other)) { return(true); } // Check whether the objects’ properties are equal. // Role stuff return(RolePrivId.Equals(other.RolePrivId) && RoleId.Equals(other.RoleId) && RoleName.Equals(other.RoleName) && RoleDescription.Equals(other.RoleDescription) && RoleOwner_RoleId.Equals(other.RoleOwner_RoleId) && // Manager stuff RoleOwner_PrivId.Equals(other.RoleOwner_PrivId) && RoleOwner_PermissionGroup.Equals(other.RoleOwner_PermissionGroup) && RoleOwner_ServicePrivSummary.Equals(other.RoleOwner_ServicePrivSummary) && RoleOwner_CredentialStorageMethod.Equals(other.RoleOwner_CredentialStorageMethod) && RoleOwner_ServiceId.Equals(other.RoleOwner_ServiceId) && RoleOwner_ServiceName.Equals(other.RoleOwner_ServiceName) && RoleOwner_ServiceDescription.Equals(other.RoleOwner_ServiceDescription) && RoleOwner_RoleAccessJustification.Equals(other.RoleOwner_RoleAccessJustification) && RoleOwner_RemovalImpact.Equals(other.RoleOwner_RemovalImpact) && RoleOwner_IsRevoked.Equals(other.RoleOwner_IsRevoked) && RoleOwner_DateCertified.Equals(other.RoleOwner_DateCertified));/* && * * // Service Owner Stuff * ServiceOwner_PrivId.Equals(other.ServiceOwner_PrivId) && * ServiceOwner_PermissionGroup.Equals(other.ServiceOwner_PermissionGroup) && * ServiceOwner_ServicePrivSummary.Equals(other.ServiceOwner_ServicePrivSummary) && * ServiceOwner_CredentialStorageMethod.Equals(other.ServiceOwner_CredentialStorageMethod) && * ServiceOwner_ServiceId.Equals(other.ServiceOwner_ServiceId) && * ServiceOwner_ServiceName.Equals(other.ServiceOwner_ServiceName) && * ServiceOwner_ServiceDescription.Equals(other.ServiceOwner_ServiceDescription) && * * ServiceOwner_RoleAccessJustification.Equals(other.ServiceOwner_RoleAccessJustification) && * ServiceOwner_RemovalImpact.Equals(other.ServiceOwner_RemovalImpact) && * ServiceOwner_IsRevoked.Equals(other.ServiceOwner_IsRevoked) && * ServiceOwner_DateCertified.Equals(other.ServiceOwner_DateCertified) && * * // Risk stuff * RiskImpact.Equals(other.RiskImpact) && * RiskLikelihood.Equals(other.RiskLikelihood) && * RiskNotes.Equals(other.RiskNotes) && * RiskAssessmentDate.Equals(other.RiskAssessmentDate);*/ }