public override int GetHashCode() { int result = 17; unchecked { if (RuleId != null) { result = (result * 31) + RuleId.GetHashCode(); } result = (result * 31) + Kind.GetHashCode(); if (Message != null) { result = (result * 31) + Message.GetHashCode(); } if (FormattedRuleMessage != null) { result = (result * 31) + FormattedRuleMessage.GetHashCode(); } if (Locations != null) { foreach (var value_0 in Locations) { result = result * 31; if (value_0 != null) { result = (result * 31) + value_0.GetHashCode(); } } } if (CodeSnippet != null) { result = (result * 31) + CodeSnippet.GetHashCode(); } if (ToolFingerprint != null) { result = (result * 31) + ToolFingerprint.GetHashCode(); } if (Stacks != null) { foreach (var value_1 in Stacks) { result = result * 31; if (value_1 != null) { result = (result * 31) + value_1.GetHashCode(); } } } if (CodeFlows != null) { foreach (var value_2 in CodeFlows) { result = result * 31; if (value_2 != null) { result = (result * 31) + value_2.GetHashCode(); } } } if (RelatedLocations != null) { foreach (var value_3 in RelatedLocations) { result = result * 31; if (value_3 != null) { result = (result * 31) + value_3.GetHashCode(); } } } result = (result * 31) + IsSuppressedInSource.GetHashCode(); if (Fixes != null) { foreach (var value_4 in Fixes) { result = result * 31; if (value_4 != null) { result = (result * 31) + value_4.GetHashCode(); } } } if (Properties != null) { // Use xor for dictionaries to be order-independent. int xor_0 = 0; foreach (var value_5 in Properties) { xor_0 ^= value_5.Key.GetHashCode(); if (value_5.Value != null) { xor_0 ^= value_5.Value.GetHashCode(); } } result = (result * 31) + xor_0; } if (Tags != null) { foreach (var value_6 in Tags) { result = result * 31; if (value_6 != null) { result = (result * 31) + value_6.GetHashCode(); } } } } return(result); }