public bool Equals(LockFileTargetLibrary other)
        {
            if (other == null)
            {
                return(false);
            }

            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            return(string.Equals(Name, other.Name) &&
                   VersionComparer.Default.Equals(Version, other.Version) &&
                   string.Equals(Type, other.Type, StringComparison.Ordinal) &&
                   string.Equals(Framework, other.Framework, StringComparison.Ordinal) &&
                   Dependencies.OrderedEquals(other.Dependencies, dependency => dependency.Id, StringComparer.OrdinalIgnoreCase) &&
                   FrameworkAssemblies.OrderedEquals(other.FrameworkAssemblies, s => s, StringComparer.OrdinalIgnoreCase, StringComparer.OrdinalIgnoreCase) &&
                   FrameworkReferences.OrderedEquals(other.FrameworkReferences, s => s, StringComparer.OrdinalIgnoreCase, StringComparer.OrdinalIgnoreCase) &&
                   RuntimeAssemblies.OrderedEquals(other.RuntimeAssemblies, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   ResourceAssemblies.OrderedEquals(other.ResourceAssemblies, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   CompileTimeAssemblies.OrderedEquals(other.CompileTimeAssemblies, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   NativeLibraries.OrderedEquals(other.NativeLibraries, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   ContentFiles.OrderedEquals(other.ContentFiles, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   RuntimeTargets.OrderedEquals(other.RuntimeTargets, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   Build.OrderedEquals(other.Build, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   BuildMultiTargeting.OrderedEquals(other.BuildMultiTargeting, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   ToolsAssemblies.OrderedEquals(other.ToolsAssemblies, item => item.Path, StringComparer.OrdinalIgnoreCase) &&
                   EmbedAssemblies.OrderedEquals(other.EmbedAssemblies, item => item.Path, StringComparer.OrdinalIgnoreCase));
        }
Ejemplo n.º 2
0
        public bool Equals(TargetFrameworkInformation other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(EqualityUtility.EqualsWithNullCheck(FrameworkName, other.FrameworkName) &&
                   Dependencies.OrderedEquals(other.Dependencies, dependency => dependency.Name, StringComparer.OrdinalIgnoreCase) &&
                   Imports.SequenceEqualWithNullCheck(other.Imports) &&
                   AssetTargetFallback == other.AssetTargetFallback &&
                   DownloadDependencies.OrderedEquals(other.DownloadDependencies, dep => dep) &&
                   FrameworkReferences.OrderedEquals(other.FrameworkReferences, fr => fr) &&
                   string.Equals(RuntimeIdentifierGraphPath, other.RuntimeIdentifierGraphPath));
        }