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