276 references to AssemblyIdentity
Microsoft.CodeAnalysis (7)
Desktop\DesktopAssemblyIdentityComparer.cs (2)
232
return new
AssemblyIdentity
(
294
return new
AssemblyIdentity
(
Emit\ErrorType.cs (1)
215
private static readonly AssemblyIdentity s_identity = new
AssemblyIdentity
(
MetadataReference\AssemblyIdentity.cs (2)
539
return new
AssemblyIdentity
(
552
return new
AssemblyIdentity
(
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
434
identity = new
AssemblyIdentity
(simpleName, version, culture, hasPublicKey ? publicKey : publicKeyToken, hasPublicKey, isRetargetable, contentType);
MetadataReference\AssemblyIdentityUtils.cs (1)
39
return new
AssemblyIdentity
(name, version, cultureName, publicKeyOrToken, hasPublicKey);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
39
return new
AssemblyIdentity
(name, version, cultureName, publicKeyOrToken, hasPublicKey);
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpCompilation.cs (1)
1520
: new MissingNamespaceSymbol(new MissingModuleSymbol(new MissingAssemblySymbol(new
AssemblyIdentity
(System.Guid.NewGuid().ToString())), ordinal: -1));
Symbols\MissingCorLibrarySymbol.cs (1)
35
: base(new
AssemblyIdentity
("<Missing Core Assembly>"))
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
213
new
AssemblyIdentity
(name: originatingSourceAssemblyDebugOnly.Name) :
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Emit\EditAndContinue\AssemblyReferencesTests.cs (6)
303
((SourceAssemblySymbol)lib0.Assembly).lazyAssemblyIdentity = new
AssemblyIdentity
("Lib", version0);
307
((SourceAssemblySymbol)lib1.Assembly).lazyAssemblyIdentity = new
AssemblyIdentity
("Lib", version1);
311
((SourceAssemblySymbol)lib2.Assembly).lazyAssemblyIdentity = new
AssemblyIdentity
("Lib", version2);
387
((SourceAssemblySymbol)lib0.Assembly).lazyAssemblyIdentity = new
AssemblyIdentity
("Lib", new Version(1, 0, 2000, 1001));
391
((SourceAssemblySymbol)lib1.Assembly).lazyAssemblyIdentity = new
AssemblyIdentity
("Lib", new Version(1, 0, 2000, 1002));
395
((SourceAssemblySymbol)lib2.Assembly).lazyAssemblyIdentity = new
AssemblyIdentity
("Lib", new Version(1, 0, 2000, 1003));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (16)
OverloadResolutionPriorityTests.cs (6)
664
var comp1_1 = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
665
var comp1_2 = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
712
var comp1_1 = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
713
var comp1_2 = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
773
var comp1_1 = CreateCompilation(new
AssemblyIdentity
("Base", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
774
var comp1_2 = CreateCompilation(new
AssemblyIdentity
("Base", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
Semantics\CollectionExpressionTests.cs (2)
38820
var comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(1, 0, 0, 0)), sourceA1, references: TargetFrameworkUtil.StandardReferences);
38843
comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(2, 0, 0, 0)), sourceA2, references: TargetFrameworkUtil.StandardReferences);
Semantics\ExperimentalAttributeTests.cs (8)
926
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
927
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
963
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
964
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
991
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
992
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
1028
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
1029
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\InheritanceBindingTests.cs (2)
2995
var comp11 = CreateCompilation(new
AssemblyIdentity
("lib1", new Version("4.2.1.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true),
2998
var comp12 = CreateCompilation(new
AssemblyIdentity
("lib1", new Version("4.1.0.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true),
Semantics\NativeIntegerTests.cs (8)
845
var comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
883
comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(2, 0, 0, 0)), new[] { source2 }, references: null);
956
var comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
1000
comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(2, 0, 0, 0)), new[] { source2 }, references: null);
1049
var comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(1, 0, 0, 0)), new[] { sourceA }, references: references);
1052
comp = CreateCompilation(new
AssemblyIdentity
(assemblyName, new Version(2, 0, 0, 0)), new[] { sourceA }, references: references);
1137
var comp = CreateCompilation(new
AssemblyIdentity
("9ef8b1e0-1ae0-4af6-b9a1-00f2078f299e", new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
1217
var comp = CreateCompilation(new
AssemblyIdentity
("c804cc09-8f73-44a1-9cfe-9567bed1def6", new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
Semantics\RefFieldTests.cs (4)
27153
var assemblyIdentity = new
AssemblyIdentity
("System.Runtime", new System.Version(majorVersion, 0, 0, 0));
27210
var assemblyIdentityLowerVersion = new
AssemblyIdentity
("System.Runtime", new System.Version(6, 0, 0, 0));
27214
var assemblyIdentityHigherVersion = new
AssemblyIdentity
("System.Runtime", new System.Version(higherVersion, 0, 0, 0));
27278
var assemblyIdentity = new
AssemblyIdentity
(assemblyName, new System.Version(majorVersion, minorVersion, 0, 0));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (67)
Symbols\CompilationCreationTests.cs (36)
683
var varMTTestLib1_V1_Name = new
AssemblyIdentity
("MTTestLib1", new Version("1.0.0.0"));
698
var varMTTestLib2_Name = new
AssemblyIdentity
("MTTestLib2");
723
var c2 = CreateCompilation(new
AssemblyIdentity
("c2"),
755
var varMTTestLib1_V2_Name = new
AssemblyIdentity
("MTTestLib1", new Version("2.0.0.0"));
774
var varMTTestLib3_Name = new
AssemblyIdentity
("MTTestLib3");
816
var c3 = CreateCompilation(new
AssemblyIdentity
("c3"),
877
var varMTTestLib1_V3_Name = new
AssemblyIdentity
("MTTestLib1", new Version("3.0.0.0"));
900
var varMTTestLib4_Name = new
AssemblyIdentity
("MTTestLib4");
952
var c4 = CreateCompilation(new
AssemblyIdentity
("c4"),
1057
var c5 = CreateCompilation(new
AssemblyIdentity
("c5"),
1066
var c6 = CreateCompilation(new
AssemblyIdentity
("c6"),
1075
var c7 = CreateCompilation(new
AssemblyIdentity
("c7"),
1143
var c8 = CreateCompilation(new
AssemblyIdentity
("c8"),
1157
var c9 = CreateCompilation(new
AssemblyIdentity
("c9"),
1166
var c10 = CreateCompilation(new
AssemblyIdentity
("c10"),
1419
var varMTTestLib2_Name = new
AssemblyIdentity
("MTTestLib2");
1430
var c2 = CreateCompilation(new
AssemblyIdentity
("c2"),
1466
var varMTTestLib3_Name = new
AssemblyIdentity
("MTTestLib3");
1485
var c3 = CreateCompilation(new
AssemblyIdentity
("c3"),
1551
var varMTTestLib4_Name = new
AssemblyIdentity
("MTTestLib4");
1573
var c4 = CreateCompilation(new
AssemblyIdentity
("c4"),
1678
var c5 = CreateCompilation(new
AssemblyIdentity
("c5"),
1690
var c6 = CreateCompilation(new
AssemblyIdentity
("c6"),
1702
var c7 = CreateCompilation(new
AssemblyIdentity
("c7"),
1779
var c8 = CreateCompilation(new
AssemblyIdentity
("c8"),
1798
var c9 = CreateCompilation(new
AssemblyIdentity
("c9"),
1810
var c10 = CreateCompilation(new
AssemblyIdentity
("c10"),
2067
var localC1_V1_Name = new
AssemblyIdentity
("c1", new Version("1.0.0.0"));
2089
var localC1_V2_Name = new
AssemblyIdentity
("c1", new Version("2.0.0.0"));
2111
var localC4_V1_Name = new
AssemblyIdentity
("c4", new Version("1.0.0.0"));
2126
var localC4_V2_Name = new
AssemblyIdentity
("c4", new Version("2.0.0.0"));
2141
var c7 = CreateCompilation(new
AssemblyIdentity
("C7"),
2156
var c3 = CreateCompilation(new
AssemblyIdentity
("C3"),
2245
var c5 = CreateCompilation(new
AssemblyIdentity
("C5"),
2534
var c1_Name = new
AssemblyIdentity
("c1");
2556
var c2_Name = new
AssemblyIdentity
("MTTestLib2");
Symbols\GenericConstraintTests.cs (2)
7326
new
AssemblyIdentity
("remapped", new Version("1.0.0.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true),
7332
new
AssemblyIdentity
("remapped", new Version("2.0.0.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true),
Symbols\Metadata\PE\MissingTypeReferences.cs (10)
325
var defaultName = new
AssemblyIdentity
("missing");
330
missingTypes1[3] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm1")).Modules[0], "", "test1", 0, true);
331
missingTypes1[4] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm1")).Modules[0], "", "test1", 1, true);
332
missingTypes1[5] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm1")).Modules[0], "", "test2", 0, true);
333
missingTypes1[6] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm2")).Modules[0], "", "test1", 0, true);
346
missingTypes2[3] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm1")).Modules[0], "", "test1", 0, true);
347
missingTypes2[4] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm1")).Modules[0], "", "test1", 1, true);
348
missingTypes2[5] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm1")).Modules[0], "", "test2", 0, true);
349
missingTypes2[6] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new
AssemblyIdentity
("asm2")).Modules[0], "", "test1", 0, true);
376
var missingAssembly = new MissingAssemblySymbol(new
AssemblyIdentity
("asm1"));
Symbols\MockAssemblySymbol.cs (1)
28
get { return new
AssemblyIdentity
(_name); }
Symbols\MockSymbolTests.cs (1)
66
AssemblyIdentity missingAssemblyId = new
AssemblyIdentity
("goo");
Symbols\RequiredMembersTests.cs (10)
2193
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2205
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2242
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2270
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2288
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2300
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2548
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2558
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2579
var originalC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2589
var retargetedC = CreateCompilation(new
AssemblyIdentity
("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
Symbols\Retargeting\RetargetExplicitInterfaceImplementation.cs (4)
24
new
AssemblyIdentity
("Assembly1"),
105
new
AssemblyIdentity
("Assembly2"),
318
new
AssemblyIdentity
("Assembly1"),
363
new
AssemblyIdentity
("Assembly2"),
Symbols\Retargeting\RetargetingTests.cs (3)
933
var retargetedIdentity = new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
1005
var originalIdentity = new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
1083
var originalIdentity = new
AssemblyIdentity
("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (6)
EvaluationContextBase.cs (6)
21
internal static readonly AssemblyIdentity SystemIdentity = new
AssemblyIdentity
("System");
22
internal static readonly AssemblyIdentity SystemCoreIdentity = new
AssemblyIdentity
("System.Core");
23
internal static readonly AssemblyIdentity SystemLinqIdentity = new
AssemblyIdentity
("System.Linq");
24
internal static readonly AssemblyIdentity SystemXmlIdentity = new
AssemblyIdentity
("System.Xml");
25
internal static readonly AssemblyIdentity SystemXmlLinqIdentity = new
AssemblyIdentity
("System.Xml.Linq");
26
internal static readonly AssemblyIdentity MicrosoftVisualBasicIdentity = new
AssemblyIdentity
("Microsoft.VisualBasic");
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
129
var assemblyIdentity = new
AssemblyIdentity
(
Microsoft.CodeAnalysis.UnitTests (111)
MetadataReferences\AssemblyIdentityDisplayNameTests.cs (40)
126
var id = new
AssemblyIdentity
("goo");
129
id = new
AssemblyIdentity
("goo", new Version(1, 2, 3, 4));
132
id = new
AssemblyIdentity
("goo", cultureName: "en-US");
138
id = new
AssemblyIdentity
("goo", isRetargetable: true);
141
id = new
AssemblyIdentity
("goo", contentType: AssemblyContentType.WindowsRuntime);
144
id = new
AssemblyIdentity
("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true);
153
id = new
AssemblyIdentity
("Goo", cultureName: "neutral");
156
id = new
AssemblyIdentity
("Goo", cultureName: " '\t\r\n\\=, ");
326
var ai = new
AssemblyIdentity
(simpleName);
362
new
AssemblyIdentity
("fo'o", new Version(1, 0, 0, 0), "zz-ZZ", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.Default),
375
new
AssemblyIdentity
("goo"), N | AssemblyIdentityParts.Unknown);
383
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 0)), NVC);
386
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 0), "en-US", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: true),
390
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1), publicKeyOrToken: RoPublicKey1, hasPublicKey: true),
394
new
AssemblyIdentity
("Goo", cultureName: " '\t\r\n\\=, "),
424
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 0)), N | AssemblyIdentityParts.VersionMajor);
426
TestParseDisplayName("goo, Version=.", new
AssemblyIdentity
("goo"), N);
427
TestParseDisplayName("goo, Version=..", new
AssemblyIdentity
("goo"), N);
428
TestParseDisplayName("goo, Version=...", new
AssemblyIdentity
("goo"), N);
431
new
AssemblyIdentity
("goo", cultureName: "en-US"),
510
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1), cultureName: "null"), NVC);
513
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1), cultureName: "en-US"), NVC);
516
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1), cultureName: "en-US"), NVC);
519
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1), cultureName: "en-US"), NVC);
522
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NV);
524
TestParseDisplayName("goo, Culture=*", new
AssemblyIdentity
("goo"), N);
529
new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), cultureName: null), NVCT);
537
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NVT);
540
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NVT);
543
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NV);
549
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NV);
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);
580
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NV);
591
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKeyToken1, isRetargetable: true),
595
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKeyToken1),
599
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKeyToken1),
606
new
AssemblyIdentity
("goo", new Version(1, 0, 0, 1)), NV);
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,
MetadataReferences\AssemblyIdentityMapTests.cs (16)
19
map.Add(new
AssemblyIdentity
("a", new Version(1, 0, 0, 0)), 10);
20
map.Add(new
AssemblyIdentity
("a", new Version(1, 8, 0, 0)), 18);
21
map.Add(new
AssemblyIdentity
("a", new Version(1, 5, 0, 0)), 15);
23
map.Add(new
AssemblyIdentity
("b", new Version(1, 0, 0, 0)), 10);
24
map.Add(new
AssemblyIdentity
("b", new Version(1, 0, 0, 0)), 20);
27
Assert.True(map.Contains(new
AssemblyIdentity
("a", new Version(1, 0, 0, 0))));
28
Assert.True(map.TryGetValue(new
AssemblyIdentity
("a", new Version(1, 0, 0, 0)), out value));
31
Assert.True(map.Contains(new
AssemblyIdentity
("a", new Version(1, 1, 0, 0))));
32
Assert.True(map.TryGetValue(new
AssemblyIdentity
("a", new Version(1, 1, 0, 0)), out value));
35
Assert.True(map.Contains(new
AssemblyIdentity
("a", new Version(1, 0, 0, 0)), allowHigherVersion: false));
36
Assert.True(map.TryGetValue(new
AssemblyIdentity
("a", new Version(1, 0, 0, 0)), out value, allowHigherVersion: false));
39
Assert.False(map.Contains(new
AssemblyIdentity
("a", new Version(1, 1, 0, 0)), allowHigherVersion: false));
40
Assert.False(map.TryGetValue(new
AssemblyIdentity
("a", new Version(1, 1, 0, 0)), out value, allowHigherVersion: false));
43
Assert.False(map.Contains(new
AssemblyIdentity
("b", new Version(1, 1, 0, 0)), allowHigherVersion: true));
44
Assert.False(map.Contains(new
AssemblyIdentity
("b", new Version(1, 1, 0, 0)), allowHigherVersion: false));
47
Assert.True(map.TryGetValue(new
AssemblyIdentity
("b", new Version(1, 0, 0, 0)), out value));
MetadataReferences\AssemblyIdentityTests.cs (38)
22
var id1 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
23
var id11 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
24
var id2 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
25
var id22 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
27
var id3 = new
AssemblyIdentity
("Goo!", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
28
var id4 = new
AssemblyIdentity
("Goo", new Version(1, 0, 1, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
29
var id5 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "en-US", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
30
var id6 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", default(ImmutableArray<byte>), hasPublicKey: false, isRetargetable: false);
31
var id7 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: true);
33
var win1 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
34
var win2 = new
AssemblyIdentity
("Bar", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
35
var win3 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
67
var neutral1 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "NEUtral", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
68
var neutral2 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), null, RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
69
var neutral3 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "neutral", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
70
var invariant = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
143
var id = new
AssemblyIdentity
("Goo", hasPublicKey: false, isRetargetable: false);
154
id = new
AssemblyIdentity
("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, isRetargetable: false);
165
id = new
AssemblyIdentity
("Goo", publicKeyOrToken: RoPublicKeyToken1, hasPublicKey: false, isRetargetable: true);
176
id = new
AssemblyIdentity
("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, isRetargetable: true);
187
id = new
AssemblyIdentity
("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, contentType: AssemblyContentType.WindowsRuntime);
202
var id1 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
205
var id2 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
208
var id3 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: false, isRetargetable: false);
213
var id4 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
216
var id5 = new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
223
Assert.Throws<ArgumentException>(() => new
AssemblyIdentity
("xx\0xx"));
224
Assert.Throws<ArgumentException>(() => new
AssemblyIdentity
(""));
225
Assert.Throws<ArgumentException>(() => new
AssemblyIdentity
(null));
228
() => new
AssemblyIdentity
("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.Default));
244
Assert.Throws<ArgumentOutOfRangeException>(() => new
AssemblyIdentity
("Goo", v));
247
Assert.Throws<ArgumentOutOfRangeException>(() => new
AssemblyIdentity
("Goo", contentType: (AssemblyContentType)(-1)));
248
Assert.Throws<ArgumentOutOfRangeException>(() => new
AssemblyIdentity
("Goo", contentType: (AssemblyContentType)int.MaxValue));
251
new
AssemblyIdentity
("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, isRetargetable: true, contentType: AssemblyContentType.WindowsRuntime));
309
var ai = new
AssemblyIdentity
("goo");
322
ai = new
AssemblyIdentity
("goo", new Version(1, 2, 3, 4), "en-US", RoPublicKey1,
340
ai = new
AssemblyIdentity
(c.ToString());
358
var ai = new
AssemblyIdentity
("goo", cultureName: "*");
MetadataReferences\FusionAssemblyIdentityTests.cs (8)
89
RoundTrip(new
AssemblyIdentity
("goo").ToAssemblyName());
92
var name = new
AssemblyIdentity
("goo", version: new Version(0xffff, 0xffff, 0xffff, 0xffff)).ToAssemblyName();
98
RoundTrip(new
AssemblyIdentity
("goo", version: new Version(1, 2, 3, 4)).ToAssemblyName());
101
RoundTrip(new
AssemblyIdentity
("goo", cultureName: CultureInfo.CurrentCulture.Name).ToAssemblyName());
102
RoundTrip(new
AssemblyIdentity
("goo", cultureName: "").ToAssemblyName());
105
RoundTrip(new
AssemblyIdentity
("goo", version: new Version(1, 2, 3, 4), cultureName: "en-US").ToAssemblyName());
109
RoundTrip(new
AssemblyIdentity
("goo", isRetargetable: true).ToAssemblyName());
110
RoundTrip(new
AssemblyIdentity
("goo", contentType: AssemblyContentType.WindowsRuntime).ToAssemblyName());
MetadataReferences\ModuleMetadataTests.cs (9)
43
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
69
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
191
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
219
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
246
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
277
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
310
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
341
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
377
Assert.Equal(new
AssemblyIdentity
("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\MissingAssemblySymbol.vb (1)
210
MyBase.New(New
AssemblyIdentity
("<Missing Core Assembly>"))
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
198
New
AssemblyIdentity
(name:=originatingSourceAssemblyDebugOnly.Name),
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (40)
SymbolsTests\CompilationCreationTests.vb (29)
673
Dim varMTTestLib2_Name = New
AssemblyIdentity
("MTTestLib2")
689
Dim c2 = CreateEmptyCompilation(New
AssemblyIdentity
("c2"), Nothing,
718
Dim varMTTestLib3_Name = New
AssemblyIdentity
("MTTestLib3")
742
Dim c3 = CreateEmptyCompilation(New
AssemblyIdentity
("c3"), Nothing, {NetFramework.mscorlib, varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib1_V2.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference()})
792
Dim varMTTestLib4_Name = New
AssemblyIdentity
("MTTestLib4")
830
Dim c4 = CreateEmptyCompilation(New
AssemblyIdentity
("c4"),
902
Dim c5 = CreateEmptyCompilation(New
AssemblyIdentity
("c5"), Nothing, {NetFramework.mscorlib, varC_MTTestLib3.ToMetadataReference()})
906
Dim c6 = CreateEmptyCompilation(New
AssemblyIdentity
("c6"), Nothing, {NetFramework.mscorlib, varC_MTTestLib2.ToMetadataReference()})
910
Dim c7 = CreateEmptyCompilation(New
AssemblyIdentity
("c6"), Nothing, {NetFramework.mscorlib, varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference(), varC_MTTestLib4.ToMetadataReference()})
952
Dim c8 = CreateEmptyCompilation(New
AssemblyIdentity
("c8"), Nothing,
966
Dim c9 = CreateEmptyCompilation(New
AssemblyIdentity
("c9"), Nothing, {NetFramework.mscorlib, varC_MTTestLib4.ToMetadataReference()})
971
Dim c10 = CreateEmptyCompilation(New
AssemblyIdentity
("c10"), Nothing,
1146
Dim varMTTestLib2_Name = New
AssemblyIdentity
("MTTestLib2")
1154
Dim c2 = CreateEmptyCompilation(New
AssemblyIdentity
("c2"),
1177
Dim varMTTestLib3_Name = New
AssemblyIdentity
("MTTestLib3")
1192
Dim c3 = CreateEmptyCompilation(New
AssemblyIdentity
("c3"),
1236
Dim varMTTestLib4_Name = New
AssemblyIdentity
("MTTestLib4")
1254
Dim c4 = CreateEmptyCompilation(New
AssemblyIdentity
("c4"),
1328
Dim c5 = CreateEmptyCompilation(New
AssemblyIdentity
("c5"),
1338
Dim c6 = CreateEmptyCompilation(New
AssemblyIdentity
("c6"),
1348
Dim c7 = CreateEmptyCompilation(New
AssemblyIdentity
("c7"),
1404
Dim c8 = CreateEmptyCompilation(New
AssemblyIdentity
("c8"),
1426
Dim c9 = CreateEmptyCompilation(New
AssemblyIdentity
("c9"),
1436
Dim c10 = CreateEmptyCompilation(New
AssemblyIdentity
("c10"),
1689
Dim c7 As VisualBasicCompilation = CreateEmptyCompilation(New
AssemblyIdentity
("C7"),
1763
Dim c3 As VisualBasicCompilation = CreateEmptyCompilation(New
AssemblyIdentity
("C3"),
1781
Dim c5 As VisualBasicCompilation = CreateEmptyCompilation(New
AssemblyIdentity
("C5"),
1971
Dim c1_Name = New
AssemblyIdentity
("c1")
1997
Dim c2_Name = New
AssemblyIdentity
("MTTestLib2")
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (10)
428
Dim defaultName = New
AssemblyIdentity
("missing")
433
missingTypes1(3) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm1")).Modules(0), "", "test1", 0, True)
434
missingTypes1(4) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm1")).Modules(0), "", "test1", 1, True)
435
missingTypes1(5) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm1")).Modules(0), "", "test2", 0, True)
436
missingTypes1(6) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm2")).Modules(0), "", "test1", 0, True)
449
missingTypes2(3) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm1")).Modules(0), "", "test1", 0, True)
450
missingTypes2(4) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm1")).Modules(0), "", "test1", 1, True)
451
missingTypes2(5) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm1")).Modules(0), "", "test2", 0, True)
452
missingTypes2(6) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New
AssemblyIdentity
("asm2")).Modules(0), "", "test1", 0, True)
474
Dim missingAssembly = New MissingAssemblySymbol(New
AssemblyIdentity
("asm1"))
SymbolsTests\MockSymbolTests.vb (1)
45
Dim missingAssemblyName = New
AssemblyIdentity
("goo")
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
MockSymbols.vb (1)
781
Return New
AssemblyIdentity
(_name)
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
39
return new
AssemblyIdentity
(name, version, cultureName, publicKeyOrToken, hasPublicKey);