278 instantiations of AssemblyIdentity
Microsoft.CodeAnalysis (9)
Desktop\DesktopAssemblyIdentityComparer.cs (2)
232return new AssemblyIdentity( 294return new AssemblyIdentity(
Emit\ErrorType.cs (1)
215private static readonly AssemblyIdentity s_identity = new AssemblyIdentity(
MetadataReader\MetadataReaderExtensions.cs (1)
155return new AssemblyIdentity(
MetadataReference\AssemblyIdentity.cs (3)
74internal AssemblyIdentity WithVersion(Version version) => (version == _version) ? this : new AssemblyIdentity(this, version); 539return new AssemblyIdentity( 552return new AssemblyIdentity(
MetadataReference\AssemblyIdentity.DisplayName.cs (1)
434identity = new AssemblyIdentity(simpleName, version, culture, hasPublicKey ? publicKey : publicKeyToken, hasPublicKey, isRetargetable, contentType);
MetadataReference\AssemblyIdentityUtils.cs (1)
39return new AssemblyIdentity(name, version, cultureName, publicKeyOrToken, hasPublicKey);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
39return 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)
213new 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)
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\InheritanceBindingTests.cs (2)
2995var comp11 = CreateCompilation(new AssemblyIdentity("lib1", new Version("4.2.1.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true), 2998var comp12 = CreateCompilation(new AssemblyIdentity("lib1", new Version("4.1.0.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true),
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\GenericConstraintTests.cs (2)
7326new AssemblyIdentity("remapped", new Version("1.0.0.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true), 7332new AssemblyIdentity("remapped", new Version("2.0.0.0"), publicKeyOrToken: SigningTestHelpers.PublicKey, hasPublicKey: true),
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\MockAssemblySymbol.cs (1)
28get { return new AssemblyIdentity(_name); }
Symbols\MockSymbolTests.cs (1)
66AssemblyIdentity missingAssemblyId = new AssemblyIdentity("goo");
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\RetargetExplicitInterfaceImplementation.cs (4)
24new AssemblyIdentity("Assembly1"), 105new AssemblyIdentity("Assembly2"), 318new AssemblyIdentity("Assembly1"), 363new AssemblyIdentity("Assembly2"),
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)
EvaluationContextBase.cs (6)
21internal static readonly AssemblyIdentity SystemIdentity = new AssemblyIdentity("System"); 22internal static readonly AssemblyIdentity SystemCoreIdentity = new AssemblyIdentity("System.Core"); 23internal static readonly AssemblyIdentity SystemLinqIdentity = new AssemblyIdentity("System.Linq"); 24internal static readonly AssemblyIdentity SystemXmlIdentity = new AssemblyIdentity("System.Xml"); 25internal static readonly AssemblyIdentity SystemXmlLinqIdentity = new AssemblyIdentity("System.Xml.Linq"); 26internal static readonly AssemblyIdentity MicrosoftVisualBasicIdentity = new AssemblyIdentity("Microsoft.VisualBasic");
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
129var assemblyIdentity = new AssemblyIdentity(
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());
MetadataReferences\ModuleMetadataTests.cs (9)
43Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 69Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 191Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 219Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 246Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 277Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 310Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 341Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow()); 377Assert.Equal(new AssemblyIdentity("Members"), metadata.Module.ReadAssemblyIdentityOrThrow());
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\MissingAssemblySymbol.vb (1)
210MyBase.New(New AssemblyIdentity("<Missing Core Assembly>"))
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
198New AssemblyIdentity(name:=originatingSourceAssemblyDebugOnly.Name),
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"))
SymbolsTests\MockSymbolTests.vb (1)
45Dim missingAssemblyName = New AssemblyIdentity("goo")
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
MockSymbols.vb (1)
777Return New AssemblyIdentity(_name)
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
39return new AssemblyIdentity(name, version, cultureName, publicKeyOrToken, hasPublicKey);
613 references to AssemblyIdentity
Microsoft.CodeAnalysis (204)
AssemblyUtilities.cs (9)
60public static ImmutableArray<AssemblyIdentity> IdentifyMissingDependencies(string assemblyPath, IEnumerable<string> dependencyFilePaths) 65HashSet<AssemblyIdentity> assemblyDefinitions = new HashSet<AssemblyIdentity>(); 71var assemblyDefinition = metadataReader.ReadAssemblyIdentityOrThrow(); 77HashSet<AssemblyIdentity> assemblyReferences = new HashSet<AssemblyIdentity>(); 93/// Given a path to an assembly, returns the <see cref="AssemblyIdentity"/> for the assembly. 98public static AssemblyIdentity GetAssemblyIdentity(string assemblyPath) 105var assemblyIdentity = metadataReader.ReadAssemblyIdentityOrThrow();
CommandLine\CommonCompiler.cs (1)
646foreach (var key in assemblyInternal.GetInternalsVisibleToPublicKeys(simpleName).Select(k => AssemblyIdentity.PublicKeyToString(k)).OrderBy(k => k))
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (4)
26private readonly Lazy<HashSet<AssemblyIdentity>> _lazyAvailableReferences; 37_lazyAvailableReferences = new Lazy<HashSet<AssemblyIdentity>>(() => new HashSet<AssemblyIdentity>( 50private static AssemblyIdentity? TryGetIdentity(MetadataReference metadataReference)
Compilation\Compilation.cs (7)
918public abstract IEnumerable<AssemblyIdentity> ReferencedAssemblyNames { get; } 3764/// Given a <see cref="Diagnostic"/> reporting unreferenced <see cref="AssemblyIdentity"/>s, returns 3765/// the actual <see cref="AssemblyIdentity"/> instances that were not referenced. 3767public ImmutableArray<AssemblyIdentity> GetUnreferencedAssemblyIdentities(Diagnostic diagnostic) 3776return ImmutableArray<AssemblyIdentity>.Empty; 3779using var builder = TemporaryArray<AssemblyIdentity>.Empty; 3782if (argument is AssemblyIdentity id)
Desktop\DesktopAssemblyIdentityComparer.cs (13)
81ref AssemblyIdentity reference, 82ref AssemblyIdentity definition, 114if (!AssemblyIdentity.IsFullName(referenceParts)) 123AssemblyIdentity.KeysEqual(reference, definition); 155private static bool IsFrameworkAssembly(AssemblyIdentity identity) 180private static bool IsRetargetableAssembly(AssemblyIdentity identity) 187private static bool IsOptionallyRetargetableAssembly(AssemblyIdentity identity) 199private static bool IsTriviallyNonRetargetable(AssemblyIdentity identity) 208private static void IsRetargetableAssembly(AssemblyIdentity identity, out bool retargetable, out bool portable) 222private static AssemblyIdentity Retarget(AssemblyIdentity identity) 245private AssemblyIdentity Port(AssemblyIdentity identity)
Desktop\DesktopAssemblyIdentityComparer.Fx.cs (1)
149public bool TryGetValue(AssemblyIdentity identity, out Value value)
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);
Diagnostic\DiagnosticInfo.cs (1)
109if (type == typeof(string) || type == typeof(AssemblyIdentity))
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
173var assemblyIdentity = metadataReader.ReadAssemblyIdentityOrThrow();
Emit\EditAndContinue\DeltaMetadataWriter.cs (4)
62private readonly HeapOrReferenceIndex<AssemblyIdentity> _assemblyRefIndex; 123_assemblyRefIndex = new HeapOrReferenceIndex<AssemblyIdentity>(this, lastRowId: sizes[(int)TableIndex.AssemblyRef]); 402var identity = reference.Identity; 414protected override IReadOnlyList<AssemblyIdentity> GetAssemblyRefs()
Emit\EditAndContinue\EmitBaseline.cs (4)
70ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap) 79public readonly ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> AssemblyReferenceIdentityMap = assemblyReferenceIdentityMap;
Emit\ErrorType.cs (3)
215private static readonly AssemblyIdentity s_identity = new AssemblyIdentity( 217version: AssemblyIdentity.NullVersion, 224AssemblyIdentity Cci.IAssemblyReference.Identity => s_identity;
IVTConclusion.cs (1)
10/// The result of <see cref="ISymbolExtensions.PerformIVTCheck(AssemblyIdentity, ImmutableArray{byte}, ImmutableArray{byte})"/>
MetadataReader\MetadataDecoder.cs (3)
124private readonly AssemblyIdentity _containingAssemblyIdentity; 126internal MetadataDecoder(PEModule module, AssemblyIdentity containingAssemblyIdentity, SymbolFactory<ModuleSymbol, TypeSymbol> factory, ModuleSymbol moduleSymbol) : 2119protected override bool IsContainingAssembly(AssemblyIdentity identity)
MetadataReader\MetadataReaderExtensions.cs (5)
43internal static AssemblyIdentity ReadAssemblyIdentityOrThrow(this MetadataReader reader) 62internal static ImmutableArray<AssemblyIdentity> GetReferencedAssembliesOrThrow(this MetadataReader reader) 64var result = ArrayBuilder<AssemblyIdentity>.GetInstance(reader.AssemblyReferences.Count); 94private static AssemblyIdentity CreateAssemblyIdentityOrThrow( 131publicKeyOrToken.Length != AssemblyIdentity.PublicKeyTokenSize)
MetadataReader\PEAssembly.cs (7)
26internal readonly ImmutableArray<AssemblyIdentity> AssemblyReferences; 38private readonly AssemblyIdentity _identity; 69var refs = ArrayBuilder<AssemblyIdentity>.GetInstance(totalRefCount); 73ImmutableArray<AssemblyIdentity> refsForModule = modules[i].ReferencedAssemblies; 105internal AssemblyIdentity Identity 137AssemblyIdentity identity; 138if (AssemblyIdentity.TryParseDisplayName(attrVal, out identity))
MetadataReader\PEModule.cs (4)
47private ImmutableArray<AssemblyIdentity> _lazyAssemblyReferences; 163_lazyAssemblyReferences = ImmutableArray<AssemblyIdentity>.Empty; 464public ImmutableArray<AssemblyIdentity> ReferencedAssemblies 510internal AssemblyIdentity ReadAssemblyIdentityOrThrow()
MetadataReader\TypeNameDecoder.cs (4)
28protected abstract bool IsContainingAssembly(AssemblyIdentity identity); 46protected abstract int GetIndexOfReferencedAssembly(AssemblyIdentity identity); 130AssemblyIdentity identity; 131if (!AssemblyIdentity.TryParseDisplayName(fullName.AssemblyName, out identity))
MetadataReference\AssemblyIdentity.cs (22)
24public sealed partial class AssemblyIdentity : IEquatable<AssemblyIdentity> 57private AssemblyIdentity(AssemblyIdentity other, Version version) 74internal AssemblyIdentity WithVersion(Version version) => (version == _version) ? this : new AssemblyIdentity(this, version); 77/// Constructs an <see cref="AssemblyIdentity"/> from its constituent parts. 366/// Determines whether two <see cref="AssemblyIdentity"/> instances are equal. 370public static bool operator ==(AssemblyIdentity? left, AssemblyIdentity? right) 372return EqualityComparer<AssemblyIdentity>.Default.Equals(left, right); 376/// Determines whether two <see cref="AssemblyIdentity"/> instances are not equal. 380public static bool operator !=(AssemblyIdentity? left, AssemblyIdentity? right) 389public bool Equals(AssemblyIdentity? obj) 402return Equals(obj as AssemblyIdentity); 455internal static bool? MemberwiseEqual(AssemblyIdentity x, AssemblyIdentity y) 475internal static bool EqualIgnoringNameAndVersion(AssemblyIdentity x, AssemblyIdentity y) 484internal static bool KeysEqual(AssemblyIdentity x, AssemblyIdentity y) 522public static AssemblyIdentity FromAssemblyDefinition(Assembly assembly) 533internal static AssemblyIdentity FromAssemblyDefinition(AssemblyName name) 549internal static AssemblyIdentity FromAssemblyReference(AssemblyName name)
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\AssemblyIdentityExtensions.cs (2)
15internal static bool IsWindowsComponent(this AssemblyIdentity identity) 24internal static bool IsWindowsRuntime(this AssemblyIdentity identity)
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;
MetadataReference\AssemblyIdentityUtils.cs (1)
16public static AssemblyIdentity? TryGetAssemblyIdentity(string filePath)
MetadataReference\MetadataReferenceResolver.cs (2)
20/// True to instruct the compiler to invoke <see cref="ResolveMissingAssembly(MetadataReference, AssemblyIdentity)"/> for each assembly reference that 31public virtual PortableExecutableReference? ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity) => null;
PEWriter\FullMetadataWriter.cs (3)
32private readonly HeapOrReferenceIndex<AssemblyIdentity> _assemblyRefIndex; 105_assemblyRefIndex = new HeapOrReferenceIndex<AssemblyIdentity>(this); 240protected override IReadOnlyList<AssemblyIdentity> GetAssemblyRefs()
PEWriter\MetadataWriter.cs (3)
290protected abstract IReadOnlyList<AssemblyIdentity> GetAssemblyRefs(); 1958foreach (var identity in assemblyRefs) 3697var identity = assemblyReference.Identity;
PEWriter\Units.cs (1)
22AssemblyIdentity Identity { get; }
ReferenceManager\AssemblyData.cs (2)
23public abstract AssemblyIdentity Identity { get; } 29public abstract ImmutableArray<AssemblyIdentity> AssemblyReferences { get; }
ReferenceManager\AssemblyDataForAssemblyBeingBuilt.cs (6)
18private readonly AssemblyIdentity _assemblyIdentity; 24private readonly ImmutableArray<AssemblyIdentity> _referencedAssemblies; 27AssemblyIdentity identity, 40var refs = ArrayBuilder<AssemblyIdentity>.GetInstance(builderSize); 56public override AssemblyIdentity Identity 64public override ImmutableArray<AssemblyIdentity> AssemblyReferences
ReferenceManager\AssemblyReferenceBinding.cs (4)
18private readonly AssemblyIdentity? _referenceIdentity; 25public AssemblyReferenceBinding(AssemblyIdentity referenceIdentity) 37public AssemblyReferenceBinding(AssemblyIdentity referenceIdentity, int definitionIndex, int versionDifference = 0) 96internal AssemblyIdentity? ReferenceIdentity
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.Resolution.cs (10)
54protected abstract bool WeakIdentityPropertiesEquivalent(AssemblyIdentity identity1, AssemblyIdentity identity2); 173public readonly AssemblyIdentity? Identity; 185public ReferencedAssemblyIdentity(AssemblyIdentity identity, MetadataReference reference, int relativeAssemblyIndex) 664AssemblyIdentity identity, 892ImmutableArray<AssemblyIdentity> references, 917AssemblyIdentity reference, 940AssemblyIdentity definition = definitionData.Identity; 1030var definition = definitionData.Identity; 1037AssemblyIdentity.KeysEqual(reference, definition))
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;
ReferenceManager\ModuleReferences.cs (2)
24public readonly ImmutableArray<AssemblyIdentity> Identities; 42ImmutableArray<AssemblyIdentity> identities,
ReferenceManager\UnifiedAssembly.cs (2)
23internal readonly AssemblyIdentity OriginalReference; 27public UnifiedAssembly(TAssemblySymbol targetAssembly, AssemblyIdentity originalReference)
Symbols\IAssemblySymbol.cs (1)
28AssemblyIdentity Identity { get; }
Symbols\IAssemblySymbolInternal.cs (1)
18AssemblyIdentity Identity { get; }
Symbols\IModuleSymbol.cs (1)
35ImmutableArray<AssemblyIdentity> ReferencedAssemblies { get; }
Symbols\ISymbolExtensions_PerformIVTCheck.cs (1)
20this AssemblyIdentity assemblyGrantingAccessIdentity,
VersionHelper.cs (3)
59version = AssemblyIdentity.NullVersion; 71version = AssemblyIdentity.NullVersion; 85version = AssemblyIdentity.NullVersion;
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
16public static AssemblyIdentity? TryGetAssemblyIdentity(string filePath)
Microsoft.CodeAnalysis.CSharp (72)
Binder\Binder_Lookup.cs (1)
1462diagInfo = new CSDiagnosticInfo(ErrorCode.ERR_FriendRefNotEqualToThis, unwrappedSymbol.ContainingAssembly.Identity.ToString(), AssemblyIdentity.PublicKeyToString(this.Compilation.Assembly.PublicKey));
Compilation\CSharpCompilation.cs (2)
1212public override IEnumerable<AssemblyIdentity> ReferencedAssemblyNames 1799new MissingAssemblySymbol(AssemblyIdentity.FromAssemblyDefinition(HostObjectType.GetTypeInfo().Assembly)).Modules[0],
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
238var leftIdentity = left.Identity; 239var rightIdentity = right.Identity; 243AssemblyIdentity.EqualIgnoringNameAndVersion(leftIdentity, rightIdentity);
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (2)
101ImmutableDictionary<AssemblyIdentity, AssemblyIdentity> assemblyReferenceIdentityMap;
Emitter\Model\AssemblyReference.cs (1)
28public AssemblyIdentity Identity => _targetAssembly.Identity;
Emitter\Model\PEAssemblyBuilder.cs (1)
194public AssemblyIdentity Identity => _sourceAssembly.Identity;
Emitter\Model\PEModuleBuilder.cs (2)
167AssemblyIdentity asmIdentity = SourceModule.ContainingAssembly.Identity; 168AssemblyIdentity refIdentity = asmRef.Identity;
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\AssemblySymbol.cs (7)
72/// This is equivalent to <see cref="Identity"/>.<see cref="AssemblyIdentity.Name"/>, but may be 88public abstract AssemblyIdentity Identity { get; } 90AssemblyIdentity IAssemblySymbolInternal.Identity => Identity; 835AssemblyIdentity assemblyId = AssemblyIdentity.FromAssemblyDefinition(typeInfo.Assembly); 888AssemblyIdentity? assemblyOpt, 1040private static NamedTypeSymbol? GetTopLevelTypeByMetadataName(AssemblySymbol assembly, ref MetadataTypeName metadataName, AssemblyIdentity? assemblyOpt)
Symbols\Metadata\PE\MetadataDecoder.cs (1)
194protected override int GetIndexOfReferencedAssembly(AssemblyIdentity identity)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
99public override AssemblyIdentity Identity
Symbols\MissingAssemblySymbol.cs (3)
26protected readonly AssemblyIdentity identity; 31public MissingAssemblySymbol(AssemblyIdentity identity) 59public override AssemblyIdentity Identity
Symbols\MissingModuleSymbol.cs (2)
153internal override ImmutableArray<AssemblyIdentity> GetReferencedAssemblies() 155return ImmutableArray<AssemblyIdentity>.Empty;
Symbols\ModuleSymbol.cs (2)
201public ImmutableArray<AssemblyIdentity> ReferencedAssemblies 217internal abstract ImmutableArray<AssemblyIdentity> GetReferencedAssemblies(); // TODO: Remove this method and make ReferencedAssemblies property abstract instead.
Symbols\NonMissingModuleSymbol.cs (3)
47internal sealed override ImmutableArray<AssemblyIdentity> GetReferencedAssemblies() 98var referenceId = unifiedAssembly.OriginalReference; 99var definitionId = dependentAssembly.Identity;
Symbols\PublicModel\AssemblySymbol.cs (2)
42AssemblyIdentity IAssemblySymbol.Identity => UnderlyingAssemblySymbol.Identity; 82AssemblyIdentity identity = UnderlyingAssemblySymbol.Identity;
Symbols\PublicModel\ModuleSymbol.cs (1)
45ImmutableArray<AssemblyIdentity> IModuleSymbol.ReferencedAssemblies => _underlying.ReferencedAssemblies;
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);
Symbols\Retargeting\RetargetingAssemblySymbol.cs (1)
146public override AssemblyIdentity Identity
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
212var definitionIdentity = ReferenceEquals(referencedAssemblySymbols[i], originatingSourceAssemblyDebugOnly) ?
Symbols\Source\SourceAssemblySymbol.cs (6)
40internal AssemblyIdentity lazyAssemblyIdentity; 193public override AssemblyIdentity Identity 2178private AssemblyIdentity ComputeIdentity() 2285AssemblyIdentity identity; 2287if (!AssemblyIdentity.TryParseDisplayName(displayName, out identity, out parts)) 2438else if (!AssemblyIdentity.IsValidCultureName(cultureString))
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));
Semantics\UseSiteErrorTests.cs (3)
2449var actualAssemblyId = compilation.GetUnreferencedAssemblyIdentities(diagnostic).Single(); 2450AssemblyIdentity expectedAssemblyId; 2451AssemblyIdentity.TryParseDisplayName("Unavailable, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", out expectedAssemblyId);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (24)
Compilation\ReferenceManagerTests.cs (1)
1658AssemblyIdentity actualIdentity = method.ReturnType.ContainingAssembly.Identity;
Symbols\CompilationCreationTests.cs (15)
683var varMTTestLib1_V1_Name = new AssemblyIdentity("MTTestLib1", new Version("1.0.0.0")); 698var varMTTestLib2_Name = new AssemblyIdentity("MTTestLib2"); 755var varMTTestLib1_V2_Name = new AssemblyIdentity("MTTestLib1", new Version("2.0.0.0")); 774var varMTTestLib3_Name = new AssemblyIdentity("MTTestLib3"); 877var varMTTestLib1_V3_Name = new AssemblyIdentity("MTTestLib1", new Version("3.0.0.0")); 900var varMTTestLib4_Name = new AssemblyIdentity("MTTestLib4"); 1419var varMTTestLib2_Name = new AssemblyIdentity("MTTestLib2"); 1466var varMTTestLib3_Name = new AssemblyIdentity("MTTestLib3"); 1551var varMTTestLib4_Name = new AssemblyIdentity("MTTestLib4"); 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")); 2534var c1_Name = new AssemblyIdentity("c1"); 2556var c2_Name = new AssemblyIdentity("MTTestLib2");
Symbols\DefaultInterfaceImplementationTests.cs (1)
62579AssemblyIdentity assemblyIdentity = ((AssemblyMetadata)reference.GetMetadata()).GetAssembly().Identity;
Symbols\Metadata\PE\MissingTypeReferences.cs (1)
325var defaultName = new AssemblyIdentity("missing");
Symbols\MockAssemblySymbol.cs (1)
26public override AssemblyIdentity Identity
Symbols\MockSymbolTests.cs (1)
66AssemblyIdentity missingAssemblyId = new AssemblyIdentity("goo");
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)
CSharpTestBase.cs (1)
1436AssemblyIdentity identity,
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Workspaces\TestAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs (3)
24public CodeActionOperation CreateAddMetadataReferenceOperation(ProjectId projectId, AssemblyIdentity assemblyIdentity) 30public readonly AssemblyIdentity AssemblyIdentity; 32public Operation(ProjectId projectId, AssemblyIdentity assemblyIdentity)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (48)
AssemblyReference.cs (3)
15private readonly AssemblyIdentity _identity; 17internal AssemblyReference(AssemblyIdentity identity) 22AssemblyIdentity IAssemblyReference.Identity => _identity;
DkmUtilities.cs (3)
26internal unsafe delegate IntPtr GetMetadataBytesPtrFunction(AssemblyIdentity assemblyIdentity, out uint uSize); 105internal static ImmutableArray<MetadataBlock> GetMetadataBlocks(GetMetadataBytesPtrFunction getMetaDataBytesPtrFunction, ImmutableArray<AssemblyIdentity> missingAssemblyIdentities) 108foreach (var missingAssemblyIdentity in missingAssemblyIdentities)
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;
EvaluationContextBase.cs (11)
21internal static readonly AssemblyIdentity SystemIdentity = new AssemblyIdentity("System"); 22internal static readonly AssemblyIdentity SystemCoreIdentity = new AssemblyIdentity("System.Core"); 23internal static readonly AssemblyIdentity SystemLinqIdentity = new AssemblyIdentity("System.Linq"); 24internal static readonly AssemblyIdentity SystemXmlIdentity = new AssemblyIdentity("System.Xml"); 25internal static readonly AssemblyIdentity SystemXmlLinqIdentity = new AssemblyIdentity("System.Xml.Linq"); 26internal static readonly AssemblyIdentity MicrosoftVisualBasicIdentity = new AssemblyIdentity("Microsoft.VisualBasic"); 56AssemblyIdentity linqLibrary, 58out ImmutableArray<AssemblyIdentity> missingAssemblyIdentities) 73missingAssemblyIdentities = ImmutableArray<AssemblyIdentity>.Empty; 93internal abstract ImmutableArray<AssemblyIdentity> GetMissingAssemblyIdentities(Diagnostic diagnostic, AssemblyIdentity linqLibrary);
ExpressionCompiler.cs (5)
238internal static bool ShouldTryAgainWithMoreMetadataBlocks(DkmUtilities.GetMetadataBytesPtrFunction getMetaDataBytesPtrFunction, ImmutableArray<AssemblyIdentity> missingAssemblyIdentities, ref ImmutableArray<MetadataBlock> references) 377(AssemblyIdentity assemblyIdentity, out uint size) => appDomain.GetMetaDataBytesPtr(assemblyIdentity.GetDisplayName(), out size), 391PooledHashSet<AssemblyIdentity>? assembliesLoadedInRetryLoop = null; 393var linqLibrary = EvaluationContextBase.SystemLinqIdentity; 435assembliesLoadedInRetryLoop ??= PooledHashSet<AssemblyIdentity>.GetInstance();
MetadataUtilities.cs (10)
31out IReadOnlyDictionary<string, ImmutableArray<(AssemblyIdentity, MetadataReference)>>? referencesBySimpleName) 46AssemblyIdentity? corLibrary = null; 122var refsBySimpleName = new Dictionary<string, ImmutableArray<(AssemblyIdentity, MetadataReference)>>(StringComparer.OrdinalIgnoreCase); 138refs = ImmutableArray<(AssemblyIdentity, MetadataReference)>.Empty; 173var identitiesBuilder = (kind == MakeAssemblyReferencesKind.DirectReferencesOnly) ? ArrayBuilder<AssemblyIdentity>.GetInstance() : null; 175AssemblyIdentity? intrinsicsAssembly = null; 212var referencedModules = ArrayBuilder<AssemblyIdentity>.GetInstance(); 267ArrayBuilder<AssemblyIdentity> identities, 269ArrayBuilder<AssemblyIdentity> referencedModules) 450internal static bool IsWindowsAssemblyIdentity(this AssemblyIdentity assemblyIdentity)
PDB\ExternAliasRecord.cs (1)
28public ExternAliasRecord(string alias, AssemblyIdentity targetIdentity)
PDB\MethodDebugInfo.Native.cs (2)
338if (!AssemblyIdentity.TryParseDisplayName(target, out var targetIdentity))
Microsoft.CodeAnalysis.Features (17)
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (6)
45private static async Task<ImmutableArray<CodeAction>> GetAddReferencesCodeActionsAsync(CodeFixContext context, ISet<AssemblyIdentity> uniqueIdentities) 48foreach (var identity in uniqueIdentities) 58private static async Task<ISet<AssemblyIdentity>> GetUniqueIdentitiesAsync(CodeFixContext context) 63var uniqueIdentities = new HashSet<AssemblyIdentity>(); 72AssemblyIdentity.TryParseDisplayName(displayName, out var serializedIdentity))
AddMissingReference\AddMissingReferenceCodeAction.cs (3)
15internal sealed class AddMissingReferenceCodeAction(Project project, string title, ProjectReference? projectReferenceToAdd, AssemblyIdentity missingAssemblyIdentity) : CodeAction 19private readonly AssemblyIdentity _missingAssemblyIdentity = missingAssemblyIdentity; 29public static async Task<CodeAction> CreateAsync(Project project, AssemblyIdentity missingAssemblyIdentity, CancellationToken cancellationToken)
CodeRefactorings\WorkspaceServices\IAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs (1)
13CodeActionOperation CreateAddMetadataReferenceOperation(ProjectId projectId, AssemblyIdentity assemblyIdentity);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (2)
239if (AssemblyIdentity.TryParseDisplayName(argument, out var assemblyIdentity))
Completion\Providers\Scripting\GlobalAssemblyCacheCompletionHelper.cs (2)
44foreach (var identity in GetAssemblyIdentities(partialName)) 63private static IEnumerable<AssemblyIdentity> GetAssemblyIdentities(string partialName)
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
405private readonly AssemblyIdentity? _assemblyIdentity; 423public UniqueDocumentKey(AssemblyIdentity assemblyIdentity, MetadataId? metadataId, string language, SymbolKey symbolId, bool signaturesOnly)
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
19public readonly AssemblyIdentity AssemblyIdentity;
Microsoft.CodeAnalysis.Scripting (45)
Hosting\AssemblyLoader\CoreAssemblyLoaderImpl.cs (1)
67_loader.ResolveAssembly(AssemblyIdentity.FromAssemblyReference(assemblyName), _loadDirectory);
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (15)
61public readonly AssemblyIdentity Identity; 64public AssemblyIdentityAndLocation(AssemblyIdentity identity, string location) 74private readonly struct LoadedAssemblyInfo(Assembly assembly, AssemblyIdentity identity, string? location) 77public readonly AssemblyIdentity Identity = identity; 155public void RegisterDependency(AssemblyIdentity dependency, string path) 197var identity = AssemblyIdentity.FromAssemblyDefinition(assembly); 225if (!AssemblyIdentity.TryParseDisplayName(assemblyDisplayName, out var identity)) 247internal Assembly? ResolveAssembly(AssemblyIdentity identity, string? loadDirectory) 343private Assembly? TryGetAssemblyLoadedFromPath(AssemblyIdentity identity, string directory) 351identity.Equals(AssemblyIdentity.FromAssemblyDefinition(assemblyAndLocation.Assembly))) 381private Assembly? GetOrLoadKnownAssembly(AssemblyIdentity identity) 451private static Assembly? FindHighestVersionOrFirstMatchingIdentity(AssemblyIdentity identity, IEnumerable<LoadedAssemblyInfo> infos) 470private static AssemblyIdentityAndLocation FindHighestVersionOrFirstMatchingIdentity(AssemblyIdentity identity, IEnumerable<AssemblyIdentityAndLocation> assemblies)
Hosting\Resolvers\RuntimeMetadataReferenceResolver.cs (3)
97public override PortableExecutableReference? ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity) 185if (!TrustedPlatformAssemblies.IsEmpty && AssemblyIdentity.TryParseDisplayName(reference, out var identity, out var identityParts))
ScriptMetadataResolver.cs (1)
67public override PortableExecutableReference? ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (5)
82public override IEnumerable<AssemblyIdentity> GetAssemblyIdentities(AssemblyName partialName, ImmutableArray<ProcessorArchitecture> architectureFilter = default(ImmutableArray<ProcessorArchitecture>)) 93public override IEnumerable<AssemblyIdentity> GetAssemblyIdentities(string partialName = null, ImmutableArray<ProcessorArchitecture> architectureFilter = default(ImmutableArray<ProcessorArchitecture>)) 101return SpecializedCollections.EmptyEnumerable<AssemblyIdentity>(); 124private static IEnumerable<AssemblyIdentity> GetAssemblyIdentities( 200public override AssemblyIdentity ResolvePartialName(
src\Compilers\Shared\GlobalAssemblyCacheHelpers\DotNetCoreGlobalAssemblyCache.cs (5)
22public override IEnumerable<AssemblyIdentity> GetAssemblyIdentities(AssemblyName partialName, ImmutableArray<ProcessorArchitecture> architectureFilter = default) 24return ImmutableArray<AssemblyIdentity>.Empty; 27public override IEnumerable<AssemblyIdentity> GetAssemblyIdentities(string? partialName = null, ImmutableArray<ProcessorArchitecture> architectureFilter = default) 29return ImmutableArray<AssemblyIdentity>.Empty; 37public override AssemblyIdentity? ResolvePartialName(string displayName, out string? location, ImmutableArray<ProcessorArchitecture> architectureFilter = default, CultureInfo? preferredCulture = null)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (1)
403internal static AssemblyIdentity ToAssemblyIdentity(IAssemblyName nameObject)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs (6)
47public abstract IEnumerable<AssemblyIdentity> GetAssemblyIdentities(AssemblyName partialName, ImmutableArray<ProcessorArchitecture> architectureFilter = default); 55public abstract IEnumerable<AssemblyIdentity> GetAssemblyIdentities(string? partialName = null, ImmutableArray<ProcessorArchitecture> architectureFilter = default); 65/// Looks up specified partial assembly name in the GAC and returns the best matching <see cref="AssemblyIdentity"/>. 72public AssemblyIdentity? ResolvePartialName( 81/// Looks up specified partial assembly name in the GAC and returns the best matching <see cref="AssemblyIdentity"/>. 89public abstract AssemblyIdentity? ResolvePartialName(
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (8)
95private static IEnumerable<(AssemblyIdentity Identity, string Path)> GetAssemblyIdentitiesAndPaths(AssemblyName name, ImmutableArray<ProcessorArchitecture> architectureFilter) 105private static IEnumerable<(AssemblyIdentity Identity, string Path)> GetAssemblyIdentitiesAndPaths(string name, Version version, byte[] publicKeyToken, ImmutableArray<ProcessorArchitecture> architectureFilter) 129var assemblyIdentity = new AssemblyIdentity( 139public override IEnumerable<AssemblyIdentity> GetAssemblyIdentities(AssemblyName partialName, ImmutableArray<ProcessorArchitecture> architectureFilter = default(ImmutableArray<ProcessorArchitecture>)) 144public override IEnumerable<AssemblyIdentity> GetAssemblyIdentities(string partialName = null, ImmutableArray<ProcessorArchitecture> architectureFilter = default(ImmutableArray<ProcessorArchitecture>)) 153return SpecializedCollections.EmptyEnumerable<AssemblyIdentity>(); 165public override AssemblyIdentity ResolvePartialName( 179AssemblyIdentity assemblyIdentity = null;
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (8)
GlobalAssemblyCacheTests.cs (8)
24AssemblyIdentity[] names; 28foreach (var name in names) 35foreach (var name in names) 42foreach (var name in names) 49foreach (var name in names) 58foreach (var name in names) 69foreach (var name in names) 93AssemblyIdentity[] names;
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
TestRuntimeMetadataReferenceResolver.cs (1)
25public override PortableExecutableReference ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity)
Microsoft.CodeAnalysis.Test.Utilities (23)
CommonTestBase.cs (2)
336AssemblyIdentity assemblyIdentity, 348AssemblyIdentity assemblyIdentity,
Compilation\IRuntimeEnvironment.cs (5)
93internal static void EmitReferences(Compilation compilation, HashSet<string> fullNameSet, List<ModuleData> dependencies, AssemblyIdentity corLibIdentity) 201var corLibIdentity = compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly.Identity; 214var identity = referencedCompilation.Assembly.Identity; 333AssemblyIdentity.TryParseDisplayName(module.FullName, out var identity);
Compilation\MetadataReferenceExtensions.cs (1)
20public static AssemblyIdentity GetAssemblyIdentity(this MetadataReference reference)
Diagnostics\DiagnosticExtensions.cs (1)
129foreach (var id in assemblyIds)
Metadata\ModuleData.cs (1)
75public ModuleData(AssemblyIdentity identity, OutputKind kind, ImmutableArray<byte> image, ImmutableArray<byte> pdb, bool inMemoryModule, bool isCorLib)
Mocks\Silverlight.cs (1)
78var publicKeyToken = AssemblyIdentity.CalculatePublicKeyToken(publicKey);
Mocks\StdOle.cs (1)
65var publicKeyToken = AssemblyIdentity.CalculatePublicKeyToken(publicKey);
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)
Mocks\TestMissingMetadataReferenceResolver.cs (4)
20public readonly AssemblyIdentity Identity; 22public ReferenceAndIdentity(MetadataReference reference, AssemblyIdentity identity) 42public override PortableExecutableReference ResolveMissingAssembly(MetadataReference definition, AssemblyIdentity referenceIdentity) 46string nameAndVersion = referenceIdentity.Name + (referenceIdentity.Version != AssemblyIdentity.NullVersion ? $", {referenceIdentity.Version}" : "");
Platform\Desktop\DesktopRuntimeEnvironment.cs (2)
219var corLibIdentity = mainCompilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly.Identity; 220var identity = mainCompilation.Assembly.Identity;
TargetFrameworkUtil.cs (1)
384var identity = assemblyMetadata.GetAssembly().Identity;
Microsoft.CodeAnalysis.UnitTests (67)
Analyzers\AnalyzerFileReferenceTests.cs (2)
220AssemblyIdentity.TryParseDisplayName("Alpha, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", out var expectedIdentity);
AssemblyUtilitiesTests.cs (1)
139var result = AssemblyUtilities.GetAssemblyIdentity(_testFixture.Alpha);
MetadataReferences\AssemblyIdentityComparerTests.cs (5)
50AssemblyIdentity id1, id2; 53Assert.True(AssemblyIdentity.TryParseDisplayName(displayName1, out id1, out parts1)); 54Assert.Equal(partial, !AssemblyIdentity.IsFullName(parts1)); 56Assert.True(AssemblyIdentity.TryParseDisplayName(displayName2, out id2, out parts2)); 57Assert.True(AssemblyIdentity.IsFullName(parts2), "Expected full name");
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\AssemblyIdentityExtensions.cs (2)
21/// <exception cref="System.Globalization.CultureNotFoundException">The culture specified in <see cref="AssemblyIdentity.CultureName"/> is not available on the current platform.</exception> 22public static AssemblyName ToAssemblyName(this AssemblyIdentity identity)
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);
MetadataReferences\MetadataReferenceTests.cs (1)
455private static readonly AssemblyIdentity s_mscorlibIdentity = new AssemblyIdentity(
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (1)
403internal static AssemblyIdentity ToAssemblyIdentity(IAssemblyName nameObject)
Microsoft.CodeAnalysis.VisualBasic (61)
CommandLine\VisualBasicCommandLineParser.vb (2)
527Dim identity As AssemblyIdentity = Nothing 533ElseIf Not AssemblyIdentity.TryParseDisplayName(value, identity) OrElse
Compilation\VisualBasicCompilation.vb (1)
1350Public Overrides ReadOnly Property ReferencedAssemblyNames As IEnumerable(Of AssemblyIdentity)
Emit\AssemblyReference.vb (1)
22Public ReadOnly Property Identity As AssemblyIdentity Implements Cci.IAssemblyReference.Identity
Emit\EditAndContinue\PEDeltaAssemblyBuilder.vb (2)
106Dim assemblyReferenceIdentityMap As ImmutableDictionary(Of AssemblyIdentity, AssemblyIdentity) = Nothing
Emit\EditAndContinue\VisualBasicSymbolMatcher.vb (1)
212AssemblyIdentity.EqualIgnoringNameAndVersion(leftIdentity, rightIdentity)
Emit\PEAssemblyBuilder.vb (1)
141Public ReadOnly Property Identity As AssemblyIdentity Implements Cci.IAssemblyReference.Identity
Emit\PEModuleBuilder.vb (2)
140Dim asmIdentity As AssemblyIdentity = SourceModule.ContainingAssembly.Identity 141Dim refIdentity As AssemblyIdentity = asmRef.Identity
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\AssemblySymbol.vb (2)
72''' This is equivalent to <see cref="Identity"/>.<see cref="AssemblyIdentity.Name"/>, but may be 101Public MustOverride ReadOnly Property Identity As AssemblyIdentity Implements IAssemblySymbol.Identity, IAssemblySymbolInternal.Identity
Symbols\Metadata\PE\MetadataDecoder.vb (1)
175Protected Overrides Function GetIndexOfReferencedAssembly(identity As AssemblyIdentity) As Integer
Symbols\Metadata\PE\PEAssemblySymbol.vb (1)
96Public Overrides ReadOnly Property Identity As AssemblyIdentity
Symbols\MissingAssemblySymbol.vb (3)
24Protected ReadOnly m_Identity As AssemblyIdentity 29Public Sub New(identity As AssemblyIdentity) 51Public Overrides ReadOnly Property Identity As AssemblyIdentity
Symbols\MissingModuleSymbol.vb (2)
122Friend Overrides Function GetReferencedAssemblies() As ImmutableArray(Of AssemblyIdentity) 123Return ImmutableArray(Of AssemblyIdentity).Empty
Symbols\ModuleSymbol.vb (2)
123Public ReadOnly Property ReferencedAssemblies As ImmutableArray(Of AssemblyIdentity) Implements IModuleSymbol.ReferencedAssemblies 143Friend MustOverride Function GetReferencedAssemblies() As ImmutableArray(Of AssemblyIdentity) ' TODO: Remove this method and make ReferencedAssemblies property abstract instead.
Symbols\NonMissingModuleSymbol.vb (1)
47Friend NotOverridable Overrides Function GetReferencedAssemblies() As ImmutableArray(Of 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()
Symbols\Retargeting\RetargetingAssemblySymbol.vb (1)
124Public Overrides ReadOnly Property Identity As AssemblyIdentity
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
174Dim referencedAssemblies As ImmutableArray(Of AssemblyIdentity) = moduleReferences.Identities
Symbols\Source\SourceAssemblySymbol.vb (6)
40Friend m_lazyIdentity As AssemblyIdentity 138Public Overrides ReadOnly Property Identity As AssemblyIdentity 967Dim identity As AssemblyIdentity = Nothing 969If Not AssemblyIdentity.TryParseDisplayName(displayName, identity, parts) Then 1073ElseIf Not AssemblyIdentity.IsValidCultureName(cultureString) Then 1747Private Function ComputeIdentity() As AssemblyIdentity
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (11)
CompilationExtensions.vb (1)
87Dim referencesBySimpleName As IReadOnlyDictionary(Of String, ImmutableArray(Of (AssemblyIdentity, MetadataReference))) = Nothing
EETypeNameDecoder.vb (3)
22Protected Overrides Function GetIndexOfReferencedAssembly(identity As AssemblyIdentity) As Integer 46Protected Overrides Function IsContainingAssembly(identity As AssemblyIdentity) As Boolean 68Private Shared Function GetComponentAssemblyIdentity([module] As ModuleSymbol) As AssemblyIdentity
EvaluationContext.vb (7)
556Friend Overrides Function GetMissingAssemblyIdentities(diagnostic As Diagnostic, linqLibrary As AssemblyIdentity) As ImmutableArray(Of AssemblyIdentity) 563Friend Shared Function GetMissingAssemblyIdentitiesHelper(code As ERRID, arguments As IReadOnlyList(Of Object), globalNamespace As NamespaceSymbol, linqLibrary As AssemblyIdentity) As ImmutableArray(Of AssemblyIdentity) 569Dim identity = If(TryCast(argument, AssemblyIdentity), TryCast(argument, AssemblySymbol)?.Identity) 576Dim identity As AssemblyIdentity = TryCast(arguments(2), AssemblySymbol)?.Identity 640Private Shared Function IsValidMissingAssemblyIdentity(identity As AssemblyIdentity) As Boolean
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (6)
Compilation\CompilationAPITests.vb (3)
575Dim RefAsm_Names As IEnumerable(Of AssemblyIdentity) = c2.ReferencedAssemblyNames 576AssertEx.Equal(Of Integer)(2, Enumerable.Count(Of AssemblyIdentity)(RefAsm_Names)) 578Dim I As AssemblyIdentity
Compilation\ReferenceManagerTests.vb (1)
1393Dim actualIdentity As AssemblyIdentity = method.ReturnType.ContainingAssembly.Identity
Semantics\UseSiteErrorTests.vb (2)
745Dim expectedAssemblyId As AssemblyIdentity = Nothing 746AssemblyIdentity.TryParseDisplayName("Unavailable, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", expectedAssemblyId)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolsTests\Metadata\PE\LoadingEvents.vb (2)
77Dim expectedAssemblyId As AssemblyIdentity = Nothing 78AssemblyIdentity.TryParseDisplayName("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", expectedAssemblyId)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
CompilationTestUtils.vb (2)
37identity As AssemblyIdentity, 121identity As AssemblyIdentity,
MockSymbols.vb (1)
775Public Overrides ReadOnly Property Identity As AssemblyIdentity
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\MetadataReference\AssemblyIdentityUtils.cs (1)
16public static AssemblyIdentity? TryGetAssemblyIdentity(string filePath)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildWorkspace.cs (3)
573var identity = GetAssemblyIdentity(projectId, metadataReference); 609var identity = GetAssemblyIdentity(projectId, metadataReference); 625private AssemblyIdentity? GetAssemblyIdentity(ProjectId projectId, MetadataReference metadataReference)
Microsoft.VisualStudio.LanguageServices (5)
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
596HashSet<AssemblyIdentity> assemblyIdentitySet = null; 597var visitedAssemblies = new Dictionary<string, AssemblyIdentity>();
Workspace\VisualStudioAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs (3)
29public CodeActionOperation CreateAddMetadataReferenceOperation(ProjectId projectId, AssemblyIdentity assemblyIdentity) 46private readonly AssemblyIdentity _assemblyIdentity; 49public AddMetadataReferenceOperation(ProjectId projectId, AssemblyIdentity assemblyIdentity)