58 references to PartialComparisonFlags
Microsoft.Build.Tasks.Core (13)
AssemblyDependency\FrameworkPathResolver.cs (2)
90
if (assemblyName.PartialNameCompare(current,
PartialComparisonFlags
.Culture |
PartialComparisonFlags
.PublicKeyToken))
AssemblyNameExtension.cs (8)
862
return PartialNameCompare(that,
PartialComparisonFlags
.Default, false /* do not consider retargetable flag*/);
870
return PartialNameCompare(that,
PartialComparisonFlags
.Default, considerRetargetableFlag);
881
internal bool PartialNameCompare(AssemblyNameExtension that,
PartialComparisonFlags
comparisonFlags)
894
internal bool PartialNameCompare(AssemblyNameExtension that,
PartialComparisonFlags
comparisonFlags, bool considerRetargetableFlag)
919
if ((comparisonFlags &
PartialComparisonFlags
.SimpleName) != 0 && Name != null && !string.Equals(Name, that.Name, StringComparison.OrdinalIgnoreCase))
924
if ((comparisonFlags &
PartialComparisonFlags
.Version) != 0 && Version != null && this.Version != that.Version)
929
if ((comparisonFlags &
PartialComparisonFlags
.Culture) != 0 && CultureInfo != null && (that.CultureInfo == null || !CompareCultures(AssemblyName, that.AssemblyName)))
934
if ((comparisonFlags &
PartialComparisonFlags
.PublicKeyToken) != 0 && GetPublicKeyToken() != null && !ComparePublicKeyToken(that))
RedistList.cs (3)
456
if (firstAssembly.PartialNameCompare(secondAssembly,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken |
PartialComparisonFlags
.Culture))
Microsoft.Build.Tasks.UnitTests (45)
AssemblyNameEx_Tests.cs (45)
421
Assert.True(assemblyNameToMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName));
423
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName));
446
Assert.True(assemblyNameToMatchVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Version));
449
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Version));
453
Assert.True(assemblyMatchNoVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Version));
459
Assert.False(assemblyNameToMatchVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Version));
462
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Version));
466
Assert.True(assemblyMatchNoVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Version));
490
Assert.True(assemblyNameToMatchCulture.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Culture));
493
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Culture));
497
Assert.True(assemblyMatchNoVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Culture));
503
Assert.False(assemblyNameToMatchCulture.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Culture));
506
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Culture));
510
Assert.True(assemblyMatchNoVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.Culture));
534
Assert.True(assemblyNameToMatchPublicToken.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken));
537
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken));
541
Assert.True(assemblyMatchNoVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken));
547
Assert.False(assemblyNameToMatchPublicToken.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken));
550
Assert.False(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken));
554
Assert.True(assemblyMatchNoVersion.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName |
PartialComparisonFlags
.PublicKeyToken));
576
Assert.True(assemblyNameToMatchRetargetable.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName, true));
579
Assert.False(assemblyToCompare.PartialNameCompare(assemblyNameToNotMatch,
PartialComparisonFlags
.SimpleName, true));
582
Assert.False(assemblyToCompare.PartialNameCompare(assemblyMatchNoRetargetable,
PartialComparisonFlags
.SimpleName, true));
585
Assert.False(assemblyMatchNoRetargetable.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName, true));
589
Assert.False(assemblyNameToMatchRetargetable.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName, true));
601
Assert.True(assemblyNameToNotMatch.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName, true));
604
Assert.True(assemblyMatchNoRetargetable.PartialNameCompare(assemblyToCompare,
PartialComparisonFlags
.SimpleName, true));