public int GetHashCode()

in src/Sarif/Autogenerated/ResultEqualityComparer.cs [411:659]


        public int GetHashCode(Result obj)
        {
            if (ReferenceEquals(obj, null))
            {
                return 0;
            }

            int result = 17;
            unchecked
            {
                if (obj.RuleId != null)
                {
                    result = (result * 31) + obj.RuleId.GetHashCode();
                }

                result = (result * 31) + obj.RuleIndex.GetHashCode();
                if (obj.Rule != null)
                {
                    result = (result * 31) + obj.Rule.ValueGetHashCode();
                }

                result = (result * 31) + obj.Kind.GetHashCode();
                result = (result * 31) + obj.Level.GetHashCode();
                if (obj.Message != null)
                {
                    result = (result * 31) + obj.Message.ValueGetHashCode();
                }

                if (obj.AnalysisTarget != null)
                {
                    result = (result * 31) + obj.AnalysisTarget.ValueGetHashCode();
                }

                if (obj.Locations != null)
                {
                    foreach (var value_6 in obj.Locations)
                    {
                        result = result * 31;
                        if (value_6 != null)
                        {
                            result = (result * 31) + value_6.ValueGetHashCode();
                        }
                    }
                }

                if (obj.Guid != null)
                {
                    result = (result * 31) + obj.Guid.GetHashCode();
                }

                if (obj.CorrelationGuid != null)
                {
                    result = (result * 31) + obj.CorrelationGuid.GetHashCode();
                }

                result = (result * 31) + obj.OccurrenceCount.GetHashCode();
                if (obj.PartialFingerprints != null)
                {
                    // Use xor for dictionaries to be order-independent.
                    int xor_0 = 0;
                    foreach (var value_7 in obj.PartialFingerprints)
                    {
                        xor_0 ^= value_7.Key.GetHashCode();
                        if (value_7.Value != null)
                        {
                            xor_0 ^= value_7.Value.GetHashCode();
                        }
                    }

                    result = (result * 31) + xor_0;
                }

                if (obj.Fingerprints != null)
                {
                    // Use xor for dictionaries to be order-independent.
                    int xor_1 = 0;
                    foreach (var value_8 in obj.Fingerprints)
                    {
                        xor_1 ^= value_8.Key.GetHashCode();
                        if (value_8.Value != null)
                        {
                            xor_1 ^= value_8.Value.GetHashCode();
                        }
                    }

                    result = (result * 31) + xor_1;
                }

                if (obj.Stacks != null)
                {
                    foreach (var value_9 in obj.Stacks)
                    {
                        result = result * 31;
                        if (value_9 != null)
                        {
                            result = (result * 31) + value_9.ValueGetHashCode();
                        }
                    }
                }

                if (obj.CodeFlows != null)
                {
                    foreach (var value_10 in obj.CodeFlows)
                    {
                        result = result * 31;
                        if (value_10 != null)
                        {
                            result = (result * 31) + value_10.ValueGetHashCode();
                        }
                    }
                }

                if (obj.Graphs != null)
                {
                    foreach (var value_11 in obj.Graphs)
                    {
                        result = result * 31;
                        if (value_11 != null)
                        {
                            result = (result * 31) + value_11.ValueGetHashCode();
                        }
                    }
                }

                if (obj.GraphTraversals != null)
                {
                    foreach (var value_12 in obj.GraphTraversals)
                    {
                        result = result * 31;
                        if (value_12 != null)
                        {
                            result = (result * 31) + value_12.ValueGetHashCode();
                        }
                    }
                }

                if (obj.RelatedLocations != null)
                {
                    foreach (var value_13 in obj.RelatedLocations)
                    {
                        result = result * 31;
                        if (value_13 != null)
                        {
                            result = (result * 31) + value_13.ValueGetHashCode();
                        }
                    }
                }

                if (obj.Suppressions != null)
                {
                    foreach (var value_14 in obj.Suppressions)
                    {
                        result = result * 31;
                        if (value_14 != null)
                        {
                            result = (result * 31) + value_14.ValueGetHashCode();
                        }
                    }
                }

                result = (result * 31) + obj.BaselineState.GetHashCode();
                result = (result * 31) + obj.Rank.GetHashCode();
                if (obj.Attachments != null)
                {
                    foreach (var value_15 in obj.Attachments)
                    {
                        result = result * 31;
                        if (value_15 != null)
                        {
                            result = (result * 31) + value_15.ValueGetHashCode();
                        }
                    }
                }

                if (obj.HostedViewerUri != null)
                {
                    result = (result * 31) + obj.HostedViewerUri.GetHashCode();
                }

                if (obj.WorkItemUris != null)
                {
                    foreach (var value_16 in obj.WorkItemUris)
                    {
                        result = result * 31;
                        if (value_16 != null)
                        {
                            result = (result * 31) + value_16.GetHashCode();
                        }
                    }
                }

                if (obj.Provenance != null)
                {
                    result = (result * 31) + obj.Provenance.ValueGetHashCode();
                }

                if (obj.Fixes != null)
                {
                    foreach (var value_17 in obj.Fixes)
                    {
                        result = result * 31;
                        if (value_17 != null)
                        {
                            result = (result * 31) + value_17.ValueGetHashCode();
                        }
                    }
                }

                if (obj.Taxa != null)
                {
                    foreach (var value_18 in obj.Taxa)
                    {
                        result = result * 31;
                        if (value_18 != null)
                        {
                            result = (result * 31) + value_18.ValueGetHashCode();
                        }
                    }
                }

                if (obj.WebRequest != null)
                {
                    result = (result * 31) + obj.WebRequest.ValueGetHashCode();
                }

                if (obj.WebResponse != null)
                {
                    result = (result * 31) + obj.WebResponse.ValueGetHashCode();
                }

                if (obj.Properties != null)
                {
                    // Use xor for dictionaries to be order-independent.
                    int xor_2 = 0;
                    foreach (var value_19 in obj.Properties)
                    {
                        xor_2 ^= value_19.Key.GetHashCode();
                        if (value_19.Value != null)
                        {
                            xor_2 ^= value_19.Value.GetHashCode();
                        }
                    }

                    result = (result * 31) + xor_2;
                }
            }

            return result;
        }