in src/Sarif/Autogenerated/RunEqualityComparer.cs [464:746]
public int GetHashCode(Run obj)
{
if (ReferenceEquals(obj, null))
{
return 0;
}
int result = 17;
unchecked
{
if (obj.Tool != null)
{
result = (result * 31) + obj.Tool.ValueGetHashCode();
}
if (obj.Invocations != null)
{
foreach (var value_4 in obj.Invocations)
{
result = result * 31;
if (value_4 != null)
{
result = (result * 31) + value_4.ValueGetHashCode();
}
}
}
if (obj.Conversion != null)
{
result = (result * 31) + obj.Conversion.ValueGetHashCode();
}
if (obj.Language != null)
{
result = (result * 31) + obj.Language.GetHashCode();
}
if (obj.VersionControlProvenance != null)
{
foreach (var value_5 in obj.VersionControlProvenance)
{
result = result * 31;
if (value_5 != null)
{
result = (result * 31) + value_5.ValueGetHashCode();
}
}
}
if (obj.OriginalUriBaseIds != null)
{
// Use xor for dictionaries to be order-independent.
int xor_0 = 0;
foreach (var value_6 in obj.OriginalUriBaseIds)
{
xor_0 ^= value_6.Key.GetHashCode();
if (value_6.Value != null)
{
xor_0 ^= value_6.Value.GetHashCode();
}
}
result = (result * 31) + xor_0;
}
if (obj.Artifacts != null)
{
foreach (var value_7 in obj.Artifacts)
{
result = result * 31;
if (value_7 != null)
{
result = (result * 31) + value_7.ValueGetHashCode();
}
}
}
if (obj.LogicalLocations != null)
{
foreach (var value_8 in obj.LogicalLocations)
{
result = result * 31;
if (value_8 != null)
{
result = (result * 31) + value_8.ValueGetHashCode();
}
}
}
if (obj.Graphs != null)
{
foreach (var value_9 in obj.Graphs)
{
result = result * 31;
if (value_9 != null)
{
result = (result * 31) + value_9.ValueGetHashCode();
}
}
}
if (obj.Results != null)
{
foreach (var value_10 in obj.Results)
{
result = result * 31;
if (value_10 != null)
{
result = (result * 31) + value_10.ValueGetHashCode();
}
}
}
if (obj.AutomationDetails != null)
{
result = (result * 31) + obj.AutomationDetails.ValueGetHashCode();
}
if (obj.RunAggregates != null)
{
foreach (var value_11 in obj.RunAggregates)
{
result = result * 31;
if (value_11 != null)
{
result = (result * 31) + value_11.ValueGetHashCode();
}
}
}
if (obj.BaselineGuid != null)
{
result = (result * 31) + obj.BaselineGuid.GetHashCode();
}
if (obj.RedactionTokens != null)
{
foreach (var value_12 in obj.RedactionTokens)
{
result = result * 31;
if (value_12 != null)
{
result = (result * 31) + value_12.GetHashCode();
}
}
}
if (obj.DefaultEncoding != null)
{
result = (result * 31) + obj.DefaultEncoding.GetHashCode();
}
if (obj.DefaultSourceLanguage != null)
{
result = (result * 31) + obj.DefaultSourceLanguage.GetHashCode();
}
if (obj.NewlineSequences != null)
{
foreach (var value_13 in obj.NewlineSequences)
{
result = result * 31;
if (value_13 != null)
{
result = (result * 31) + value_13.GetHashCode();
}
}
}
result = (result * 31) + obj.ColumnKind.GetHashCode();
if (obj.ExternalPropertyFileReferences != null)
{
result = (result * 31) + obj.ExternalPropertyFileReferences.ValueGetHashCode();
}
if (obj.ThreadFlowLocations != null)
{
foreach (var value_14 in obj.ThreadFlowLocations)
{
result = result * 31;
if (value_14 != null)
{
result = (result * 31) + value_14.ValueGetHashCode();
}
}
}
if (obj.Taxonomies != null)
{
foreach (var value_15 in obj.Taxonomies)
{
result = result * 31;
if (value_15 != null)
{
result = (result * 31) + value_15.ValueGetHashCode();
}
}
}
if (obj.Addresses != null)
{
foreach (var value_16 in obj.Addresses)
{
result = result * 31;
if (value_16 != null)
{
result = (result * 31) + value_16.ValueGetHashCode();
}
}
}
if (obj.Translations != null)
{
foreach (var value_17 in obj.Translations)
{
result = result * 31;
if (value_17 != null)
{
result = (result * 31) + value_17.ValueGetHashCode();
}
}
}
if (obj.Policies != null)
{
foreach (var value_18 in obj.Policies)
{
result = result * 31;
if (value_18 != null)
{
result = (result * 31) + value_18.ValueGetHashCode();
}
}
}
if (obj.WebRequests != null)
{
foreach (var value_19 in obj.WebRequests)
{
result = result * 31;
if (value_19 != null)
{
result = (result * 31) + value_19.ValueGetHashCode();
}
}
}
if (obj.WebResponses != null)
{
foreach (var value_20 in obj.WebResponses)
{
result = result * 31;
if (value_20 != null)
{
result = (result * 31) + value_20.ValueGetHashCode();
}
}
}
if (obj.SpecialLocations != null)
{
result = (result * 31) + obj.SpecialLocations.ValueGetHashCode();
}
if (obj.Properties != null)
{
// Use xor for dictionaries to be order-independent.
int xor_1 = 0;
foreach (var value_21 in obj.Properties)
{
xor_1 ^= value_21.Key.GetHashCode();
if (value_21.Value != null)
{
xor_1 ^= value_21.Value.GetHashCode();
}
}
result = (result * 31) + xor_1;
}
}
return result;
}