in src/NuGet.Core/NuGet.ProjectModel/ProjectRestoreMetadata.cs [194:234]
public bool Equals(ProjectRestoreMetadata other)
{
if (other == null)
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
StringComparer osStringComparer = PathUtility.GetStringComparerBasedOnOS();
return ProjectStyle == other.ProjectStyle &&
osStringComparer.Equals(ProjectPath, other.ProjectPath) &&
osStringComparer.Equals(ProjectJsonPath, other.ProjectJsonPath) &&
osStringComparer.Equals(OutputPath, other.OutputPath) &&
osStringComparer.Equals(ProjectName, other.ProjectName) &&
osStringComparer.Equals(ProjectUniqueName, other.ProjectUniqueName) &&
GetSources(Sources).SetEqualsWithNullCheck(GetSources(other.Sources), StringComparer.OrdinalIgnoreCase) &&
osStringComparer.Equals(PackagesPath, other.PackagesPath) &&
ConfigFilePaths.OrderedEquals(other.ConfigFilePaths, filePath => filePath, osStringComparer, osStringComparer) &&
FallbackFolders.OrderedEquals(other.FallbackFolders, fallbackFolder => fallbackFolder, osStringComparer, osStringComparer) &&
EqualityUtility.OrderedEquals(TargetFrameworks, other.TargetFrameworks, dep => dep.TargetAlias, StringComparer.OrdinalIgnoreCase) &&
OriginalTargetFrameworks.OrderedEquals(other.OriginalTargetFrameworks, fw => fw, StringComparer.OrdinalIgnoreCase, StringComparer.OrdinalIgnoreCase) &&
CrossTargeting == other.CrossTargeting &&
LegacyPackagesDirectory == other.LegacyPackagesDirectory &&
ValidateRuntimeAssets == other.ValidateRuntimeAssets &&
SkipContentFileWrite == other.SkipContentFileWrite &&
EqualityUtility.SequenceEqualWithNullCheck(Files, other.Files) &&
EqualityUtility.EqualsWithNullCheck(ProjectWideWarningProperties, other.ProjectWideWarningProperties) &&
EqualityUtility.EqualsWithNullCheck(RestoreLockProperties, other.RestoreLockProperties) &&
EqualityUtility.EqualsWithNullCheck(CentralPackageVersionsEnabled, other.CentralPackageVersionsEnabled) &&
EqualityUtility.EqualsWithNullCheck(CentralPackageFloatingVersionsEnabled, other.CentralPackageFloatingVersionsEnabled) &&
EqualityUtility.EqualsWithNullCheck(CentralPackageVersionOverrideDisabled, other.CentralPackageVersionOverrideDisabled) &&
EqualityUtility.EqualsWithNullCheck(CentralPackageTransitivePinningEnabled, other.CentralPackageTransitivePinningEnabled) &&
RestoreAuditProperties == other.RestoreAuditProperties &&
UsingMicrosoftNETSdk == other.UsingMicrosoftNETSdk &&
EqualityUtility.EqualsWithNullCheck(SdkAnalysisLevel, other.SdkAnalysisLevel) &&
UseLegacyDependencyResolver == other.UseLegacyDependencyResolver;
}