278 instantiations of AssemblyIdentity
Microsoft.CodeAnalysis (9)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp (3)
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)
664var comp1_1 = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
665var comp1_2 = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
712var comp1_1 = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
713var comp1_2 = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
773var comp1_1 = CreateCompilation(new AssemblyIdentity("Base", new Version(1, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
774var comp1_2 = CreateCompilation(new AssemblyIdentity("Base", new Version(2, 0, 0, 0), isRetargetable: true), source1, TargetFrameworkUtil.StandardReferences);
Semantics\CollectionExpressionTests.cs (2)
38820var comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(1, 0, 0, 0)), sourceA1, references: TargetFrameworkUtil.StandardReferences);
38843comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(2, 0, 0, 0)), sourceA2, references: TargetFrameworkUtil.StandardReferences);
Semantics\ExperimentalAttributeTests.cs (8)
924var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
925var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
961var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
962var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
989var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
990var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
1026var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
1027var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\NativeIntegerTests.cs (8)
845var comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
883comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(2, 0, 0, 0)), new[] { source2 }, references: null);
956var comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
1000comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(2, 0, 0, 0)), new[] { source2 }, references: null);
1049var comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(1, 0, 0, 0)), new[] { sourceA }, references: references);
1052comp = CreateCompilation(new AssemblyIdentity(assemblyName, new Version(2, 0, 0, 0)), new[] { sourceA }, references: references);
1137var comp = CreateCompilation(new AssemblyIdentity("9ef8b1e0-1ae0-4af6-b9a1-00f2078f299e", new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
1217var comp = CreateCompilation(new AssemblyIdentity("c804cc09-8f73-44a1-9cfe-9567bed1def6", new Version(1, 0, 0, 0)), new[] { source1 }, references: null);
Semantics\RefFieldTests.cs (4)
26590var assemblyIdentity = new AssemblyIdentity("System.Runtime", new System.Version(majorVersion, 0, 0, 0));
26647var assemblyIdentityLowerVersion = new AssemblyIdentity("System.Runtime", new System.Version(6, 0, 0, 0));
26651var assemblyIdentityHigherVersion = new AssemblyIdentity("System.Runtime", new System.Version(higherVersion, 0, 0, 0));
26715var assemblyIdentity = new AssemblyIdentity(assemblyName, new System.Version(majorVersion, minorVersion, 0, 0));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (67)
Symbols\CompilationCreationTests.cs (36)
683var varMTTestLib1_V1_Name = new AssemblyIdentity("MTTestLib1", new Version("1.0.0.0"));
698var varMTTestLib2_Name = new AssemblyIdentity("MTTestLib2");
723var c2 = CreateCompilation(new AssemblyIdentity("c2"),
755var varMTTestLib1_V2_Name = new AssemblyIdentity("MTTestLib1", new Version("2.0.0.0"));
774var varMTTestLib3_Name = new AssemblyIdentity("MTTestLib3");
816var c3 = CreateCompilation(new AssemblyIdentity("c3"),
877var varMTTestLib1_V3_Name = new AssemblyIdentity("MTTestLib1", new Version("3.0.0.0"));
900var varMTTestLib4_Name = new AssemblyIdentity("MTTestLib4");
952var c4 = CreateCompilation(new AssemblyIdentity("c4"),
1057var c5 = CreateCompilation(new AssemblyIdentity("c5"),
1066var c6 = CreateCompilation(new AssemblyIdentity("c6"),
1075var c7 = CreateCompilation(new AssemblyIdentity("c7"),
1143var c8 = CreateCompilation(new AssemblyIdentity("c8"),
1157var c9 = CreateCompilation(new AssemblyIdentity("c9"),
1166var c10 = CreateCompilation(new AssemblyIdentity("c10"),
1419var varMTTestLib2_Name = new AssemblyIdentity("MTTestLib2");
1430var c2 = CreateCompilation(new AssemblyIdentity("c2"),
1466var varMTTestLib3_Name = new AssemblyIdentity("MTTestLib3");
1485var c3 = CreateCompilation(new AssemblyIdentity("c3"),
1551var varMTTestLib4_Name = new AssemblyIdentity("MTTestLib4");
1573var c4 = CreateCompilation(new AssemblyIdentity("c4"),
1678var c5 = CreateCompilation(new AssemblyIdentity("c5"),
1690var c6 = CreateCompilation(new AssemblyIdentity("c6"),
1702var c7 = CreateCompilation(new AssemblyIdentity("c7"),
1779var c8 = CreateCompilation(new AssemblyIdentity("c8"),
1798var c9 = CreateCompilation(new AssemblyIdentity("c9"),
1810var c10 = CreateCompilation(new AssemblyIdentity("c10"),
2067var localC1_V1_Name = new AssemblyIdentity("c1", new Version("1.0.0.0"));
2089var localC1_V2_Name = new AssemblyIdentity("c1", new Version("2.0.0.0"));
2111var localC4_V1_Name = new AssemblyIdentity("c4", new Version("1.0.0.0"));
2126var localC4_V2_Name = new AssemblyIdentity("c4", new Version("2.0.0.0"));
2141var c7 = CreateCompilation(new AssemblyIdentity("C7"),
2156var c3 = CreateCompilation(new AssemblyIdentity("C3"),
2245var c5 = CreateCompilation(new AssemblyIdentity("C5"),
2534var c1_Name = new AssemblyIdentity("c1");
2556var c2_Name = new AssemblyIdentity("MTTestLib2");
Symbols\Metadata\PE\MissingTypeReferences.cs (10)
325var defaultName = new AssemblyIdentity("missing");
330missingTypes1[3] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm1")).Modules[0], "", "test1", 0, true);
331missingTypes1[4] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm1")).Modules[0], "", "test1", 1, true);
332missingTypes1[5] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm1")).Modules[0], "", "test2", 0, true);
333missingTypes1[6] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm2")).Modules[0], "", "test1", 0, true);
346missingTypes2[3] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm1")).Modules[0], "", "test1", 0, true);
347missingTypes2[4] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm1")).Modules[0], "", "test1", 1, true);
348missingTypes2[5] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm1")).Modules[0], "", "test2", 0, true);
349missingTypes2[6] = new MissingMetadataTypeSymbol.TopLevel(new MissingAssemblySymbol(new AssemblyIdentity("asm2")).Modules[0], "", "test1", 0, true);
376var missingAssembly = new MissingAssemblySymbol(new AssemblyIdentity("asm1"));
Symbols\RequiredMembersTests.cs (10)
2193var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2205var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2242var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2270var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2288var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2300var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2548var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2558var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2579var originalC = CreateCompilation(new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
2589var retargetedC = CreateCompilation(new AssemblyIdentity("Ret", new Version(2, 0, 0, 0), isRetargetable: true), retargetedCode, TargetFrameworkUtil.StandardReferences);
Symbols\Retargeting\RetargetingTests.cs (3)
933var retargetedIdentity = new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
1005var originalIdentity = new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
1083var originalIdentity = new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (6)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.UnitTests (111)
MetadataReferences\AssemblyIdentityDisplayNameTests.cs (40)
126var id = new AssemblyIdentity("goo");
129id = new AssemblyIdentity("goo", new Version(1, 2, 3, 4));
132id = new AssemblyIdentity("goo", cultureName: "en-US");
138id = new AssemblyIdentity("goo", isRetargetable: true);
141id = new AssemblyIdentity("goo", contentType: AssemblyContentType.WindowsRuntime);
144id = new AssemblyIdentity("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true);
153id = new AssemblyIdentity("Goo", cultureName: "neutral");
156id = new AssemblyIdentity("Goo", cultureName: " '\t\r\n\\=, ");
326var ai = new AssemblyIdentity(simpleName);
362new AssemblyIdentity("fo'o", new Version(1, 0, 0, 0), "zz-ZZ", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.Default),
375new AssemblyIdentity("goo"), N | AssemblyIdentityParts.Unknown);
383new AssemblyIdentity("goo", new Version(1, 0, 0, 0)), NVC);
386new AssemblyIdentity("goo", new Version(1, 0, 0, 0), "en-US", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: true),
390new AssemblyIdentity("goo", new Version(1, 0, 0, 1), publicKeyOrToken: RoPublicKey1, hasPublicKey: true),
394new AssemblyIdentity("Goo", cultureName: " '\t\r\n\\=, "),
424new AssemblyIdentity("goo", new Version(1, 0, 0, 0)), N | AssemblyIdentityParts.VersionMajor);
426TestParseDisplayName("goo, Version=.", new AssemblyIdentity("goo"), N);
427TestParseDisplayName("goo, Version=..", new AssemblyIdentity("goo"), N);
428TestParseDisplayName("goo, Version=...", new AssemblyIdentity("goo"), N);
431new AssemblyIdentity("goo", cultureName: "en-US"),
510new AssemblyIdentity("goo", new Version(1, 0, 0, 1), cultureName: "null"), NVC);
513new AssemblyIdentity("goo", new Version(1, 0, 0, 1), cultureName: "en-US"), NVC);
516new AssemblyIdentity("goo", new Version(1, 0, 0, 1), cultureName: "en-US"), NVC);
519new AssemblyIdentity("goo", new Version(1, 0, 0, 1), cultureName: "en-US"), NVC);
522new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NV);
524TestParseDisplayName("goo, Culture=*", new AssemblyIdentity("goo"), N);
529new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), cultureName: null), NVCT);
537new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NVT);
540new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NVT);
543new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NV);
549new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NV);
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);
580new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NV);
591new AssemblyIdentity("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKeyToken1, isRetargetable: true),
595new AssemblyIdentity("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKeyToken1),
599new AssemblyIdentity("goo", new Version(1, 0, 0, 0), publicKeyOrToken: RoPublicKeyToken1),
606new AssemblyIdentity("goo", new Version(1, 0, 0, 1)), NV);
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,
MetadataReferences\AssemblyIdentityMapTests.cs (16)
19map.Add(new AssemblyIdentity("a", new Version(1, 0, 0, 0)), 10);
20map.Add(new AssemblyIdentity("a", new Version(1, 8, 0, 0)), 18);
21map.Add(new AssemblyIdentity("a", new Version(1, 5, 0, 0)), 15);
23map.Add(new AssemblyIdentity("b", new Version(1, 0, 0, 0)), 10);
24map.Add(new AssemblyIdentity("b", new Version(1, 0, 0, 0)), 20);
27Assert.True(map.Contains(new AssemblyIdentity("a", new Version(1, 0, 0, 0))));
28Assert.True(map.TryGetValue(new AssemblyIdentity("a", new Version(1, 0, 0, 0)), out value));
31Assert.True(map.Contains(new AssemblyIdentity("a", new Version(1, 1, 0, 0))));
32Assert.True(map.TryGetValue(new AssemblyIdentity("a", new Version(1, 1, 0, 0)), out value));
35Assert.True(map.Contains(new AssemblyIdentity("a", new Version(1, 0, 0, 0)), allowHigherVersion: false));
36Assert.True(map.TryGetValue(new AssemblyIdentity("a", new Version(1, 0, 0, 0)), out value, allowHigherVersion: false));
39Assert.False(map.Contains(new AssemblyIdentity("a", new Version(1, 1, 0, 0)), allowHigherVersion: false));
40Assert.False(map.TryGetValue(new AssemblyIdentity("a", new Version(1, 1, 0, 0)), out value, allowHigherVersion: false));
43Assert.False(map.Contains(new AssemblyIdentity("b", new Version(1, 1, 0, 0)), allowHigherVersion: true));
44Assert.False(map.Contains(new AssemblyIdentity("b", new Version(1, 1, 0, 0)), allowHigherVersion: false));
47Assert.True(map.TryGetValue(new AssemblyIdentity("b", new Version(1, 0, 0, 0)), out value));
MetadataReferences\AssemblyIdentityTests.cs (38)
22var id1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
23var id11 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
24var id2 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
25var id22 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
27var id3 = new AssemblyIdentity("Goo!", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
28var id4 = new AssemblyIdentity("Goo", new Version(1, 0, 1, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
29var id5 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "en-US", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
30var id6 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", default(ImmutableArray<byte>), hasPublicKey: false, isRetargetable: false);
31var id7 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: true);
33var win1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
34var win2 = new AssemblyIdentity("Bar", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
35var win3 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
67var neutral1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "NEUtral", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
68var neutral2 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), null, RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
69var neutral3 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "neutral", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
70var invariant = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
143var id = new AssemblyIdentity("Goo", hasPublicKey: false, isRetargetable: false);
154id = new AssemblyIdentity("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, isRetargetable: false);
165id = new AssemblyIdentity("Goo", publicKeyOrToken: RoPublicKeyToken1, hasPublicKey: false, isRetargetable: true);
176id = new AssemblyIdentity("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, isRetargetable: true);
187id = new AssemblyIdentity("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, contentType: AssemblyContentType.WindowsRuntime);
202var id1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
205var id2 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
208var id3 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: false, isRetargetable: false);
213var id4 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
216var id5 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
223Assert.Throws<ArgumentException>(() => new AssemblyIdentity("xx\0xx"));
224Assert.Throws<ArgumentException>(() => new AssemblyIdentity(""));
225Assert.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));
244Assert.Throws<ArgumentOutOfRangeException>(() => new AssemblyIdentity("Goo", v));
247Assert.Throws<ArgumentOutOfRangeException>(() => new AssemblyIdentity("Goo", contentType: (AssemblyContentType)(-1)));
248Assert.Throws<ArgumentOutOfRangeException>(() => new AssemblyIdentity("Goo", contentType: (AssemblyContentType)int.MaxValue));
251new AssemblyIdentity("Goo", publicKeyOrToken: RoPublicKey1, hasPublicKey: true, isRetargetable: true, contentType: AssemblyContentType.WindowsRuntime));
309var ai = new AssemblyIdentity("goo");
322ai = new AssemblyIdentity("goo", new Version(1, 2, 3, 4), "en-US", RoPublicKey1,
340ai = new AssemblyIdentity(c.ToString());
358var ai = new AssemblyIdentity("goo", cultureName: "*");
MetadataReferences\FusionAssemblyIdentityTests.cs (8)
89RoundTrip(new AssemblyIdentity("goo").ToAssemblyName());
92var name = new AssemblyIdentity("goo", version: new Version(0xffff, 0xffff, 0xffff, 0xffff)).ToAssemblyName();
98RoundTrip(new AssemblyIdentity("goo", version: new Version(1, 2, 3, 4)).ToAssemblyName());
101RoundTrip(new AssemblyIdentity("goo", cultureName: CultureInfo.CurrentCulture.Name).ToAssemblyName());
102RoundTrip(new AssemblyIdentity("goo", cultureName: "").ToAssemblyName());
105RoundTrip(new AssemblyIdentity("goo", version: new Version(1, 2, 3, 4), cultureName: "en-US").ToAssemblyName());
109RoundTrip(new AssemblyIdentity("goo", isRetargetable: true).ToAssemblyName());
110RoundTrip(new AssemblyIdentity("goo", contentType: AssemblyContentType.WindowsRuntime).ToAssemblyName());
Microsoft.CodeAnalysis.VisualBasic (2)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (40)
SymbolsTests\CompilationCreationTests.vb (29)
673Dim varMTTestLib2_Name = New AssemblyIdentity("MTTestLib2")
689Dim c2 = CreateEmptyCompilation(New AssemblyIdentity("c2"), Nothing,
718Dim varMTTestLib3_Name = New AssemblyIdentity("MTTestLib3")
742Dim c3 = CreateEmptyCompilation(New AssemblyIdentity("c3"), Nothing, {NetFramework.mscorlib, varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib1_V2.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference()})
792Dim varMTTestLib4_Name = New AssemblyIdentity("MTTestLib4")
830Dim c4 = CreateEmptyCompilation(New AssemblyIdentity("c4"),
902Dim c5 = CreateEmptyCompilation(New AssemblyIdentity("c5"), Nothing, {NetFramework.mscorlib, varC_MTTestLib3.ToMetadataReference()})
906Dim c6 = CreateEmptyCompilation(New AssemblyIdentity("c6"), Nothing, {NetFramework.mscorlib, varC_MTTestLib2.ToMetadataReference()})
910Dim c7 = CreateEmptyCompilation(New AssemblyIdentity("c6"), Nothing, {NetFramework.mscorlib, varC_MTTestLib2.ToMetadataReference(), varC_MTTestLib3.ToMetadataReference(), varC_MTTestLib4.ToMetadataReference()})
952Dim c8 = CreateEmptyCompilation(New AssemblyIdentity("c8"), Nothing,
966Dim c9 = CreateEmptyCompilation(New AssemblyIdentity("c9"), Nothing, {NetFramework.mscorlib, varC_MTTestLib4.ToMetadataReference()})
971Dim c10 = CreateEmptyCompilation(New AssemblyIdentity("c10"), Nothing,
1146Dim varMTTestLib2_Name = New AssemblyIdentity("MTTestLib2")
1154Dim c2 = CreateEmptyCompilation(New AssemblyIdentity("c2"),
1177Dim varMTTestLib3_Name = New AssemblyIdentity("MTTestLib3")
1192Dim c3 = CreateEmptyCompilation(New AssemblyIdentity("c3"),
1236Dim varMTTestLib4_Name = New AssemblyIdentity("MTTestLib4")
1254Dim c4 = CreateEmptyCompilation(New AssemblyIdentity("c4"),
1328Dim c5 = CreateEmptyCompilation(New AssemblyIdentity("c5"),
1338Dim c6 = CreateEmptyCompilation(New AssemblyIdentity("c6"),
1348Dim c7 = CreateEmptyCompilation(New AssemblyIdentity("c7"),
1404Dim c8 = CreateEmptyCompilation(New AssemblyIdentity("c8"),
1426Dim c9 = CreateEmptyCompilation(New AssemblyIdentity("c9"),
1436Dim c10 = CreateEmptyCompilation(New AssemblyIdentity("c10"),
1689Dim c7 As VisualBasicCompilation = CreateEmptyCompilation(New AssemblyIdentity("C7"),
1763Dim c3 As VisualBasicCompilation = CreateEmptyCompilation(New AssemblyIdentity("C3"),
1781Dim c5 As VisualBasicCompilation = CreateEmptyCompilation(New AssemblyIdentity("C5"),
1971Dim c1_Name = New AssemblyIdentity("c1")
1997Dim c2_Name = New AssemblyIdentity("MTTestLib2")
SymbolsTests\Metadata\PE\MissingTypeReferences.vb (10)
428Dim defaultName = New AssemblyIdentity("missing")
433missingTypes1(3) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm1")).Modules(0), "", "test1", 0, True)
434missingTypes1(4) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm1")).Modules(0), "", "test1", 1, True)
435missingTypes1(5) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm1")).Modules(0), "", "test2", 0, True)
436missingTypes1(6) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm2")).Modules(0), "", "test1", 0, True)
449missingTypes2(3) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm1")).Modules(0), "", "test1", 0, True)
450missingTypes2(4) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm1")).Modules(0), "", "test1", 1, True)
451missingTypes2(5) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm1")).Modules(0), "", "test2", 0, True)
452missingTypes2(6) = New MissingMetadataTypeSymbol.TopLevel(New MissingAssemblySymbol(New AssemblyIdentity("asm2")).Modules(0), "", "test1", 0, True)
474Dim missingAssembly = New MissingAssemblySymbol(New AssemblyIdentity("asm1"))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces (1)
613 references to AssemblyIdentity
Microsoft.CodeAnalysis (204)
Diagnostic\CommonMessageProvider.cs (4)
210public abstract void ReportDuplicateMetadataReferenceStrong(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity);
211public abstract void ReportDuplicateMetadataReferenceWeak(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity);
MetadataReference\AssemblyIdentity.DisplayName.cs (6)
155public static bool TryParseDisplayName(string displayName, [NotNullWhen(true)] out AssemblyIdentity? identity)
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)
MetadataReference\AssemblyIdentityComparer.cs (16)
33/// A set of possible outcomes of <see cref="AssemblyIdentity"/> comparison.
60public bool ReferenceMatchesDefinition(string referenceDisplayName, AssemblyIdentity definition)
71public bool ReferenceMatchesDefinition(AssemblyIdentity reference, AssemblyIdentity definition)
81public ComparisonResult Compare(AssemblyIdentity reference, AssemblyIdentity definition)
87internal ComparisonResult Compare(AssemblyIdentity? reference, string? referenceDisplayName, AssemblyIdentity definition, out bool unificationApplied, bool ignoreVersion)
106if (!AssemblyIdentity.TryParseDisplayName(referenceDisplayName!, out reference, out parts) ||
136if (!AssemblyIdentity.IsFullName(parts))
166if (comparePublicKeyToken && !AssemblyIdentity.KeysEqual(reference, definition))
205private static bool? TriviallyEquivalent(AssemblyIdentity x, AssemblyIdentity y)
219return AssemblyIdentity.MemberwiseEqual(x, y);
222internal virtual bool ApplyUnificationPolicies(ref AssemblyIdentity reference, ref AssemblyIdentity definition, AssemblyIdentityParts referenceParts, out bool isDefinitionFxAssembly)
MetadataReference\AssemblyIdentityMap.cs (13)
20private readonly Dictionary<string, OneOrMany<KeyValuePair<AssemblyIdentity, TValue>>> _map;
24_map = new Dictionary<string, OneOrMany<KeyValuePair<AssemblyIdentity, TValue>>>(AssemblyIdentityComparer.SimpleNameComparer);
27public bool Contains(AssemblyIdentity identity, bool allowHigherVersion = true)
33public bool TryGetValue(AssemblyIdentity identity, out TValue value, bool allowHigherVersion = true)
35OneOrMany<KeyValuePair<AssemblyIdentity, TValue>> sameName;
42AssemblyIdentity currentIdentity = sameName[i].Key;
44if (AssemblyIdentity.EqualIgnoringNameAndVersion(currentIdentity, identity))
76public bool TryGetValue(AssemblyIdentity identity, out TValue value, Func<Version, Version, TValue, bool> comparer)
78OneOrMany<KeyValuePair<AssemblyIdentity, TValue>> sameName;
83AssemblyIdentity currentIdentity = sameName[i].Key;
86AssemblyIdentity.EqualIgnoringNameAndVersion(currentIdentity, identity))
98public void Add(AssemblyIdentity identity, TValue value)
102OneOrMany<KeyValuePair<AssemblyIdentity, TValue>> sameName;
ReferenceManager\CommonReferenceManager.Binding.cs (9)
105ref ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions,
222ref ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions,
235var resolutionFailures = PooledHashSet<AssemblyIdentity>.GetInstance();
272out AssemblyIdentity? resolvedAssemblyIdentity,
313foreach (var assemblyIdentity in resolutionFailures)
526AssemblyIdentity referenceIdentity,
527ref ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions,
530[NotNullWhen(true)] out AssemblyIdentity? resolvedAssemblyIdentity,
985private static bool IsSuperseded(AssemblyIdentity identity, IReadOnlyDictionary<string, List<ReferencedAssemblyIdentity>> assemblyReferencesBySimpleName)
ReferenceManager\CommonReferenceManager.State.cs (17)
48internal abstract ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> ImplicitReferenceResolutions { get; }
126/// For each such assembly identity <see cref="MetadataReferenceResolver.ResolveMissingAssembly(MetadataReference, AssemblyIdentity)"/> is called
132private ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?>? _lazyImplicitReferenceResolutions;
259internal override ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> ImplicitReferenceResolutions
414ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?> implicitReferenceResolutions,
542internal static ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> GetAssemblyReferenceIdentityBaselineMap(ImmutableArray<TAssemblySymbol> symbols, ImmutableArray<AssemblyIdentity> originalIdentities)
546ImmutableDictionary<AssemblyIdentity, AssemblyIdentity>.Builder? lazyBuilder = null;
549var symbolIdentity = symbols[i].Identity;
551var originalIdentity = originalIdentities[i];
557lazyBuilder = lazyBuilder ?? ImmutableDictionary.CreateBuilder<AssemblyIdentity, AssemblyIdentity>();
559var sourceIdentity = symbolIdentity.WithVersion(versionPattern);
576return lazyBuilder?.ToImmutable() ?? ImmutableDictionary<AssemblyIdentity, AssemblyIdentity>.Empty;
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp (72)
Errors\MessageProvider.cs (4)
205public override void ReportDuplicateMetadataReferenceStrong(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity)
212public override void ReportDuplicateMetadataReferenceWeak(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity)
Symbols\ReferenceManager.cs (26)
119protected override bool WeakIdentityPropertiesEquivalent(AssemblyIdentity identity1, AssemblyIdentity identity2)
247public PEAssemblySymbol CreatePEAssemblyForAssemblyMetadata(AssemblyMetadata metadata, MetadataImportOptions importOptions, out ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap)
281private static AssemblySymbol MapAssemblyIdentityToResolvedSymbol(AssemblyIdentity identity, AssemblyIdentityMap<AssemblySymbol> map)
380ImmutableDictionary<AssemblyIdentity, PortableExecutableReference?>.Empty;
458Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies = null;
542Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies)
643ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies,
655ImmutableArray<AssemblyIdentity> referencedAssemblies =
675var filteredReferencedAssemblies = new AssemblyIdentity[referencedAssemblies.Length - linkedUnderlyingReferences];
720ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies,
734var identities = new AssemblyIdentity[moduleReferenceCount];
765ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies,
778var identities = new AssemblyIdentity[refsCount];
843AssemblyIdentity assemblyIdentity,
844ref Dictionary<AssemblyIdentity, MissingAssemblySymbol>? missingAssemblies)
850missingAssemblies = new Dictionary<AssemblyIdentity, MissingAssemblySymbol>();
866private readonly AssemblyIdentity _identity;
867private readonly ImmutableArray<AssemblyIdentity> _referencedAssemblies;
871AssemblyIdentity identity,
872ImmutableArray<AssemblyIdentity> referencedAssemblies,
885public override AssemblyIdentity Identity
915public override ImmutableArray<AssemblyIdentity> AssemblyReferences
1094private static ImmutableArray<AssemblyIdentity> GetReferencedAssemblies(CSharpCompilation compilation)
1114var result = ArrayBuilder<AssemblyIdentity>.GetInstance(builderSize);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (7)
Semantics\RefFieldTests.cs (4)
26590var assemblyIdentity = new AssemblyIdentity("System.Runtime", new System.Version(majorVersion, 0, 0, 0));
26647var assemblyIdentityLowerVersion = new AssemblyIdentity("System.Runtime", new System.Version(6, 0, 0, 0));
26651var assemblyIdentityHigherVersion = new AssemblyIdentity("System.Runtime", new System.Version(higherVersion, 0, 0, 0));
26715var assemblyIdentity = new AssemblyIdentity(assemblyName, new System.Version(majorVersion, minorVersion, 0, 0));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (24)
Symbols\Retargeting\RetargetingTests.cs (4)
933var retargetedIdentity = new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
989AssemblyIdentity assemblyIdentity = comp.Assembly.Identity;
1005var originalIdentity = new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
1083var originalIdentity = new AssemblyIdentity("Ret", new Version(1, 0, 0, 0), isRetargetable: true);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (48)
EEMetadataReferenceResolver.cs (13)
14private readonly IReadOnlyDictionary<string, ImmutableArray<(AssemblyIdentity Identity, MetadataReference Reference)>> _referencesBySimpleName;
17internal readonly Dictionary<AssemblyIdentity, (AssemblyIdentity? Identity, int Count)> Requests =
18new Dictionary<AssemblyIdentity, (AssemblyIdentity? Identity, int Count)>();
23IReadOnlyDictionary<string, ImmutableArray<(AssemblyIdentity Identity, MetadataReference Reference)>> referencesBySimpleName)
31public override PortableExecutableReference? ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity)
33(AssemblyIdentity? Identity, MetadataReference? Reference) result = default;
57private (AssemblyIdentity? Identity, MetadataReference? Reference) GetBestMatch(
58ImmutableArray<(AssemblyIdentity Identity, MetadataReference Reference)> references,
59AssemblyIdentity referenceIdentity)
61(AssemblyIdentity? Identity, MetadataReference? Reference) best = default;
64var identity = pair.Identity;
Microsoft.CodeAnalysis.Features (17)
Microsoft.CodeAnalysis.Scripting (45)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (8)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (23)
Mocks\TestMessageProvider.cs (4)
258public override void ReportDuplicateMetadataReferenceStrong(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity)
263public override void ReportDuplicateMetadataReferenceWeak(DiagnosticBag diagnostics, Location location, MetadataReference reference, AssemblyIdentity identity, MetadataReference equivalentReference, AssemblyIdentity equivalentIdentity)
Microsoft.CodeAnalysis.UnitTests (67)
MetadataReferences\AssemblyIdentityDisplayNameTests.cs (21)
27Assert.False(AssemblyIdentity.TryParseVersion(value, out actual, out actualParts));
45Assert.True(AssemblyIdentity.TryParseVersion(value, out actual, out actualParts));
48Version actualVersion = AssemblyIdentity.ToVersion(actual);
76var fusion = FusionAssemblyIdentity.ToAssemblyIdentity(FusionAssemblyIdentity.ToAssemblyNameObject(displayName));
78AssemblyIdentity id = null;
79bool success = AssemblyIdentity.TryParseDisplayName(displayName, out id);
100AssemblyIdentity id;
101actual = AssemblyIdentity.TryParseDisplayName(displayName, out id) ? id.Name : null;
105private void TestParseDisplayName(string displayName, AssemblyIdentity expected, AssemblyIdentityParts expectedParts = 0)
110private void TestParseDisplayName(string displayName, AssemblyIdentity expected, AssemblyIdentityParts expectedParts, AssemblyIdentity expectedFusion)
112var fusion = FusionAssemblyIdentity.ToAssemblyIdentity(FusionAssemblyIdentity.ToAssemblyNameObject(displayName));
115AssemblyIdentity id = null;
117bool success = AssemblyIdentity.TryParseDisplayName(displayName, out id, out actualParts);
126var id = new AssemblyIdentity("goo");
326var ai = new AssemblyIdentity(simpleName);
366AssemblyIdentity id;
367Assert.Throws<ArgumentNullException>(() => AssemblyIdentity.TryParseDisplayName(null, out id));
379AssemblyIdentity.TryParseDisplayName("goo, Version=1.0.0.0, Culture=en-US, Retargetable=Yes, ContentType=WindowsRuntime, PublicKeyToken=" + StrPublicKeyToken1, out id));
407var identity = new AssemblyIdentity(noThrow: true, name: "");
410Assert.False(AssemblyIdentity.TryParseDisplayName(name, out _));
MetadataReferences\AssemblyIdentityTests.cs (34)
22var id1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
23var id11 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
24var id2 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
25var id22 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
27var id3 = new AssemblyIdentity("Goo!", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
28var id4 = new AssemblyIdentity("Goo", new Version(1, 0, 1, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
29var id5 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "en-US", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
30var id6 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", default(ImmutableArray<byte>), hasPublicKey: false, isRetargetable: false);
31var id7 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: true);
33var win1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
34var win2 = new AssemblyIdentity("Bar", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
35var win3 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
53Assert.False(id2.Equals((AssemblyIdentity)null));
67var neutral1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "NEUtral", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
68var neutral2 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), null, RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
69var neutral3 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "neutral", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
70var invariant = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
81Assert.Throws<ArgumentNullException>(() => { AssemblyIdentity.FromAssemblyDefinition(asm); });
97var id = AssemblyIdentity.FromAssemblyDefinition(name);
109id = AssemblyIdentity.FromAssemblyDefinition(name);
119id = AssemblyIdentity.FromAssemblyDefinition(name);
136var id = AssemblyIdentity.FromAssemblyDefinition(name);
143var id = new AssemblyIdentity("Goo", hasPublicKey: false, isRetargetable: false);
202var id1 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKey1, hasPublicKey: true, isRetargetable: false);
205var id2 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false);
208var id3 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: false, isRetargetable: false);
213var id4 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", ImmutableArray<byte>.Empty, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
216var id5 = new AssemblyIdentity("Goo", new Version(1, 0, 0, 0), "", RoPublicKeyToken1, hasPublicKey: false, isRetargetable: false, contentType: AssemblyContentType.WindowsRuntime);
257var id = new AssemblyIdentity(/*noThrow:*/true, "Goo", new Version(1, 2, 3, 4), "en-US", RoPublicKey1,
309var ai = new AssemblyIdentity("goo");
358var ai = new AssemblyIdentity("goo", cultureName: "*");
370var aiPkt = AssemblyIdentity.CalculatePublicKeyToken(RoPublicKey1);
Microsoft.CodeAnalysis.VisualBasic (61)
Errors\MessageProvider.vb (4)
386Public Overrides Sub ReportDuplicateMetadataReferenceStrong(diagnostics As DiagnosticBag, location As Location, reference As MetadataReference, identity As AssemblyIdentity, equivalentReference As MetadataReference, equivalentIdentity As AssemblyIdentity)
393Public Overrides Sub ReportDuplicateMetadataReferenceWeak(diagnostics As DiagnosticBag, location As Location, reference As MetadataReference, identity As AssemblyIdentity, equivalentReference As MetadataReference, equivalentIdentity As AssemblyIdentity)
Symbols\ReferenceManager.vb (27)
129Protected Overrides Function WeakIdentityPropertiesEquivalent(identity1 As AssemblyIdentity, identity2 As AssemblyIdentity) As Boolean
209Friend Function CreatePEAssemblyForAssemblyMetadata(metadata As AssemblyMetadata, importOptions As MetadataImportOptions, <Out> ByRef assemblyReferenceIdentityMap As ImmutableDictionary(Of AssemblyIdentity, AssemblyIdentity)) As PEAssemblySymbol
239Private Shared Function MapAssemblyIdentityToResolvedSymbol(identity As AssemblyIdentity, map As AssemblyIdentityMap(Of AssemblySymbol)) As AssemblySymbol
328ImmutableDictionary(Of AssemblyIdentity, PortableExecutableReference).Empty)
398Dim missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol) = Nothing
473missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol))
549ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol),
558Dim referencedAssemblies As ImmutableArray(Of AssemblyIdentity) = retargetingAssemblySymbol.UnderlyingAssembly.Modules(j).GetReferencedAssemblies()
574Dim filteredReferencedAssemblies As AssemblyIdentity() =
575New AssemblyIdentity(referencedAssemblies.Length - linkedUnderlyingReferences - 1) {}
615ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol),
626Dim names(refsCount - 1) As AssemblyIdentity
654ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol),
666Dim identities(refsCount - 1) As AssemblyIdentity
717identity As AssemblyIdentity,
718ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol)
723missingAssemblies = New Dictionary(Of AssemblyIdentity, MissingAssemblySymbol)()
738Private ReadOnly _identity As AssemblyIdentity
739Private ReadOnly _referencedAssemblies As ImmutableArray(Of AssemblyIdentity)
742Protected Sub New(identity As AssemblyIdentity,
743referencedAssemblies As ImmutableArray(Of AssemblyIdentity),
756Public Overrides ReadOnly Property Identity As AssemblyIdentity
781Public Overrides ReadOnly Property AssemblyReferences As ImmutableArray(Of AssemblyIdentity)
941Private Shared Function GetReferencedAssemblies(compilation As VisualBasicCompilation) As ImmutableArray(Of AssemblyIdentity)
943Dim refs = ArrayBuilder(Of AssemblyIdentity).GetInstance()
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (11)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.VisualStudio.LanguageServices (5)