146 references to AssemblyIdentityParts
Microsoft.CodeAnalysis (49)
Desktop\DesktopAssemblyIdentityComparer.cs (1)
83AssemblyIdentityParts referenceParts,
MetadataReference\AssemblyIdentity.cs (6)
357internal static bool IsFullName(AssemblyIdentityParts parts) 359const AssemblyIdentityParts nvc = AssemblyIdentityParts.Name | AssemblyIdentityParts.Version | AssemblyIdentityParts.Culture; 360return (parts & nvc) == nvc && (parts & AssemblyIdentityParts.PublicKeyOrToken) != 0;
MetadataReference\AssemblyIdentity.DisplayName.cs (31)
174private static readonly ConcurrentCache<string, (AssemblyIdentity? identity, AssemblyIdentityParts parts)> s_TryParseDisplayNameCache = 175new ConcurrentCache<string, (AssemblyIdentity? identity, AssemblyIdentityParts parts)>(1024, ReferenceEqualityComparer.Instance); 194public static bool TryParseDisplayName(string displayName, [NotNullWhen(true)] out AssemblyIdentity? identity, out AssemblyIdentityParts parts) 198if (tryParseDisplayName(displayName, out var localIdentity, out var localParts)) 209static bool tryParseDisplayName(string displayName, [NotNullWhen(true)] out AssemblyIdentity? identity, out AssemblyIdentityParts parts) 233var parsedParts = AssemblyIdentityParts.Name; 234var seen = AssemblyIdentityParts.Name; 275if ((seen & AssemblyIdentityParts.Version) != 0) 280seen |= AssemblyIdentityParts.Version; 288AssemblyIdentityParts versionParts; 300if ((seen & AssemblyIdentityParts.Culture) != 0) 305seen |= AssemblyIdentityParts.Culture; 313parsedParts |= AssemblyIdentityParts.Culture; 317if ((seen & AssemblyIdentityParts.PublicKey) != 0) 322seen |= AssemblyIdentityParts.PublicKey; 340parsedParts |= AssemblyIdentityParts.PublicKey; 344if ((seen & AssemblyIdentityParts.PublicKeyToken) != 0) 349seen |= AssemblyIdentityParts.PublicKeyToken; 363parsedParts |= AssemblyIdentityParts.PublicKeyToken; 367if ((seen & AssemblyIdentityParts.Retargetability) != 0) 372seen |= AssemblyIdentityParts.Retargetability; 392parsedParts |= AssemblyIdentityParts.Retargetability; 396if ((seen & AssemblyIdentityParts.ContentType) != 0) 401seen |= AssemblyIdentityParts.ContentType; 417parsedParts |= AssemblyIdentityParts.ContentType; 421parsedParts |= AssemblyIdentityParts.Unknown; 599internal static bool TryParseVersion(string str, out ulong result, out AssemblyIdentityParts parts) 631parts |= (AssemblyIdentityParts)((int)AssemblyIdentityParts.VersionMajor << partIndex);
MetadataReference\AssemblyIdentityComparer.cs (11)
91AssemblyIdentityParts parts; 102parts = AssemblyIdentityParts.Name | AssemblyIdentityParts.Version | AssemblyIdentityParts.Culture | AssemblyIdentityParts.PublicKeyToken; 126bool compareCulture = (parts & AssemblyIdentityParts.Culture) != 0; 127bool comparePublicKeyToken = (parts & AssemblyIdentityParts.PublicKeyOrToken) != 0; 171bool hasSomeVersionParts = (parts & AssemblyIdentityParts.Version) != 0; 172bool hasPartialVersion = (parts & AssemblyIdentityParts.Version) != AssemblyIdentityParts.Version; 222internal virtual bool ApplyUnificationPolicies(ref AssemblyIdentity reference, ref AssemblyIdentity definition, AssemblyIdentityParts referenceParts, out bool isDefinitionFxAssembly)
Microsoft.CodeAnalysis.CSharp (5)
Symbols\Source\SourceAssemblySymbol.cs (5)
2286AssemblyIdentityParts parts; 2295const AssemblyIdentityParts allowedParts = AssemblyIdentityParts.Name | AssemblyIdentityParts.PublicKey | AssemblyIdentityParts.PublicKeyToken;
Microsoft.CodeAnalysis.Scripting (7)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (1)
185if (!TrustedPlatformAssemblies.IsEmpty && AssemblyIdentity.TryParseDisplayName(reference, out var identity, out var identityParts))
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (6)
222internal static Version GetVersion(IAssemblyName name, out AssemblyIdentityParts parts) 233parts |= AssemblyIdentityParts.VersionMajor; 238parts |= AssemblyIdentityParts.VersionMinor; 243parts |= AssemblyIdentityParts.VersionBuild; 248parts |= AssemblyIdentityParts.VersionRevision; 415AssemblyIdentityParts versionParts;
Microsoft.CodeAnalysis.UnitTests (81)
MetadataReferences\AssemblyIdentityComparerTests.cs (1)
51AssemblyIdentityParts parts1, parts2;
MetadataReferences\AssemblyIdentityDisplayNameTests.cs (74)
16private const AssemblyIdentityParts N = AssemblyIdentityParts.Name; 17private const AssemblyIdentityParts NV = N | AssemblyIdentityParts.Version; 18private const AssemblyIdentityParts NVK = NV | AssemblyIdentityParts.PublicKey; 19private const AssemblyIdentityParts NVT = NV | AssemblyIdentityParts.PublicKeyToken; 20private const AssemblyIdentityParts NVC = NV | AssemblyIdentityParts.Culture; 21private const AssemblyIdentityParts NVCT = NVC | AssemblyIdentityParts.PublicKeyToken; 25AssemblyIdentityParts actualParts; 33AssemblyIdentityParts fusionParts = 0; 37Assert.Equal((AssemblyIdentityParts)0, fusionParts); 41private void TestParseVersion(string value, int major, int minor, int build, int revision, AssemblyIdentityParts expectedParts) 43AssemblyIdentityParts actualParts; 55AssemblyIdentityParts fusionParts = 0; 65Assert.Equal((AssemblyIdentityParts)0, fusionParts); 105private void TestParseDisplayName(string displayName, AssemblyIdentity expected, AssemblyIdentityParts expectedParts = 0) 110private void TestParseDisplayName(string displayName, AssemblyIdentity expected, AssemblyIdentityParts expectedParts, AssemblyIdentity expectedFusion) 116AssemblyIdentityParts actualParts; 375new AssemblyIdentity("goo"), N | AssemblyIdentityParts.Unknown); 387NVCT | AssemblyIdentityParts.Retargetability); 424new AssemblyIdentity("goo", new Version(1, 0, 0, 0)), N | AssemblyIdentityParts.VersionMajor); 432AssemblyIdentityParts.Name | AssemblyIdentityParts.Culture); 445TestParseVersion("1", 1, 0, 0, 0, AssemblyIdentityParts.VersionMajor); 446TestParseVersion("65535", 65535, 0, 0, 0, AssemblyIdentityParts.VersionMajor); 450TestParseVersion("1.", 1, 0, 0, 0, AssemblyIdentityParts.VersionMajor); 451TestParseVersion("0.1", 0, 1, 0, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor); 452TestParseVersion("1.2", 1, 2, 0, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor); 456TestParseVersion("1..", 1, 0, 0, 0, AssemblyIdentityParts.VersionMajor); 457TestParseVersion("1.2.", 1, 2, 0, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor); 458TestParseVersion("1.2.3", 1, 2, 3, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionBuild); 459TestParseVersion(".2.3", 0, 2, 3, 0, AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionBuild); 460TestParseVersion("1..3", 1, 0, 3, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionBuild); 462TestParseVersion("1.2.3.", 1, 2, 3, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionBuild); 463TestParseVersion("1.2..4", 1, 2, 0, 4, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionRevision); 464TestParseVersion("1.2..", 1, 2, 0, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor); 465TestParseVersion("1.2.3.4", 1, 2, 3, 4, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionBuild | AssemblyIdentityParts.VersionRevision); 469AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionBuild | AssemblyIdentityParts.VersionRevision); 472TestParseVersion("*", 0, 0, 0, 0, AssemblyIdentityParts.VersionMajor); 473TestParseVersion("1.*", 1, 0, 0, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor); 474TestParseVersion("1.2.*", 1, 2, 0, 0, AssemblyIdentityParts.VersionMajor | AssemblyIdentityParts.VersionMinor | AssemblyIdentityParts.VersionBuild); 475TestParseVersion("1.2.3.*", 1, 2, 3, 0, AssemblyIdentityParts.Version); 476TestParseVersion("1.*.2.*", 1, 0, 2, 0, AssemblyIdentityParts.Version); 568new AssemblyIdentity("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKey1, hasPublicKey: true), NVC | AssemblyIdentityParts.PublicKeyOrToken); 577new AssemblyIdentity("goo", new Version(1, 0, 0, 1), contentType: AssemblyContentType.WindowsRuntime), NV | AssemblyIdentityParts.ContentType); 592NVCT | AssemblyIdentityParts.Retargetability); 600NVCT | AssemblyIdentityParts.Retargetability); 609new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NV | AssemblyIdentityParts.Retargetability, 613new AssemblyIdentity("goo", new Version(1, 0, 0, 1), isRetargetable: true), NV | AssemblyIdentityParts.Retargetability,
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (6)
222internal static Version GetVersion(IAssemblyName name, out AssemblyIdentityParts parts) 233parts |= AssemblyIdentityParts.VersionMajor; 238parts |= AssemblyIdentityParts.VersionMinor; 243parts |= AssemblyIdentityParts.VersionBuild; 248parts |= AssemblyIdentityParts.VersionRevision; 415AssemblyIdentityParts versionParts;
Microsoft.CodeAnalysis.VisualBasic (4)
Symbols\Source\SourceAssemblySymbol.vb (4)
968Dim parts As AssemblyIdentityParts = Nothing 975Const allowedParts = AssemblyIdentityParts.Name Or AssemblyIdentityParts.PublicKey Or AssemblyIdentityParts.PublicKeyToken