1056 references to Assembly
ConfigurationSchemaGenerator (4)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (1)
68!_typeSymbols.Compilation.IsSymbolAccessibleWithin(type, _typeSymbols.Compilation.Assembly) ||
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
1566var configSchemaInfo = ConfigSchemaGenerator.GetConfigurationSchema(compilation.Assembly);
ILLink.RoslynAnalyzer (3)
CompilationExtensions.cs (3)
45 type ??= compilation.Assembly.GetTypeByMetadataName (fullyQualifiedMetadataName); 49 foreach (var module in compilation.Assembly.Modules) { 57 case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo (compilation.Assembly):
Microsoft.AspNetCore.Analyzers (1)
CompilationFeatureDetector.cs (1)
30var configureMethods = ConfigureMethodVisitor.FindConfigureMethods(symbols, compilation.Assembly);
Microsoft.AspNetCore.Analyzers.Test (1)
ConfigureMethodVisitorTest.cs (1)
82var results = ConfigureMethodVisitor.FindConfigureMethods(symbols, compilation.Assembly);
Microsoft.AspNetCore.Components.Analyzers (2)
InternalUsageAnalyzer.cs (2)
129if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly)) 158if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly))
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
InternalUsageAnalyzer.cs (2)
129if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly)) 158if (symbol == null || SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, context.Compilation.Assembly))
Microsoft.CodeAnalysis (12)
CommandLine\CommonCompiler.cs (1)
617var currentAssembly = compilation.Assembly;
Compilation\Compilation.cs (5)
221Assembly.Identity.PublicKey, 1251addIfNotNull(Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName)); 1255if (!ReferenceEquals(corLib, Assembly)) 1680if (a.Equals(compilation.Assembly)) 1738return assemblyIsInReferences(s.ContainingAssembly ?? this.Assembly);
Compilation\DeterministicKeyBuilder.cs (1)
332compilation.Assembly.Identity.PublicKey,
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
262DecodeGlobalSuppressMessageAttributes(_compilation, _compilation.Assembly, suppressions); 264foreach (var module in _compilation.Assembly.Modules)
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
289compilationReference.Compilation.Assembly.Identity,
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
111targetNode is ICompilationUnitSyntax compilationUnit ? semanticModel.Compilation.Assembly :
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
56var assemblyToScope = model.Compilation.Assembly;
Microsoft.CodeAnalysis.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CompilationExtensions.cs (2)
42if (ReferenceEquals(currentType.ContainingAssembly, compilation.Assembly)) 51case Utilities.SymbolVisibility.Internal when currentType.ContainingAssembly.GivesAccessTo(compilation.Assembly):
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (2)
46var referencedAssemblySymbols = compilation.Assembly.Modules.First().ReferencedAssemblySymbols; 65builder.Add(previous.Assembly);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
463var namedParameter = IsAttributeNamedParameter(member, within ?? compilation.Assembly);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
84(ISymbol)semanticModel.Compilation.Assembly;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AssemblySymbolKey.cs (2)
30if (ignoreAssemblyKey || compilation.Assembly.Identity.Name == assemblyName) 32result.AddIfNotNull(compilation.Assembly);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
64return compilation.Assembly.IsSameAssemblyOrHasFriendAccessTo(symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
66updatedProperty = updatedProperty.RemoveInaccessibleAttributesAndAttributesOfTypes(compilation.Assembly, attributesToRemove);
Microsoft.CodeAnalysis.CSharp (1)
CommandLine\CSharpCompiler.cs (1)
395if (symbol is null || ReferenceEquals(compilation.Assembly, symbol.ContainingAssembly))
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
352return constructor is not null && constructor.IsAccessibleWithin(compilation.Assembly) ? constructor : null;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
46if (indexType == null || !indexType.IsAccessibleWithin(compilation.Assembly))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
58if (rangeType == null || !rangeType.IsAccessibleWithin(compilation.Assembly))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (14)
SymbolKey\SymbolKeyCompilationsTests.cs (10)
593ISymbol sym1 = comp1.Assembly; 594ISymbol sym2 = comp2.Assembly; 603sym1 = comp1.Assembly.Modules.First(); 604sym2 = comp2.Assembly.Modules.First(); 622ISymbol assembly1 = compilation1.Assembly; 623ISymbol assembly2 = compilation2.Assembly; 636var module1 = compilation1.Assembly.Modules.First(); 637var module2 = compilation2.Assembly.Modules.First(); 666ISymbol sym1 = comp1.Assembly; 667ISymbol sym2 = comp2.Assembly;
SymbolKey\SymbolKeyTestBase.cs (2)
208list.Add(c.Assembly); 209list.AddRange(c.Assembly.Modules);
SymbolKey\SymbolKeyTests.cs (2)
279referenceAssemblySymbol = referenceCompilation.Assembly; 283referenceAssemblySymbol = referenceCompilation.Assembly;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (19)
CodeGen\CodeGenOverridingAndHiding.cs (2)
1196Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, compilation.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 1197if (compilation.Assembly.RuntimeSupportsCovariantReturnsOfClasses)
CodeGen\CodeGenTests.cs (1)
13274var assembly = (SourceAssemblySymbol)compilation.Assembly;
CodeGen\CodeGenTupleTest.cs (7)
6232ns = comp.CreateErrorNamespaceSymbol(comp.Assembly.GlobalNamespace, "a"); 6236Assert.Same(comp.Assembly.GlobalNamespace, ns.ContainingSymbol); 6237Assert.Same(comp.Assembly.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly); 6238Assert.Same(comp.Assembly.GlobalNamespace.ContainingModule, ns.ContainingModule); 6258vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.Assembly.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType); 13919Assert.NotSame(comp2.Assembly, (AssemblySymbol)comp3.GetAssemblyOrModuleSymbol(comp2CompilationRef)); // We are interested in retargeting scenario 14084Assert.NotSame(comp2.Assembly, (AssemblySymbol)comp3.GetAssemblyOrModuleSymbol(comp2CompilationRef)); // We are interested in retargeting scenario
Emit\CompilationEmitTests.cs (8)
4016var assembly = compilation.Assembly; 4052var assembly = compilation.Assembly; 4082var assembly = compilation.Assembly; 4113var assembly = compilation.Assembly; 4144var assembly = compilation.Assembly; 4175var assembly = compilation.Assembly; 5048Assert.NotSame(comp.Assembly.CorLibrary, comp.Assembly);
Emit\DeterministicTests.cs (1)
362Assert.Same(forwardedToCompilation2.Assembly.GetPublicSymbol(), type.ContainingAssembly);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (9)
Emit\EditAndContinue\AssemblyReferencesTests.cs (9)
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); 350"Lib, " + lib0.Assembly.Identity.Version, 352"Lib, " + lib0.Assembly.Identity.Version, 354"Lib, " + lib0.Assembly.Identity.Version, 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 (94)
Attributes\AttributeTests.cs (6)
1427var attrs = compilation.Assembly.GetAttributes(); 8679var assembly = compilation.Assembly; 8722var assembly = compilation.Assembly; 8769var assembly = compilation.Assembly; 10033Assert.Same(compilation1.Assembly, compilation2.SourceModule.ReferencedAssemblySymbols[1]); 10044Assert.NotSame(compilation1.Assembly, compilation3.SourceModule.ReferencedAssemblySymbols[1]);
Attributes\AttributeTests_Assembly.cs (33)
33Assert.Equal(new Version(1, 2, 3, 4), other.Assembly.Identity.Version); 146Assert.Equal("1.2.3.4", ((SourceAssemblySymbol)other.Assembly).FileVersion); 156Assert.Equal("1.2", ((SourceAssemblySymbol)other.Assembly).FileVersion); 166Assert.Equal("65535.65535.65535.65535", ((SourceAssemblySymbol)other.Assembly).FileVersion); 269Assert.Equal("One Hundred Years of Solitude", ((SourceAssemblySymbol)other.Assembly).Title); 279Assert.Null(((SourceAssemblySymbol)other.Assembly).Title); 289Assert.Equal("A classic of magical realist literature", ((SourceAssemblySymbol)other.Assembly).Description); 299Assert.Equal("pt-BR", (other.Assembly.Identity.CultureName)); 520Assert.Equal("MossBrain", ((SourceAssemblySymbol)other.Assembly).Company); 526Assert.Equal("微软", ((SourceAssemblySymbol)other.Assembly).Company); 536Assert.Equal("Sound Cannon", ((SourceAssemblySymbol)other.Assembly).Product); 546Assert.Equal("مايكروسوفت", ((SourceAssemblySymbol)other.Assembly).Copyright); 556Assert.Equal("circle R", ((SourceAssemblySymbol)other.Assembly).Trademark); 562Assert.Equal("", ((SourceAssemblySymbol)other.Assembly).Trademark); 572Assert.Equal("1.2.3garbage", ((SourceAssemblySymbol)other.Assembly).InformationalVersion); 871var attrs = comp.Assembly.GetAttributes(); 894var attrs = comp.Assembly.GetAttributes(); 1021var sourceAttributes = compilation.Assembly 1083var attrs = consoleappCompilation.Assembly.GetAttributes(); 1126Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length); 1204var attrs = consoleappCompilation.Assembly.GetAttributes(); 1241Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length); 1284var attrs = consoleappCompilation.Assembly.GetAttributes(); 1377var attrs = consoleappCompilation.Assembly.GetAttributes(); 1425var attrs = compilation.Assembly.GetAttributes(); 1436attrs = compilation.Assembly.GetAttributes(); 1444attrs = compilation.Assembly.GetAttributes(); 1786var module = (PEModuleSymbol)appCompilation.Assembly.Modules[1]; 2123Assert.Equal(3, appCompilation.Assembly.Modules.Length); 2155Assert.Equal(3, appCompilation.Assembly.Modules.Length); 2185Assert.Equal(3, appCompilation.Assembly.Modules.Length); 2217Assert.Equal(3, appCompilation.Assembly.Modules.Length); 2242Assert.Equal(2, appCompilation.Assembly.Modules.Length);
Attributes\InternalsVisibleToAndStrongNameTests.cs (42)
111Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)); 145Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 156Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)); 175Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 185Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)); 257Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)); 284Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)); 304Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 314Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)); 326Assert.True(ByteSequenceComparer.Equals(TestResources.General.snPublicKey.AsImmutableOrNull(), other.Assembly.Identity.PublicKey)); 351Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty); 360Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)); 373Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 387Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 406Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 418Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)); 430Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)); 454Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 465Assert.True(other.Assembly.Identity.PublicKey.IsEmpty); 479Assert.True(ByteSequenceComparer.Equals(s_publicKey, c.Assembly.Identity.PublicKey)); 508Assert.True(ByteSequenceComparer.Equals(s_publicKey, c.Assembly.Identity.PublicKey)); 763Assert.True(comp.Assembly.PublicKey.IsDefaultOrEmpty); 1109Assert.True(ByteSequenceComparer.Equals(s_publicKey, requestor.Assembly.Identity.PublicKey)); 1138Assert.True(ByteSequenceComparer.Equals(s_publicKey, requestor.Assembly.Identity.PublicKey)); 1167Assert.True(ByteSequenceComparer.Equals(s_publicKey, requestor.Assembly.Identity.PublicKey)); 1199Assert.True(ByteSequenceComparer.Equals(s_publicKey, requestor.Assembly.Identity.PublicKey)); 1234Assert.True(ByteSequenceComparer.Equals(s_publicKey, requestor.Assembly.Identity.PublicKey)); 1274Assert.True(other.Assembly.GivesAccessTo(requestor.Assembly)); 1306Assert.False(other.Assembly.GivesAccessTo(requestor.Assembly)); 1342Assert.False(other.Assembly.GivesAccessTo(requestor.Assembly)); 1387Assert.True(giver.Assembly.GivesAccessTo(requestor.Assembly)); 1460Assert.Equal(TestResources.General.snMaxSizePublicKey, comp.Assembly.Identity.PublicKey); 1461Assert.Equal<byte>(pubKeyTokenBytes, comp.Assembly.Identity.PublicKeyToken); 1478Assert.Equal(TestResources.General.snMaxSizePublicKey, comp2.Assembly.Identity.PublicKey); 1479Assert.Equal<byte>(pubKeyTokenBytes, comp2.Assembly.Identity.PublicKeyToken); 1488Assert.Equal(TestResources.General.snMaxSizePublicKey, comp3.Assembly.Identity.PublicKey); 1489Assert.Equal<byte>(pubKeyTokenBytes, comp3.Assembly.Identity.PublicKeyToken); 1853Assert.StartsWith("0024000004", ((SourceAssemblySymbol)comp.Assembly.Modules[1].ContainingAssembly).SignatureKey);
FieldKeywordTests.cs (1)
8508Assert.Equal(includeRuntimeSupport, comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation);
Semantics\RecordTests.cs (12)
10722Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 10725var expectedClone = comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses 15806Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 15809string expectedClone = comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses 23616Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 23619string expectedClone = comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses 25669Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, c.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 25672if (c.Assembly.RuntimeSupportsCovariantReturnsOfClasses) 25980Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 25983if (comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses) 30165Assert.False(compA.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 30195Assert.True(compB.Assembly.RuntimeSupportsCovariantReturnsOfClasses);
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
352return constructor is not null && constructor.IsAccessibleWithin(compilation.Assembly) ? constructor : null;
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
46if (indexType == null || !indexType.IsAccessibleWithin(compilation.Assembly))
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
58if (rangeType == null || !rangeType.IsAccessibleWithin(compilation.Assembly))
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
153var m = s1.GetCompilation().Assembly.Modules.Single();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (40)
Semantics\AmbiguousOverrideTests.cs (4)
141if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation) 201if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation) 263if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation) 304if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation)
Semantics\InheritanceBindingTests.cs (5)
4989Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 4992if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation) 5050Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, compilation.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 5053if (compilation.Assembly.RuntimeSupportsCovariantReturnsOfClasses) 6704var c2Type = comp.Assembly.Modules[0].GlobalNamespace.GetTypeMembers("C2").Single();
Semantics\InitOnlyMemberTests.cs (2)
2285Assert.True(comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2378Assert.True(comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation);
Semantics\NativeIntegerTests.cs (12)
71Assert.False(comp.Assembly.RuntimeSupportsNumericIntPtr); 86Assert.False(comp.Assembly.RuntimeSupportsNumericIntPtr); 176Assert.False(comp.Assembly.RuntimeSupportsNumericIntPtr); 182Assert.False(comp.Assembly.RuntimeSupportsNumericIntPtr); 189Assert.False(comp.Assembly.RuntimeSupportsNumericIntPtr); 195Assert.False(comp.Assembly.RuntimeSupportsNumericIntPtr); 780var corLibA = comp.Assembly.CorLibrary; 794var corLibB = comp.Assembly.CorLibrary; 861var corLibA = comp.Assembly.CorLibrary; 904var corLibB = comp.Assembly.CorLibrary; 976var corLibA = comp.Assembly.CorLibrary; 1021var corLibB = comp.Assembly.CorLibrary;
Semantics\RefFieldTests.cs (14)
2175Assert.False(comp.Assembly.RuntimeSupportsByRefFields); 2183Assert.True(comp.Assembly.RuntimeSupportsByRefFields); 2191Assert.False(comp.Assembly.RuntimeSupportsByRefFields); 2196Assert.True(comp.Assembly.RuntimeSupportsByRefFields); 2896comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3034comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3140comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3401comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3455comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3501comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3619comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3734comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 3819comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics); 4005comp.VerifyDiagnostics(comp.Assembly.RuntimeSupportsByRefFields ? expectedUpdatedDiagnostics : expectedLegacyDiagnostics);
Semantics\StructConstructorTests.cs (2)
3222var corLibA = comp.Assembly.CorLibrary; 3240var corLibB = comp.Assembly.CorLibrary;
Semantics\StructsTests.cs (1)
388Assert.NotSame(c1.Assembly, c1AsmRef);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (569)
Compilation\CompilationAPITests.cs (13)
1694Assert.Equal("?", compilation.Assembly.Name); 1695Assert.Equal("?", compilation.Assembly.Identity.Name); 1702Assert.Equal("?", compilation.Assembly.Name); 1703Assert.Equal("?", compilation.Assembly.Identity.Name); 1710Assert.Equal("ModuleAssemblyName", compilation.Assembly.Name); 1711Assert.Equal("ModuleAssemblyName", compilation.Assembly.Identity.Name); 2372Assert.Null(comp.GetMetadataReference(vbComp.Assembly)); 3105Assert.Equal(2, comp.Assembly.Modules.Length); 3126Assert.Equal(1, comp.Assembly.Modules.Length); 3147Assert.Equal(1, comp.Assembly.Modules.Length); 3478Assert.Same(comp.Assembly.GetPublicSymbol(), types[0].ContainingAssembly); 3573Assert.Same(comp.Assembly.GetPublicSymbol(), types[0].ContainingAssembly); 3615Assert.Same(types[0].ContainingAssembly, current.Assembly.GetPublicSymbol());
Compilation\GetSemanticInfoTests.cs (1)
4056comp.Assembly.GlobalNamespace.GetMember<INamedTypeSymbol>("Program").GetMembers("Any").
Compilation\ReferenceManagerTests.cs (27)
946var mods = compilation.Assembly.Modules.ToArray(); 1001var refs = compilation.Assembly.Modules.Select(module => module.GetReferencedAssemblies()).ToArray(); 1282Assert.NotNull(c1.Assembly); // force creation of SourceAssemblySymbol 1327Assert.Throws<TestException>(() => { var a = c.Assembly; }); 1662Assert.NotEqual(comp.Assembly.Identity, actualIdentity); 1774Assert.Equal(comp1.Assembly, moduleSymbol1.ContainingAssembly); 1781Assert.Equal(comp1.Assembly, moduleTypeSymbol1.ContainingAssembly); 1787Assert.Equal(comp2.Assembly, moduleSymbol2.ContainingAssembly); 1793Assert.Equal(comp2.Assembly, moduleTypeSymbol2.ContainingAssembly); 1844Assert.NotSame(cPublic.Assembly.CorLibrary, cInternal.Assembly.CorLibrary); 1845Assert.NotSame(cAll.Assembly.CorLibrary, cInternal.Assembly.CorLibrary); 1846Assert.NotSame(cAll.Assembly.CorLibrary, cPublic.Assembly.CorLibrary); 1848Assert.Same(cPublic.Assembly.CorLibrary, cPublic2.Assembly.CorLibrary); 1849Assert.Same(cInternal.Assembly.CorLibrary, cInternal2.Assembly.CorLibrary); 1850Assert.Same(cAll.Assembly.CorLibrary, cAll2.Assembly.CorLibrary); 2063Assert.Equal("B, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ce65828c82a341f2", libBv1.Assembly.Identity.GetDisplayName()); 2064Assert.Equal("B, Version=2.0.0.0, Culture=neutral, PublicKeyToken=ce65828c82a341f2", libBv2.Assembly.Identity.GetDisplayName()); 2152var assembly1 = corlib1.Assembly; 2155var assembly2 = corlib2.Assembly; 2171Assert.Equal("System.Numerics.Vectors, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", vectors40.Assembly.Identity.GetDisplayName()); 2178Assert.Equal("System.Numerics.Vectors, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", vectors41.Assembly.Identity.GetDisplayName());
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
3242Assert.Equal(compilation.Assembly.GlobalNamespace, info.Type.ContainingSymbol); //error type resides in global namespace
DeclarationTests.cs (2)
292var type = compilation.Assembly.GlobalNamespace.GetTypeMembers().First(); 339var type = compilation.Assembly.GlobalNamespace.GetTypeMembers().First();
DocumentationComments\MethodDocumentationCommentTests.cs (1)
205var type = compilation.Assembly.GlobalNamespace.GetMember<NamedTypeSymbol>("C");
Symbols\AssemblyAndNamespaceTests.cs (6)
31var sym = comp.Assembly; 385Assert.Equal(objectType, comp.Assembly.GetSpecialType(SpecialType.System_Object)); 386Assert.Equal(objectType, comp.Assembly.CorLibrary.GetSpecialType(SpecialType.System_Object)); 438Assert.Null(comp.Assembly.GetTypeByMetadataName("System.Threading.Tasks.Task")); 439Assert.Equal(taskType, comp.Assembly.CorLibrary.GetTypeByMetadataName("System.Threading.Tasks.Task")); 688Assert.True(comp.Assembly.Identity.IsRetargetable);
Symbols\CompilationCreationTests.cs (8)
97var arrayOfc107 = ArrayTypeSymbol.CreateCSharpArray(c1.Assembly, TypeWithAnnotations.Create(c107)); 113Assert.NotNull(tc1.Assembly); // force creation of SourceAssemblySymbol 115var cyclic1Asm = (SourceAssemblySymbol)tc1.Assembly; 2524var typeC5 = c5.Assembly.GlobalNamespace.GetTypeMembers("C5").Single(); 2565SourceAssemblySymbol c1AsmSource = (SourceAssemblySymbol)c1.Assembly; 2570SourceAssemblySymbol c2AsmSource = (SourceAssemblySymbol)c2.Assembly; 2707var boundRefs = compilation.Assembly.BoundReferences(); 2978var sourceAssembly = lib2.Assembly;
Symbols\CorLibrary\Choosing.cs (1)
44Assert.Same(corLib.Assembly, obj.ContainingAssembly);
Symbols\CorLibrary\CorTypes.cs (3)
189Assert.Same(c1.Assembly, c1.Assembly.CorLibrary); 191MetadataOrSourceAssemblySymbol msCorLibRef = (MetadataOrSourceAssemblySymbol)c1.Assembly;
Symbols\CovariantReturnTests.cs (7)
462var coreLibrary = comp.GetMetadataReference(comp.Assembly.CorLibrary); 467var originalCorLib = comp.Assembly.CorLibrary; 468var newCorLib = result.Assembly.CorLibrary; 484var coreLibrary = comp.GetMetadataReference(comp.Assembly.CorLibrary); 503var coreLibrary = comp.GetMetadataReference(comp.Assembly.CorLibrary); 519var originalCorLib = comp.Assembly.CorLibrary; 520var newCorLib = result.Assembly.CorLibrary;
Symbols\DefaultInterfaceImplementationTests.cs (389)
119Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 171Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 290Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 347Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 363Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 430Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 487Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 503Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 581Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 679Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 781Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 883Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 970Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1045Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1124Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1203Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1282Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1366Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1454Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1542Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1668Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1726Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1747Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1874Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1913Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 1931Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2105Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2184Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2206Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2582Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2636Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2653Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 2973Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3009Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3045Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3086Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3111Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3136Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3166Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3200Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3234Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3273Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3298Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3323Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3362Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3451Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3517Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3602Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3725Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3867Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 3985Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4137Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4396Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4473Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4492Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4536Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4582Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4738Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4789Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4805Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 4870Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5106Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5143Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5171Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5208Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5247Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5300Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5386Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5503Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5594Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5739Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5828Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5858Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5956Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5968Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6014Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6033Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6083Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6129Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6192Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6223Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6239Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6286Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6357Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6371Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6544Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6601Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6622Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 6946Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7049Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7140Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7247Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7420Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7480Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7534Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7562Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7666Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7699Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7715Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7763Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7815Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 7972Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 8088Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 8248Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 8366Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 8402Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 8615Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 8682Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9044Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9095Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9233Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9260Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9268Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9285Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9298Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9311Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9450Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9465Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9475Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9890Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9902Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9910Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 9922Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10136Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10195Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10306Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10374Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10459Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10509Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10577Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10679Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10884Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10918Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10930Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 10941Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11850Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11884Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11893Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11910Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11918Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11926Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11986Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 11999Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12008Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12025Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12040Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12047Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12106Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12122Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12131Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12148Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12163Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12176Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12615Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12626Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12640Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12703Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12714Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12728Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12791Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12802Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12816Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12895Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 12950Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 13023Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 13080Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 13570Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 13661Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 13900Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14609Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14708Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14915Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14923Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14935Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14961Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14969Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 14988Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 15113Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 15121Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 15132Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 15140Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 15148Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 16178Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 16310Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 16582Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 16770Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 16920Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 16927Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17018Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17268Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17459Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17513Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17530Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17544Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 17729Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18285Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18318Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18332Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18460Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18468Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18487Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18498Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 18507Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 19840Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 19894Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 19911Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 19925Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 20173Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 21555Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 22044Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 22134Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 22373Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 22628Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 24510Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 24542Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 26534Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 26571Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 26610Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 26746Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 26802Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 27136Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 27226Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28120Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28198Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28421Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28429Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28481Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28504Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28512Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 28531Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 29581Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 29699Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 29995Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30106Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30268Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30321Assert.False(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30441Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30662Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30864Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30918Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30933Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 30947Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 32962Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 32978Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 32994Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33120Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33144Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33230Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33285Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33310Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33436Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33484Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33533Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33591Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33653Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33717Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33763Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33802Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33887Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 33983Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34144Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34160Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34176Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34191Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34197Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34213Assert.True(compilation6.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34285Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34466Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34492Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34504Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34543Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34588Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34686Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34692Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34706Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34800Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34897Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 34915Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36389Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36407Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36424Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36432Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36577Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36595Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36612Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36620Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36765Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36783Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36800Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36808Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36890Assert.True(comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 36989Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37005Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37021Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37277Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37294Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37525Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37608Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37955Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 37990Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38005Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38404Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38423Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38441Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38449Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38744Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38803Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38829Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38841Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38883Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 38912Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 39005Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 39011Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 39018Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 39109Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 39178Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 39196Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40017Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40035Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40053Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40215Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40245Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40395Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40426Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40575Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40618Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40666Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40790Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40856Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 40930Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41072Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41090Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41108Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41125Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41131Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41144Assert.True(compilation6.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41241Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41465Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41491Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41503Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41545Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41590Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41671Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41677Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41691Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41785Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41854Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 41872Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42022Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42042Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42061Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42069Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42226Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42246Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42265Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42273Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42430Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42450Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42469Assert.True(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 42477Assert.True(compilation5.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 45005Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 45847Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 45939Assert.False(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 46115Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 46203Assert.False(compilation4.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 46259Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49610Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49611Assert.False(compilation1.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49621Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49622Assert.True(compilation1.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49655Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49656Assert.Same(compilation1.Assembly, compilation1.Assembly.CorLibrary); 49664Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49665Assert.True(compilation2.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49771Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49772Assert.Same(compilation1.Assembly, compilation1.Assembly.CorLibrary); 49780Assert.False(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49781Assert.False(compilation2.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 49921Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 49922Assert.False(compilation1.Assembly.CorLibrary.RuntimeSupportsDefaultInterfaceImplementation); 67713Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 67878Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 67906Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 67934Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 68685Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 68691Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 68702Assert.True(compilation3.Assembly.RuntimeSupportsDefaultInterfaceImplementation);
Symbols\ExtensionMethodTests.cs (2)
117var refType = compilation.Assembly.GlobalNamespace.GetMember<NamedTypeSymbol>("A"); 2528var arrayType = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(stringType), 1);
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1962Assert.NotSame(testConvention!.ContainingAssembly.CorLibrary, mainComp.Assembly.CorLibrary);
Symbols\ImplicitClassTests.cs (2)
30var n = ((NamespaceSymbol)c.Assembly.GlobalNamespace.GetMembers("N").Single()); 60var scriptClass = (NamedTypeSymbol)c.Assembly.GlobalNamespace.GetMember("Script");
Symbols\Metadata\PE\BaseTypeResolution.cs (2)
313Assert.Equal("System.Object", ((SourceModuleSymbol)c1.Assembly.Modules[0]).GetCorLibType(SpecialType.System_Object).ToTestDisplayString()); 318Assert.Equal("System.Object[missing]", ((SourceModuleSymbol)c2.Assembly.Modules[0]).GetCorLibType(SpecialType.System_Object).ToTestDisplayString());
Symbols\Metadata\PE\LoadingMetadataTokens.cs (1)
104var assembly = compilation.Assembly;
Symbols\Metadata\PE\NoPia.cs (4)
372var localTypes1Asm = localTypes1.Assembly; 376var localTypes2Asm = localTypes2.Assembly; 693Assert.NotNull(tc1.Assembly); // force creation of SourceAssemblySymbol 696Assert.NotNull(tc2.Assembly); // force creation of SourceAssemblySymbol
Symbols\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.cs (4)
484var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 500var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 516var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 564var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies();
Symbols\Metadata\PE\NoPiaLocalHideAndTypeSubstitutionTests.cs (13)
33var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 94var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 128var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 191var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 228var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 263var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 294var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 322var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 344var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 367var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 428Assert.True(localType2.Assembly.GetNoPiaResolutionAssemblies().First(arg => arg.Name == "Dummy1").IsLinked); 436var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies(); 476var localConsumerRefsAsm = localConsumer.Assembly.GetNoPiaResolutionAssemblies();
Symbols\Metadata\PE\TypeForwarders.cs (5)
114Assert.Equal(funcType, compilation.Assembly.GetTypeByMetadataName(funcTypeMetadataName, includeReferences: true, isWellKnownType: false, conflicts: out var _)); 1621Assert.Equal(new[] { "CF1" }, GetNamesOfForwardedTypes(modCompilation.Assembly)); 1630Assert.Equal(new[] { "CF1" }, GetNamesOfForwardedTypes(appCompilation.Assembly)); 1632var module = (PEModuleSymbol)appCompilation.Assembly.Modules[1]; 1686module = (PEModuleSymbol)appCompilation.Assembly.Modules[1];
Symbols\MockSymbolTests.cs (3)
28ArrayTypeSymbol ats1 = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(elementType), rank: 1); 37ArrayTypeSymbol ats2 = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(elementType), rank: 2); 45ArrayTypeSymbol ats3 = ArrayTypeSymbol.CreateCSharpArray(compilation.Assembly, TypeWithAnnotations.Create(elementType), rank: 3);
Symbols\NamespaceExtentTests.cs (2)
21var a1 = c1.Assembly; 22var a2 = c2.Assembly;
Symbols\Retargeting\NoPia.cs (8)
296Assert.Same(assemblies[2], LocalTypes1.Assembly.CorLibrary); 297Assert.Same(assemblies[2], LocalTypes2.Assembly.CorLibrary); 1264Assert.NotNull(tc1.Assembly); // force creation of SourceAssemblySymbol 1267Assert.NotNull(tc2.Assembly); // force creation of SourceAssemblySymbol 1290Assert.NotNull(tc1.Assembly); // force creation of SourceAssemblySymbol 1293Assert.NotNull(tc2.Assembly); // force creation of SourceAssemblySymbol 1320Assert.NotNull(tc1.Assembly); // force creation of SourceAssemblySymbol 1323Assert.NotNull(tc2.Assembly); // force creation of SourceAssemblySymbol
Symbols\Retargeting\RetargetCustomAttributes.cs (1)
72var c1Assembly = compilation1.Assembly;
Symbols\Retargeting\RetargetCustomModifiers.cs (2)
35var c1Assembly = c1.Assembly; 149var c1Assembly = c1.Assembly;
Symbols\Retargeting\RetargetingTests.cs (21)
342var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 379var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 411var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 439var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 465var retargetingAssembly = new RetargetingAssemblySymbol((SourceAssemblySymbol)comp.Assembly, isLinked: false); 489var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 521var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 550var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 579var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 609var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 646var sourceAssembly = (SourceAssemblySymbol)comp.Assembly; 667var sourceAssembly = (SourceAssemblySymbol)compilation.Assembly; 733NamedTypeSymbol c1 = comp1.Assembly.GlobalNamespace.GetTypeMembers("C1").Single(); 845Assert.NotSame(originalComp.Assembly, mRetargeted.ContainingAssembly); 847Assert.Same(originalComp.Assembly, ((RetargetingAssemblySymbol)mRetargeted.ContainingAssembly).UnderlyingAssembly); 985return (retargeted1.Assembly, retargeted2.Assembly, consistent.Assembly, originalComp, retargetedComp); 989AssemblyIdentity assemblyIdentity = comp.Assembly.Identity; 1076Assert.NotSame(containingAssembly, beforeRetargeting.Assembly); 1077Assert.Same(containingAssembly, afterRetargeting.Assembly);
Symbols\Source\EventTests.cs (1)
42var actualSymbols = comp.Assembly.GlobalNamespace.GetMembers();
Symbols\Source\FileModifierTests.cs (2)
4383Assert.NotEqual(comp.Assembly.CorLibrary, comp2.Assembly.CorLibrary);
Symbols\Source\MethodTests.cs (1)
1427NamedTypeSymbol nts = comp.Assembly.GlobalNamespace.GetTypeMembers()[0];
Symbols\Source\ModifierTests.cs (1)
159var arrayType = ArrayTypeSymbol.CreateCSharpArray(comp.Assembly, TypeWithAnnotations.Create(typeParamType, customModifiers: customModifiers)); // This is legal, but we're already manually constructing types.
Symbols\StaticAbstractMembersInInterfacesTests.cs (12)
5302Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5303Assert.True(compilation1.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces); 5338Assert.True(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5339Assert.True(compilation1.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces); 5380Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5381Assert.False(compilation1.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces); 5395Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5396Assert.False(compilation2.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces); 5421Assert.False(compilation1.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5422Assert.False(compilation1.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces); 5436Assert.True(compilation2.Assembly.RuntimeSupportsDefaultInterfaceImplementation); 5437Assert.False(compilation2.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces);
Symbols\SymbolErrorTests.cs (6)
7094Assert.Equal(1, comp.Assembly.Modules[1].GlobalNamespace.GetTypeMembers("<ModuleA01>f__AnonymousType0", 1).Length); 7095Assert.Equal(1, comp.Assembly.Modules[2].GlobalNamespace.GetTypeMembers("<ModuleB01>f__AnonymousType0", 1).Length); 7961Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 7962if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation) 18814Assert.Equal(RuntimeUtilities.IsCoreClrRuntime, comp.Assembly.RuntimeSupportsCovariantReturnsOfClasses); 18815if (comp.Assembly.RuntimeSupportsDefaultInterfaceImplementation)
Symbols\TypeResolutionTests.cs (10)
73Assert.Same(c2.Assembly, c2TestClass.ContainingAssembly); 125var intSym = c.Assembly.GetTypeByReflectionType(typeof(int)); 129var strcmpSym = c.Assembly.GetTypeByReflectionType(typeof(StringComparison)); 133var arraySym = c.Assembly.GetTypeByReflectionType(typeof(List<int>[][,,])); 137var ptrSym = c.Assembly.GetTypeByReflectionType(typeof(char).MakePointerType().MakePointerType()); 142var nestedSym1 = c.Assembly.GetTypeByReflectionType(typeof(C<int, bool>.D.E<double, float>.F<byte>)); 151var err = c.Assembly.GetTypeByReflectionType(typeof(C<Process, bool>.D.E<double, float>.F<byte>)); 154err = c.Assembly.GetTypeByReflectionType(typeof(C<int, bool>.D.E<double, Process>.F<byte>)); 157err = c.Assembly.GetTypeByReflectionType(typeof(Process[])); 160err = c.Assembly.GetTypeByReflectionType(typeof(SyntaxKind).MakePointerType());
Symbols\TypeTests.cs (6)
927var typeSym = comp.Assembly.GlobalNamespace.GetTypeMembers().First(); 945NamedTypeSymbol testTypeSymbol = comp.Assembly.GlobalNamespace.GetTypeMembers("Test").Single() as NamedTypeSymbol; 967var typeSym = comp.Assembly.GlobalNamespace.GetTypeMembers("MyClass").First(); 981NamedTypeSymbol testTypeSymbol = comp.Assembly.GlobalNamespace.GetTypeMembers("MyClass").Single() as NamedTypeSymbol; 994NamedTypeSymbol testTypeSymbol = comp.Assembly.GlobalNamespace.GetTypeMembers("X").Single() as NamedTypeSymbol; 1017var typeSym = comp.Assembly.GlobalNamespace.GetTypeMembers("SubGenericClass").First();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
CompilingTestBase.cs (1)
30(SourceAssemblySymbol)compilation.Assembly,
CSharpTestBase.cs (2)
1447Assert.NotNull(c.Assembly); // force creation of SourceAssemblySymbol 1449((SourceAssemblySymbol)c.Assembly).lazyAssemblyIdentity = identity;
Extensions.cs (1)
95return (SourceAssemblySymbol)@this.Assembly;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (2)
Metadata\WinMdEventTests.cs (2)
2874var retargetingAssembly = new RetargetingAssemblySymbol((SourceAssemblySymbol)comp.Assembly, isLinked: false); 2875retargetingAssembly.SetCorLibrary(comp.Assembly.CorLibrary);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
MetadataAsSource\AbstractMetadataAsSourceTests.cs (1)
112var generatedSymbol = generatedCompilation.Assembly.GetTypeByMetadataName(symbolName);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Workspaces\TryFindSourceDefinitionTests.vb (1)
256Assert.NotEqual(retargetedClass.ContainingAssembly, retargetedCompilation.Assembly)
Microsoft.CodeAnalysis.Features (19)
AddImport\SymbolReferenceFinder.cs (2)
234if (!symbol.IsAccessibleWithin(_semanticModel.Compilation.Assembly)) 391s.Symbol.IsAccessibleWithin(_semanticModel.Compilation.Assembly));
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (2)
180var suppressionTargetInfo = new SuppressionTargetInfo() { TargetSymbol = compilation.Assembly }; 339targetSymbol ??= semanticModel.Compilation.Assembly;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
182var targetSymbol = compilation.Assembly;
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (2)
287if (compilation?.Assembly?.Identity?.IsStrongName == true) 289return GetPublicKeyAsHexString(compilation.Assembly.Identity.PublicKey);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (2)
174var originatingAssembly = _originatingSemanticModel.Compilation.Assembly; 234var internalsVisible = _originatingSemanticModel.Compilation.Assembly.IsSameAssemblyOrHasFriendAccessTo(assembly);
Completion\Providers\ImportCompletionProvider\TypeImportCompletionCacheEntry.cs (1)
71var isInternalsVisible = originCompilation.Assembly.IsSameAssemblyOrHasFriendAccessTo(assemblySymbol);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
232var assembly = compilation.Assembly;
FullyQualify\AbstractFullyQualifyService.cs (2)
246if (!searchResult.IsAccessibleWithin(semanticModel.Compilation.Assembly)) 291=> Enumerable.Any(@namespace.GetAllTypes(cancellationToken), t => t.IsAccessibleWithin(model.Compilation.Assembly));
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
311.Where(n => n.NamespaceKind == NamespaceKind.Module && n.ContainingAssembly == compilation.Assembly)
Snippets\SnippetProviders\AbstractForLoopSnippetProvider.cs (2)
39.GetAccessibleMembersInThisAndBaseTypes<IPropertySymbol>(propertyName, compilation.Assembly) 40.FirstOrDefault(p => p is { GetMethod: { } getMethod } && getMethod.IsAccessibleWithin(compilation.Assembly) && IsSuitableIntegerType(p.Type));
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
64return compilation.Assembly.IsSameAssemblyOrHasFriendAccessTo(symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_Property.cs (1)
66updatedProperty = updatedProperty.RemoveInaccessibleAttributesAndAttributesOfTypes(compilation.Assembly, attributesToRemove);
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
56var assemblyToScope = model.Compilation.Assembly;
Microsoft.CodeAnalysis.Features.UnitTests (3)
FindUsages\DefinitionItemFactoryTests.cs (3)
134var a = compilation.Assembly; 212var m = compilation.Assembly.Modules.Single(); 439var symbol = compilation.Assembly.GlobalNamespace;
Microsoft.CodeAnalysis.Test.Utilities (6)
CommonTestBase.cs (2)
97var module = compilation.Assembly.Modules.First(); 394((SourceAssemblySymbol)compilation.Assembly).lazyAssemblyIdentity = assemblyIdentity;
Compilation\IRuntimeEnvironment.cs (1)
214var identity = referencedCompilation.Assembly.Identity;
CompilationVerifier.cs (1)
498return _compilation.Assembly.Identity.GetDisplayName();
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
796if (ns.ContainingAssembly != context.Compilation.Assembly || ns.ConstituentNamespaces.Length > 1)
Platform\Desktop\DesktopRuntimeEnvironment.cs (1)
220var identity = mainCompilation.Assembly.Identity;
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (3)
LineCommit\CommitBufferManager.vb (3)
314refCompilation.Assembly().GivesAccessTo(compilation.Assembly) 322refAssembly.GivesAccessTo(compilation.Assembly)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (99)
Attributes\AssemblyAttributes.vb (44)
41Assert.Equal(New Version(1, 2, 3, 4), other.Assembly.Identity.Version) 222Assert.Equal("1.2.3.4", DirectCast(other.Assembly, SourceAssemblySymbol).FileVersion) 239Assert.Equal("65535.65535.65535.65535", DirectCast(other.Assembly, SourceAssemblySymbol).FileVersion) 256Assert.Equal("1.2", DirectCast(other.Assembly, SourceAssemblySymbol).FileVersion) 315Assert.Equal("One Hundred Years Of Solitude", DirectCast(other.Assembly, SourceAssemblySymbol).Title) 316Assert.Equal(False, DirectCast(other.Assembly, SourceAssemblySymbol).MightContainNoPiaLocalTypes()) 333Assert.Null(DirectCast(other.Assembly, SourceAssemblySymbol).Title) 350Assert.Equal("A classic of magical realist literature", DirectCast(other.Assembly, SourceAssemblySymbol).Description) 369Assert.Equal("pt-BR", other.Assembly.Identity.CultureName) 584dependencies:={New ModuleData(en_usRef.Compilation.Assembly.Identity, 617dependencies:={New ModuleData(en_UKRef.Compilation.Assembly.Identity, 621New ModuleData(neutralRef.Compilation.Assembly.Identity, 686Assert.Equal("MossBrain", DirectCast(other.Assembly, SourceAssemblySymbol).Company) 694Assert.Equal("微软", DirectCast(other.Assembly, SourceAssemblySymbol).Company) 712Assert.Equal("Sound Cannon", DirectCast(other.Assembly, SourceAssemblySymbol).Product) 728Assert.Equal("مايكروسوفت", DirectCast(other.Assembly, SourceAssemblySymbol).Copyright) 744Assert.Equal("circle r", DirectCast(other.Assembly, SourceAssemblySymbol).Trademark) 761Assert.Equal("1.2.3garbage", DirectCast(other.Assembly, SourceAssemblySymbol).InformationalVersion) 1310Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1344Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length) 1427Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1455Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length) 1491TestDuplicateAssemblyAttributesNotEmitted(consoleappCompilation.Assembly, 1496TestDuplicateAssemblyAttributesNotEmitted(consoleappCompilation.Assembly, 1501Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1544TestDuplicateAssemblyAttributesNotEmitted(consoleappCompilation.Assembly, 1550Dim attrs = DirectCast(consoleappCompilation.Assembly, SourceAssemblySymbol). 1599Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1634Dim attrs = comp.Assembly.GetAttributes() 1643attrs = comp.Assembly.GetAttributes() 1651attrs = comp.Assembly.GetAttributes() 1672TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1708TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1735TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1745TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1776TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1823TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1858TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 1897TestDuplicateAssemblyAttributesNotEmitted(comp.Assembly, 2011Dim m = DirectCast(appCompilation.Assembly.Modules(1), PEModuleSymbol) 2080Assert.Equal(3, appCompilation.Assembly.Modules.Length) 2130Assert.Equal(3, appCompilation.Assembly.Modules.Length) 2178Assert.Equal(3, appCompilation.Assembly.Modules.Length) 2227Assert.Equal(3, appCompilation.Assembly.Modules.Length)
Attributes\InternalsVisibleToAndStrongNameTests.vb (41)
84Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)) 104Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 114Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)) 134Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 144Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)) 163Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)) 182Assert.True(ByteSequenceComparer.Equals(s_publicKey, other.Assembly.Identity.PublicKey)) 210Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 220Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)) 239Assert.True(ByteSequenceComparer.Equals(TestResources.General.snPublicKey.AsImmutableOrNull(), other.Assembly.Identity.PublicKey)) 270Assert.True(comp.Assembly.Identity.PublicKey.IsEmpty) 280Assert.True(ByteSequenceComparer.Equals(s_publicKey, comp.Assembly.Identity.PublicKey)) 302Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 350Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 369Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 387Assert.True(ByteSequenceComparer.Equals(s_publicKey, c.Assembly.Identity.PublicKey)) 420Assert.True(ByteSequenceComparer.Equals(s_publicKey, c.Assembly.Identity.PublicKey)) 511Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 540Assert.True(other.Assembly.Identity.PublicKey.IsEmpty) 755Dim unused = requestor.Assembly.Identity 788Dim unused = requestor.Assembly.Identity 827Dim unused = requestor.Assembly.Identity 856Dim unused = requestor.Assembly.Identity 892Dim unused = requestor.Assembly.Identity 893Assert.True(DirectCast(other.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 925Dim unused = requestor.Assembly.Identity 959Dim unused = requestor.Assembly.Identity 992Assert.True(DirectCast(other.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 1023Assert.False(DirectCast(other.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 1057Assert.True(DirectCast(giver.Assembly, IAssemblySymbol).GivesAccessTo(requestor.Assembly)) 1142Assert.Equal(TestResources.General.snMaxSizePublicKey, comp.Assembly.Identity.PublicKey) 1143AssertEx.Equal(Of Byte)(pubKeyTokenBytes, comp.Assembly.Identity.PublicKeyToken) 1160Assert.Equal(TestResources.General.snMaxSizePublicKey, comp2.Assembly.Identity.PublicKey) 1161AssertEx.Equal(Of Byte)(pubKeyTokenBytes, comp2.Assembly.Identity.PublicKeyToken) 1167Assert.Equal(TestResources.General.snMaxSizePublicKey, comp3.Assembly.Identity.PublicKey) 1168AssertEx.Equal(Of Byte)(pubKeyTokenBytes, comp3.Assembly.Identity.PublicKeyToken) 1993Assert.True(comp.Assembly.PublicKey.IsDefaultOrEmpty)
CodeGen\CodeGenTuples.vb (5)
8956ns = comp.CreateErrorNamespaceSymbol(comp.Assembly.GlobalNamespace, "a") 8960Assert.Same(comp.Assembly.GlobalNamespace, ns.ContainingSymbol) 8961Assert.Same(comp.Assembly.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly) 8962Assert.Same(comp.Assembly.GlobalNamespace.ContainingModule, ns.ContainingModule) 8982vt2 = comp.CreateErrorTypeSymbol(comp.CreateErrorNamespaceSymbol(comp.Assembly.GlobalNamespace, "System"), "ValueTuple", 2).Construct(intType, intType)
Emit\EditAndContinue\AssemblyReferencesTests.vb (9)
158DirectCast(lib0.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity("Lib", version0) 162DirectCast(lib1.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity("Lib", version1) 166DirectCast(lib2.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity("Lib", version2) 201"Lib, " & lib0.Assembly.Identity.Version.ToString(), 203"Lib, " & lib0.Assembly.Identity.Version.ToString(), 205"Lib, " & lib0.Assembly.Identity.Version.ToString() 243DirectCast(lib0.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity("Lib", New Version(1, 0, 2000, 1001)) 247DirectCast(lib1.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity("Lib", New Version(1, 0, 2000, 1002)) 251DirectCast(lib2.Assembly, SourceAssemblySymbol).m_lazyIdentity = New AssemblyIdentity("Lib", New Version(1, 0, 2000, 1003))
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (2)
CompilationContext.vb (1)
576binder = New SourceModuleBinder(binder, DirectCast(compilation.Assembly.Modules(0), SourceModuleSymbol))
EETypeNameDecoder.vb (1)
74Return _compilation.Assembly.Modules.Single()
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (30)
Binding\LookupTests.vb (1)
953Dim system = c.Assembly.Modules(0).GetReferencedAssemblySymbols()(0).GlobalNamespace.GetMembers("System").OfType(Of PENamespaceSymbol)().Single()
Compilation\CompilationAPITests.vb (13)
304Assert.Equal(asmname, comp.Assembly.Name) 406Assert.Null(comp.Assembly.GetTypeByMetadataName("System.Array")) 407Assert.Equal("E", comp.Assembly.GetTypeByMetadataName("A.B.C+D+E").Name) 2069Assert.Equal("?", c.Assembly.Name) 2070Assert.Equal("?", c.Assembly.Identity.Name) 2076Assert.Equal("?", c.Assembly.Name) 2077Assert.Equal("?", c.Assembly.Identity.Name) 2083Assert.Equal("ModuleAssemblyName", c.Assembly.Name) 2084Assert.Equal("ModuleAssemblyName", c.Assembly.Identity.Name) 2509Assert.Null(comp.GetMetadataReference(csComp.Assembly)) 2558TestEqualityRecursive(compilation.Assembly.GlobalNamespace, 2559compilation.Assembly.GlobalNamespace, 2561Function(ns) compilation.Assembly.GetAssemblyNamespace(ns))
Compilation\ReferenceManagerTests.vb (2)
1665Dim assembly1 = corlib1.Assembly 1668Dim assembly2 = corlib2.Assembly
Semantics\Conversions.vb (3)
46Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) 225Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) 1077Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol)
Semantics\OverloadResolution.vb (11)
94Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) 101Dim TestClass1 = c1.Assembly.GlobalNamespace.GetTypeMembers("TestClass1").Single() 138Dim base = c1.Assembly.GlobalNamespace.GetTypeMembers("Base").Single() 139Dim baseExt = c1.Assembly.GlobalNamespace.GetTypeMembers("BaseExt").Single() 141Dim derived = c1.Assembly.GlobalNamespace.GetTypeMembers("Derived").Single() 142Dim derivedExt = c1.Assembly.GlobalNamespace.GetTypeMembers("DerivedExt").Single() 143Dim ext = c1.Assembly.GlobalNamespace.GetTypeMembers("Ext").Single() 144Dim ext1 = c1.Assembly.GlobalNamespace.GetTypeMembers("Ext1").Single() 182Dim TestClass2 = c1.Assembly.GlobalNamespace.GetTypeMembers("TestClass2").Single() 3060Dim sourceModule = DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol) 3067Dim TestClass1 = c1.Assembly.GlobalNamespace.GetTypeMembers("TestClass1").Single()
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (30)
SymbolsTests\AnonymousTypes\AnonymousTypesSemanticsTests.vb (1)
2031Dim srcAssembly = DirectCast(c.Assembly, SourceAssemblySymbol)
SymbolsTests\CompilationCreationTests.vb (5)
30Return DirectCast(this.Assembly, SourceAssemblySymbol) 95Dim type As NamedTypeSymbol = c1.Assembly.GetSpecialType(CType(i, SpecialType)) 246Assert.NotNull(tc1.Assembly) ' force creation of SourceAssemblySymbol 248Dim cyclic1Asm = DirectCast(tc1.Assembly, SourceAssemblySymbol) 1963Dim typeC5 = c5.[Assembly].GlobalNamespace.GetTypeMembers("C5").Single()
SymbolsTests\CorLibrary\CorTypes.vb (7)
158Assert.Same(c1.Assembly, c1.Assembly.CorLibrary) 160Dim msCorLibRef = DirectCast(c1.Assembly, MetadataOrSourceAssemblySymbol) 165Dim t = c1.Assembly.GetSpecialType(CType(i, SpecialType)) 176Dim t = c1.Assembly.GetSpecialType(CType(i, InternalSpecialType)) 191Assert.Same(system_object, c1.Assembly.GetSpecialType(SpecialType.System_Object)) 245Assert.Same(c2.Assembly, c2TestClass.ContainingAssembly)
SymbolsTests\Metadata\PE\BaseTypeResolution.vb (2)
296Assert.Equal("System.Object", DirectCast(c1.Assembly.Modules(0), SourceModuleSymbol).GetCorLibType(SpecialType.System_Object).ToTestDisplayString()) 301Assert.Equal("System.Object[missing]", DirectCast(c2.Assembly.Modules(0), SourceModuleSymbol).GetCorLibType(SpecialType.System_Object).ToTestDisplayString())
SymbolsTests\Metadata\PE\LoadingMetadataTokens.vb (1)
98Dim assembly = compilation.Assembly
SymbolsTests\Metadata\PE\NoPia.vb (4)
281Dim localTypes1Asm = localTypes1.Assembly 284Dim localTypes2Asm = localTypes2.Assembly 545Assert.NotNull(tc1.Assembly) 547Assert.NotNull(tc2.Assembly)
SymbolsTests\Metadata\PE\NoPiaInstantiationOfGenericClassAndStruct.vb (2)
416Dim localConsumerRefsAsm = localConsumer.[Assembly].GetNoPiaResolutionAssemblies() 427Dim localConsumerRefsAsm = localConsumer.[Assembly].GetNoPiaResolutionAssemblies()
SymbolsTests\Metadata\PE\TypeForwarders.vb (2)
102Assert.Equal(funcType, comp.Assembly.GetTypeByMetadataName(funcTypeMetadataName, includeReferences:=True, isWellKnownType:=True, conflicts:=Nothing)) 1212Return GetNamesOfForwardedTypes(appCompilation.Assembly)
SymbolsTests\MyBaseMyClassSemanticsTests.vb (1)
180Dim srcAssembly = DirectCast(c.Assembly, SourceAssemblySymbol)
SymbolsTests\Retargeting\NoPia.vb (2)
575Assert.NotNull(tc1.Assembly) 577Assert.NotNull(tc2.Assembly)
SymbolsTests\Retargeting\RetargetCustomModifiers.vb (2)
31Dim c1Assembly = c1.Assembly 105Dim c1Assembly = c1.Assembly
SymbolsTests\WithStatementSymbolsTests.vb (1)
333Dim srcAssembly = DirectCast(c.Assembly, SourceAssemblySymbol)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (4)
CompilationTestUtils.vb (4)
43Assert.NotNull(c.Assembly) ' force creation Of SourceAssemblySymbol 44DirectCast(c.Assembly, SourceAssemblySymbol).m_lazyIdentity = identity 132Assert.NotNull(c.Assembly) ' force creation of SourceAssemblySymbol 134DirectCast(c.Assembly, SourceAssemblySymbol).m_lazyIdentity = identity
Microsoft.CodeAnalysis.Workspaces (18)
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
213var referencedProject = solution.GetProject(previous.Assembly, cancellationToken);
FindSymbols\SymbolFinder.cs (1)
173symbol.ContainingAssembly.Equals(compilation.Assembly))
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
122var assembly = compilation?.Assembly;
Recommendations\AbstractRecommendationService.cs (2)
114_context.SemanticModel.Compilation.Assembly, 137return namespaceSymbol.ContainsAccessibleTypesOrNamespaces(_context.SemanticModel.Compilation.Assembly);
Shared\Extensions\ISolutionExtensions.cs (1)
31results.Add(compilation.Assembly.GlobalNamespace);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\CompilationExtensions.cs (2)
42if (ReferenceEquals(currentType.ContainingAssembly, compilation.Assembly)) 51case Utilities.SymbolVisibility.Internal when currentType.ContainingAssembly.GivesAccessTo(compilation.Assembly):
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ICompilationExtensions.cs (2)
46var referencedAssemblySymbols = compilation.Assembly.Modules.First().ReferencedAssemblySymbols; 65builder.Add(previous.Assembly);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
463var namedParameter = IsAttributeNamedParameter(member, within ?? compilation.Assembly);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
84(ISymbol)semanticModel.Compilation.Assembly;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AssemblySymbolKey.cs (2)
30if (ignoreAssemblyKey || compilation.Assembly.Identity.Name == assemblyName) 32result.AddIfNotNull(compilation.Assembly);
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (1)
252RecordSourceOfAssemblySymbol(compilation.Assembly, projectId);
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (2)
28/// return true if the symbol is <see cref="Compilation.Assembly"/>. If <paramref name="primary"/> is 29/// false, then it can return true if <paramref name="symbol"/> is <see cref="Compilation.Assembly"/> or any
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (1)
100if (this.Compilation.Assembly.Equals(symbol))
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SymbolKeyTests.cs (1)
1532GetDeclaredSymbols(compilation.Assembly.GlobalNamespace, list);
Microsoft.Extensions.Logging.Generators (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Extensions.Options.SourceGeneration (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Gen.Logging (4)
src\Generators\Shared\RoslynExtensions.cs (4)
50type ??= compilation.Assembly?.GetTypeByMetadataName(fullyQualifiedMetadataName); 55if (compilation.Assembly is null) 61foreach (var module in compilation.Assembly.Modules) 74case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Gen.Metrics (4)
src\Generators\Shared\RoslynExtensions.cs (4)
50type ??= compilation.Assembly?.GetTypeByMetadataName(fullyQualifiedMetadataName); 55if (compilation.Assembly is null) 61foreach (var module in compilation.Assembly.Modules) 74case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Interop.ComInterfaceGenerator (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Interop.LibraryImportGenerator (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Interop.LibraryImportGenerator.Downlevel (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.Interop.SourceGeneration (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendAnalyzer.cs (1)
62var myAssembly = comp.Assembly;
Microsoft.VisualStudio.LanguageServices (7)
Library\ObjectBrowser\AbstractListItemFactory.cs (6)
322if (IncludeMemberSymbol(member, compilation.Assembly)) 363if (IncludeMemberSymbol(member, compilation.Assembly)) 446: compilation.Assembly; 667var typeMembers = GetAccessibleTypeMembers(namespaceSymbol, compilation.Assembly); 679foreach (var nestedTypeMember in GetAccessibleTypeMembers(typeSymbol, compilation.Assembly)) 739namespaceSymbol = compilation.Assembly.GlobalNamespace;
Library\VsNavInfo\NavInfoFactory.cs (1)
147var isCompilationAssembly = containingAssembly.Identity.Equals(compilation.Assembly.Identity);
Mvc.Analyzers.Test (1)
TopLevelParameterNameAnalyzerTest.cs (1)
411var modelType = compilation.Assembly.GetTypeByMetadataName("Microsoft.AspNetCore.Mvc.Analyzers.TopLevelParameterNameAnalyzerTestFiles.TestController");
System.Private.CoreLib.Generators (3)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (3)
140INamespaceSymbol systemRuntimeIntrinsicsNamespace = GetNamespace(context.Compilation.Assembly, "System", "Runtime", "Intrinsics"); 141INamedTypeSymbol? bypassReadyToRunAttribute = context.Compilation.Assembly.GetTypeByMetadataName("System.Runtime.BypassReadyToRunAttribute"); 142INamedTypeSymbol? compExactlyDependsOn = context.Compilation.Assembly.GetTypeByMetadataName("System.Runtime.CompilerServices.CompExactlyDependsOnAttribute");
System.Text.Json.SourceGeneration (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):
System.Text.RegularExpressions.Generator (3)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (3)
44type ??= compilation.Assembly.GetTypeByMetadataName(fullyQualifiedMetadataName); 49foreach (var module in compilation.Assembly.Modules) 60case SymbolVisibility.Internal when referencedAssembly.GivesAccessTo(compilation.Assembly):