public bool Equals(LockFile other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Version == other.Version && ProjectFileDependencyGroups.OrderedEquals(other.ProjectFileDependencyGroups, group => group.FrameworkName, StringComparer.OrdinalIgnoreCase) && Libraries.OrderedEquals(other.Libraries, library => library.Name, StringComparer.OrdinalIgnoreCase) && Targets.OrderedEquals(other.Targets, target => target.Name, StringComparer.Ordinal) && PackageFolders.SequenceEqual(other.PackageFolders) && EqualityUtility.EqualsWithNullCheck(PackageSpec, other.PackageSpec)); }
public bool Equals(LockFile other) { if (other == null) { return(false); } if (Object.ReferenceEquals(this, other)) { return(true); } return(IsLocked == other.IsLocked && Version == other.Version && ProjectFileDependencyGroups.OrderedEquals(other.ProjectFileDependencyGroups, group => group.FrameworkName, StringComparer.OrdinalIgnoreCase) && Libraries.OrderedEquals(other.Libraries, library => library.Name, StringComparer.OrdinalIgnoreCase) && Targets.OrderedEquals(other.Targets, target => target.Name, StringComparer.Ordinal) && ProjectFileToolGroups.OrderedEquals(other.ProjectFileToolGroups, group => group.FrameworkName, StringComparer.OrdinalIgnoreCase) && Tools.OrderedEquals(other.Tools, target => target.Name, StringComparer.Ordinal)); }