예제 #1
0
        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));
        }
예제 #2
0
        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));
        }