public bool Equals(CodeFlow x, CodeFlow y) { if (!object.ReferenceEquals(x, y)) { if (!ListComparisonHelpers.CompareListsOrdered(x.ThreadFlows, y.ThreadFlows, ThreadFlowBaselineEqualityComparator.Instance)) { return(false); } } return(true); }
public bool Equals(ThreadFlow x, ThreadFlow y) { if (!object.ReferenceEquals(x, y)) { if (!ListComparisonHelpers.CompareListsOrdered(x.Locations, y.Locations, ThreadFlowLocationBaselineEquals.DefaultInstance)) { return false; } } return true; }
public bool Equals(CodeFlow x, CodeFlow y) { if (!object.ReferenceEquals(x, y)) { if (!ListComparisonHelpers.CompareListsOrdered(x.Locations, y.Locations, AnnotatedCodeLocationBaselineEquals.DefaultInstance)) { return(false); } } return(true); }
public bool Equals(Result x, Result y) { if (!object.ReferenceEquals(x, y)) { // Rule ID should match if (x.RuleId != y.RuleId) { return(false); } // Target file should match. if (!ArtifactLocationBaselineEquals.Instance.Equals(x.AnalysisTarget, y.AnalysisTarget)) { return(false); } // Locations should all be the same. if (!ListComparisonHelpers.CompareListsAsSets(x.Locations, y.Locations, LocationBaselineEquals.Instance)) { return(false); } // Related Locations should all be the same. if (!ListComparisonHelpers.CompareListsAsSets(x.RelatedLocations, y.RelatedLocations, LocationBaselineEquals.Instance)) { return(false); } // Fingerprints (values only, ignore keys) should be the same. if (!ListComparisonHelpers.CompareListsAsSets(x.Fingerprints?.Values?.ToList(), y.Fingerprints?.Values?.ToList(), StringComparer.Ordinal)) { return(false); } // Partial fingerprints (values only, ignore keys) should be the same. if (!ListComparisonHelpers.CompareListsAsSets(x.PartialFingerprints?.Values?.ToList(), y.PartialFingerprints?.Values?.ToList(), StringComparer.Ordinal)) { return(false); } // If stacks are present, we'll make sure they're the same if (!ListComparisonHelpers.CompareListsAsSets(x.Stacks, y.Stacks, StackBaselineEquals.Instance)) { return(false); } // If codeflows are present, we'll make sure they're the same. if (!ListComparisonHelpers.CompareListsAsSets(x.CodeFlows, y.CodeFlows, CodeFlowBaselineEqualityComparator.Instance)) { return(false); } } return(true); }
public bool Equals(Stack x, Stack y) { if (!object.ReferenceEquals(x, y)) { if (!ListComparisonHelpers.CompareListsOrdered(x.Frames, y.Frames)) { return(false); } } return(true); }
public int GetHashCode(Stack obj) { if (ReferenceEquals(obj, null)) { return(0); } else { int hs = 0; return(hs ^ ListComparisonHelpers.GetHashOfListContentsOrdered(obj.Frames, StackFrameBaselineEquals.Instance)); } }
public int GetHashCode(ThreadFlow obj) { if (ReferenceEquals(obj, null)) { return(0); } else { int hs = 0; return(hs ^ ListComparisonHelpers.GetHashOfListContentsOrdered(obj.Locations)); } }
public bool Equals(Annotation x, Annotation y) { if (!object.ReferenceEquals(x, y)) { if (!ListComparisonHelpers.CompareListsAsSets(x.Locations, y.Locations, PhysicalLocationBaselineEquals.Instance)) { return(false); } if (x.Message != y.Message) { return(false); } } return(true); }
public int GetHashCode(Annotation obj) { if (ReferenceEquals(obj, null)) { return(0); } else { int hs = 0; hs = hs ^ obj.Message.GetNullCheckedHashCode(); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsAsSets(obj.Locations, PhysicalLocationBaselineEquals.Instance); return(hs); } }
public int GetHashCode(StackFrame obj) { if (ReferenceEquals(obj, null) || obj.Location?.PhysicalLocation?.ArtifactLocation?.Uri == null || obj.Module == null) { return(0); } else { int hs = 0; hs = hs ^ obj.Location.PhysicalLocation.ArtifactLocation.Uri.GetNullCheckedHashCode(); hs = hs ^ obj.Module.GetNullCheckedHashCode(); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsOrdered(obj.Parameters); return(hs); } }
public bool Equals(Result x, Result y) { if (!object.ReferenceEquals(x, y)) { // Rule ID/Key should match if (x.RuleId != y.RuleId || x.RuleKey != y.RuleKey) { return(false); } // Locations should all be the same. if (!ListComparisonHelpers.CompareListsAsSets(x.Locations, y.Locations, LocationBaselineEquals.Instance)) { return(false); } // Related Locations should all be the same. if (!ListComparisonHelpers.CompareListsAsSets(x.RelatedLocations, y.RelatedLocations, AnnotatedCodeLocationBaselineEquals.DefaultInstance)) { return(false); } // Finger print contributions should be the same. if (x.ToolFingerprintContribution != y.ToolFingerprintContribution) { return(false); } // If stacks are present, we'll make sure they're the same if (!ListComparisonHelpers.CompareListsAsSets(x.Stacks, y.Stacks, StackBaselineEquals.Instance)) { return(false); } // If codeflows are present, we'll make sure they're the same. if (!ListComparisonHelpers.CompareListsAsSets(x.CodeFlows, y.CodeFlows, CodeFlowBaselineEqualityComparator.Instance)) { return(false); } } return(true); }
public bool Equals(AnnotatedCodeLocation x, AnnotatedCodeLocation y) { if (!object.ReferenceEquals(x, y)) { if (x.FullyQualifiedLogicalName != y.FullyQualifiedLogicalName || x.LogicalLocationKey != y.LogicalLocationKey) { return(false); } if (x.Importance != y.Importance) { return(false); } if (x.Module != y.Module) { return(false); } if (x.Kind != y.Kind) { return(false); } if (x.Target != y.Target || x.TargetKey != y.TargetKey) { return(false); } if (!PhysicalLocationBaselineEquals.Instance.Equals(x.PhysicalLocation, y.PhysicalLocation)) { return(false); } if (!ListComparisonHelpers.CompareListsAsSets(x.Annotations, y.Annotations, AnnotationBaselineEquals.Instance)) { return(false); } } return(true); }
public int GetHashCode(AnnotatedCodeLocation obj) { if (ReferenceEquals(obj, null)) { return(0); } else { int hs = 0; hs = hs ^ obj.FullyQualifiedLogicalName.GetNullCheckedHashCode() ^ obj.Importance.GetNullCheckedHashCode() ^ obj.Kind.GetNullCheckedHashCode() ^ obj.Module.GetNullCheckedHashCode(); hs = hs ^ obj.Target.GetNullCheckedHashCode() ^ obj.TargetKey.GetNullCheckedHashCode() ^ obj.LogicalLocationKey.GetNullCheckedHashCode(); hs = hs ^ PhysicalLocationBaselineEquals.Instance.GetHashCode(obj.PhysicalLocation); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsAsSets(obj.Annotations, AnnotationBaselineEquals.Instance); return(hs); } }
public bool Equals(StackFrame x, StackFrame y) { if (!object.ReferenceEquals(x, y)) { if (x.Location?.PhysicalLocation?.ArtifactLocation?.Uri != y.Location?.PhysicalLocation?.ArtifactLocation?.Uri) { return(false); } if (x.Module != y.Module) { return(false); } if (!ListComparisonHelpers.CompareListsOrdered(x.Parameters, y.Parameters)) { return(false); } } return(true); }
public int GetHashCode(StackFrame obj) { if (ReferenceEquals(obj, null)) { return(0); } else { int hs = 0; hs = hs ^ obj.Uri.GetNullCheckedHashCode(); hs = hs ^ obj.FullyQualifiedLogicalName.GetNullCheckedHashCode(); hs = hs ^ obj.Module.GetNullCheckedHashCode(); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsOrdered(obj.Parameters); return(hs); } }
public int GetHashCode(Result obj) { if (ReferenceEquals(obj, null)) { return(0); } else { int hs = 0; hs = hs ^ obj.RuleId.GetNullCheckedHashCode() ^ obj.PartialFingerprints.GetNullCheckedHashCode(); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsAsSets(obj.Locations, LocationBaselineEquals.Instance); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsAsSets(obj.RelatedLocations, LocationBaselineEquals.Instance); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsAsSets(obj.Stacks, StackBaselineEquals.Instance); hs = hs ^ ListComparisonHelpers.GetHashOfListContentsAsSets(obj.CodeFlows, CodeFlowBaselineEqualityComparator.Instance); return(hs); } }
public bool Equals(StackFrame x, StackFrame y) { if (!object.ReferenceEquals(x, y)) { if (x.Uri != y.Uri) { return(false); } if (x.FullyQualifiedLogicalName != y.FullyQualifiedLogicalName) { return(false); } if (x.Module != y.Module) { return(false); } if (!ListComparisonHelpers.CompareListsOrdered(x.Parameters, y.Parameters)) { return(false); } } return(true); }