6 implementations of ContainingAssembly
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
84public IAssemblySymbol ContainingAssembly { get; }
Microsoft.CodeAnalysis.CSharp (2)
Symbols\PublicModel\PreprocessingSymbol.cs (1)
108IAssemblySymbol? ISymbol.ContainingAssembly => null;
Symbols\PublicModel\Symbol.cs (1)
205IAssemblySymbol ISymbol.ContainingAssembly => UnderlyingSymbol.ContainingAssembly.GetPublicSymbol();
Microsoft.CodeAnalysis.Features (1)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
31public IAssemblySymbol ContainingAssembly => _symbol.ContainingAssembly;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1175Private ReadOnly Property ISymbol_ContainingAssembly As IAssemblySymbol Implements ISymbol.ContainingAssembly
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
84public IAssemblySymbol ContainingAssembly { get; }
265 references to ContainingAssembly
Aspire.Hosting.Analyzers (1)
Infrastructure\WellKnownTypes.cs (1)
102if (type.ContainingAssembly.Identity.Name.StartsWith("Aspire.", StringComparison.Ordinal))
Microsoft.Analyzers.Local (4)
Utilities\SymbolExtensions.cs (4)
76if (symbol.ContainingAssembly != null 77&& symbol.ContainingAssembly.HasAttribute(contaminationAttribute)) 126if (symbol.ContainingAssembly != null 127&& symbol.ContainingAssembly.HasAttribute(attributeName))
Microsoft.AspNetCore.App.Analyzers (2)
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
107if (type.ContainingAssembly.Identity.Name.StartsWith("System.", StringComparison.Ordinal) 108|| type.ContainingAssembly.Identity.Name.StartsWith("Microsoft.", StringComparison.Ordinal))
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.AspNetCore.Http.RequestDelegateGenerator (3)
src\Shared\RoslynUtils\WellKnownTypes.cs (2)
107if (type.ContainingAssembly.Identity.Name.StartsWith("System.", StringComparison.Ordinal) 108|| type.ContainingAssembly.Identity.Name.StartsWith("Microsoft.", StringComparison.Ordinal))
StaticRouteHandlerModel\InvocationOperationExtensions.cs (1)
31targetOperation.TargetMethod.ContainingAssembly.Name is "Microsoft.AspNetCore.Routing" &&
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
ApiControllerFacts.cs (1)
29!method.ContainingAssembly.HasAttribute(symbolCache.IApiBehaviorMetadata))
SymbolApiResponseMetadataProvider.cs (2)
50method.ContainingAssembly.GetAttributes(symbolCache.ProducesErrorResponseTypeAttribute).FirstOrDefault(); 166attributes = method.ContainingAssembly.GetAttributes(symbolCache.ApiConventionTypeAttribute).ToArray();
Microsoft.CodeAnalysis (4)
Compilation\Compilation.cs (3)
1261var corLib = ObjectType.ContainingAssembly; 1746return assemblyIsInReferences(s.ContainingAssembly ?? this.Assembly); 1748return assemblyIsInReferences(s.ContainingAssembly);
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
57var assemblyScopedNamespaceSymbol = namespaceSymbol.ConstituentNamespaces.FirstOrDefault(ns => ns.ContainingAssembly == assemblyToScope);
Microsoft.CodeAnalysis.CodeStyle (25)
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\ISymbolExtensions.cs (4)
577return symbol.ContainingAssembly.GivesAccessTo(finalDestination.ContainingAssembly) 581return symbol.ContainingAssembly.GivesAccessTo(finalDestination.ContainingAssembly)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (6)
203? IsNonNestedTypeAccessible(type.ContainingAssembly, type.DeclaredAccessibility, within) 216var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 258var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 295return withinAssembly.IsSameAssemblyOrHasFriendAccessTo(containingType.ContainingAssembly); 298if (!withinAssembly.IsSameAssemblyOrHasFriendAccessTo(containingType.ContainingAssembly)) 309if (withinAssembly.IsSameAssemblyOrHasFriendAccessTo(containingType.ContainingAssembly))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
711foreach (var attributeData in type.ContainingAssembly.GetAttributes())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (1)
79var compilation = ((ISourceAssemblySymbol)symbol.ContainingAssembly).Compilation;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
40/// the "same" <see cref="ISymbol.ContainingAssembly"/>. 157var compilation = ((ISourceAssemblySymbol)symbol.ContainingAssembly).Compilation;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (2)
46visitor.WriteSymbolKey(symbol.ContainingAssembly); 682 => contextualSymbol?.ContainingAssembly,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
269WriteSymbolKey(location.MetadataModule!.ContainingAssembly);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (5)
278=> AssembliesAreEquivalent(x.ContainingAssembly, y.ContainingAssembly) && x.Name == y.Name; 398x.ContainingAssembly != null && 399!AssemblyIdentityComparer.SimpleNameComparer.Equals(x.ContainingAssembly.Name, y.ContainingAssembly.Name) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
141=> CombineHashCodes(x.ContainingAssembly, Hash.Combine(x.Name, currentHash));
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
150symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (2)
73return compilation.Assembly.IsSameAssemblyOrHasFriendAccessTo(symbol.ContainingAssembly); 339symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
164else if (state.ContainingType.ContainingAssembly.IsSameAssemblyOrHasFriendAccessTo(state.TypeToGenerateIn.ContainingAssembly))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
19namedType.ContainingAssembly,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
35: base(containingType?.ContainingAssembly, containingType, attributes, declaredAccessibility, modifiers, name, documentationCommentXml)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (3)
51if (symbol.ContainingAssembly == null) 64symbol.ContainingAssembly.Equals(compilation.Assembly)) 76var project = solution.GetProject(symbol.ContainingAssembly, cancellationToken);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\Compilation_WellKnownMembers.cs (1)
806var stringArray = ArrayTypeSymbol.CreateSZArray(stringType.ContainingAssembly, TypeWithAnnotations.Create(stringType));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\CodeGenTupleTest.cs (6)
6229Assert.Same(comp.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly); 6237Assert.Same(comp.Assembly.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly); 6245Assert.Same(comp.SourceModule.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly);
Emit\DeterministicTests.cs (1)
362Assert.Same(forwardedToCompilation2.Assembly.GetPublicSymbol(), type.ContainingAssembly);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (23)
Attributes\AttributeTests_Nullable.cs (1)
581Assert.Equal(assemblyName, attributeType.ContainingAssembly.Name);
RefReadonlyParameterTests.cs (2)
1485Assert.Equal("Assembly2", modifier.ContainingAssembly.Name); 1497Assert.Equal("Assembly1", modifier.ContainingAssembly.Name);
Semantics\ExperimentalAttributeTests.cs (20)
88Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 107Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 149Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 173Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 216Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 254Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 283Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 320Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 407Assert.Equal(ObsoleteAttributeKind.None, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 431Assert.Equal(ObsoleteAttributeKind.None, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 474Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 501Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 563Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("C").ContainingAssembly.ObsoleteKind); 566Assert.Equal(ObsoleteAttributeKind.Experimental, comp.GetTypeByMetadataName("D").ContainingAssembly.ObsoleteKind); 595Assert.Equal(ObsoleteAttributeKind.Experimental, c.ContainingAssembly.ObsoleteKind); 636Assert.Equal(ObsoleteAttributeKind.Experimental, c.ContainingAssembly.ObsoleteKind); 950Assert.IsType<RetargetingAssemblySymbol>(derived.ContainingAssembly); 951Assert.Equal(ObsoleteAttributeKind.Experimental, derived.ContainingAssembly.ObsoleteKind); 978Assert.IsType<RetargetingAssemblySymbol>(derived.ContainingAssembly); 979Assert.Equal(ObsoleteAttributeKind.None, derived.ContainingAssembly.ObsoleteKind);
Microsoft.CodeAnalysis.CSharp.Features (5)
AddImport\CSharpAddImportFeatureService.cs (1)
565var metadataReference = semanticModel.Compilation.GetMetadataReference(namespaceSymbol.ContainingAssembly);
DecompiledSource\CSharpDecompiledSourceService.cs (2)
72var assemblyInfo = MetadataAsSourceHelpers.GetAssemblyInfo(symbol.ContainingAssembly); 74var assemblyPath = MetadataAsSourceHelpers.GetAssemblyDisplay(compilation, symbol.ContainingAssembly);
MetadataAsSource\CSharpMetadataAsSourceService.cs (2)
39var assemblyInfo = MetadataAsSourceHelpers.GetAssemblyInfo(symbol.ContainingAssembly); 40var assemblyPath = MetadataAsSourceHelpers.GetAssemblyDisplay(symbolCompilation, symbol.ContainingAssembly);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\AccessCheckTests.cs (2)
738IAssemblySymbol sourceAssem = c.SourceModule.ContainingAssembly; 899IAssemblySymbol sourceAssem = c1.SourceModule.ContainingAssembly;
Semantics\InitOnlyMemberTests.cs (2)
4764Assert.Equal("corlibWithIsExternalInit", comp.GetTypeByMetadataName("System.Runtime.CompilerServices.IsExternalInit").ContainingAssembly.Name); 4773Assert.Equal(expectedAssemblyName, comp.GetTypeByMetadataName("System.Runtime.CompilerServices.IsExternalInit").ContainingAssembly.Name);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
Compilation\CompilationAPITests.cs (14)
1734Assert.Same(compilation.ObjectType.ContainingAssembly, taskOfT.ContainingAssembly); 1735Assert.Same(compilation.ObjectType.ContainingAssembly, taskOfObject.ContainingAssembly); 3478Assert.Same(comp.Assembly.GetPublicSymbol(), types[0].ContainingAssembly); 3482Assert.Same(types[1].ContainingAssembly, assembly1); 3508Assert.Same(types[0].ContainingAssembly, assembly1); 3538Assert.Same(types[0].ContainingAssembly, assembly1); 3541Assert.Same(types[1].ContainingAssembly, assembly2); 3573Assert.Same(comp.Assembly.GetPublicSymbol(), types[0].ContainingAssembly); 3578Assert.Same(types[1].ContainingAssembly, assembly1); 3581Assert.Same(types[2].ContainingAssembly, assembly2); 3615Assert.Same(types[0].ContainingAssembly, current.Assembly.GetPublicSymbol()); 3618Assert.Same(types[1].ContainingAssembly, corlibAssembly); 3621Assert.Same(types[2].ContainingAssembly, otherAssembly); 3648Assert.Same(type.ContainingAssembly, corlibAssembly);
Compilation\SemanticModelAPITests.cs (3)
3854Assert.Equal("lib", target.ContainingAssembly.Name); 4605Assert.Null(alias1.ContainingAssembly); 4631Assert.Null(alias1.ContainingAssembly);
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
1386var test = symbolsInC.Where(s => s.ContainingAssembly == null).ToList();
Compilation\UsedAssembliesTests.cs (3)
97Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used[0])); 644Assert.Same(comp2.ObjectType.ContainingAssembly, comp2.GetAssemblyOrModuleSymbol(used[0])); 2333Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used[0]));
DocumentationComments\CrefTests.cs (1)
2018AssertEx.SetEqual(info.CandidateSymbols.Select(sym => sym.ContainingAssembly.Name), "Lib1", "Lib2");
Symbols\AssemblyAndNamespaceTests.cs (2)
45Assert.Null(sym.ContainingAssembly); 71Assert.Equal("Test", sym.ContainingAssembly.Name);
Symbols\CorLibrary\Choosing.cs (1)
44Assert.Same(corLib.Assembly, obj.ContainingAssembly);
Symbols\CorLibrary\CorTypes.cs (2)
203Assert.Same(msCorLibRef, t.ContainingAssembly); 215Assert.Same(msCorLibRef, t.ContainingAssembly);
Symbols\FunctionPointerTypeSymbolTests.cs (1)
1962Assert.NotSame(testConvention!.ContainingAssembly.CorLibrary, mainComp.Assembly.CorLibrary);
Symbols\Retargeting\RetargetingTests.cs (5)
40var sourceAssembly = (SourceAssemblySymbol)sourceModule.ContainingAssembly; 111var sourceAssembly = (SourceAssemblySymbol)sourceModule.ContainingAssembly; 144var sourceAssembly = (SourceAssemblySymbol)sourceModule.ContainingAssembly; 178var sourceAssembly = (SourceAssemblySymbol)sourceModule.ContainingAssembly; 214var sourceAssembly = (SourceAssemblySymbol)sourceModule.ContainingAssembly;
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekableItemFactory.cs (1)
69var originatingProject = solution.GetProject(symbol.ContainingAssembly, cancellationToken);
Microsoft.CodeAnalysis.Features (25)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
138var assembly = symbol.ContainingAssembly;
ExtractMethod\MethodExtractor.Analyzer.cs (1)
792parameter.ContainingAssembly.IsInteractive &&
FindUsages\DefinitionItemFactory.cs (2)
172var assembly = definition as IAssemblySymbol ?? definition.ContainingAssembly; 205var containingAssembly = constituentNamespace.ContainingAssembly;
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
656symbol.ContainingAssembly);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (2)
721Contract.ThrowIfNull(symbol.ContainingAssembly); 723var metadataLocation = DefinitionItemFactory.GetMetadataLocation(symbol.ContainingAssembly, solution, out var originatingProjectId);
LanguageServiceIndexFormat\SymbolMoniker.cs (2)
38if (symbol.Kind != SymbolKind.Namespace && symbol.ContainingAssembly == null) 58var symbolMoniker = symbol.ContainingAssembly.Name + "#";
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
31public IAssemblySymbol ContainingAssembly => _symbol.ContainingAssembly;
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (4)
90useDecompiler = !symbol.ContainingAssembly.GetAttributes().Any(static attribute => attribute.AttributeClass?.Name == nameof(SuppressIldasmAttribute) 95var refInfo = GetReferenceInfo(compilation, symbol.ContainingAssembly); 371var peMetadataReference = compilation.GetMetadataReference(topLevelNamedType.ContainingAssembly) as PortableExecutableReference; 379var containingAssembly = topLevelNamedType.ContainingAssembly;
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
40this.AssemblyIdentity = topLevelNamedType.ContainingAssembly.Identity;
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (4)
100var assemblyName = symbol.ContainingAssembly.Identity.Name; 101var assemblyVersion = symbol.ContainingAssembly.Identity.Version.ToString(); 112if (compilation.GetMetadataReference(symbol.ContainingAssembly) is not PortableExecutableReference { FilePath: not null and var dllPath }) 126var isReferenceAssembly = MetadataAsSourceHelpers.IsReferenceAssembly(symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
150symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (2)
73return compilation.Assembly.IsSameAssemblyOrHasFriendAccessTo(symbol.ContainingAssembly); 339symbol.ContainingAssembly);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
164else if (state.ContainingType.ContainingAssembly.IsSameAssemblyOrHasFriendAccessTo(state.TypeToGenerateIn.ContainingAssembly))
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
57var assemblyScopedNamespaceSymbol = namespaceSymbol.ConstituentNamespaces.FirstOrDefault(ns => ns.ContainingAssembly == assemblyToScope);
Microsoft.CodeAnalysis.Test.Utilities (3)
Compilation\IRuntimeEnvironment.cs (1)
201var corLibIdentity = compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly.Identity;
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
796if (ns.ContainingAssembly != context.Compilation.Assembly || ns.ConstituentNamespaces.Length > 1)
Platform\CoreClr\CoreCLRRuntimeEnvironment.cs (1)
55var corLibIdentity = mainCompilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly.Identity;
Microsoft.CodeAnalysis.UnitTests (12)
GivesAccessTo.cs (12)
56Assert.True(CS.ContainingAssembly.GivesAccessTo(CS2.ContainingAssembly)); 57Assert.True(CS.ContainingAssembly.GivesAccessTo(VB.ContainingAssembly)); 58Assert.False(CS.ContainingAssembly.GivesAccessTo(VB2.ContainingAssembly)); 60Assert.True(VB.ContainingAssembly.GivesAccessTo(VB2.ContainingAssembly)); 61Assert.True(VB.ContainingAssembly.GivesAccessTo(CS.ContainingAssembly)); 62Assert.False(VB.ContainingAssembly.GivesAccessTo(CS2.ContainingAssembly));
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\Symbol.vb (1)
1175Private ReadOnly Property ISymbol_ContainingAssembly As IAssemblySymbol Implements ISymbol.ContainingAssembly
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (6)
CodeGen\CodeGenTuples.vb (6)
8953Assert.Same(comp.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly) 8961Assert.Same(comp.Assembly.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly) 8969Assert.Same(comp.SourceModule.GlobalNamespace.ContainingAssembly, ns.ContainingAssembly)
Microsoft.CodeAnalysis.VisualBasic.Features (2)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (2)
29Dim assemblyInfo = MetadataAsSourceHelpers.GetAssemblyInfo(symbol.ContainingAssembly) 30Dim assemblyPath = MetadataAsSourceHelpers.GetAssemblyDisplay(symbolCompilation, symbol.ContainingAssembly)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (5)
Compilation\CompilationAPITests.vb (4)
2106Assert.Same(compilation.ObjectType.ContainingAssembly, taskOfT.ContainingAssembly) 2107Assert.Same(compilation.ObjectType.ContainingAssembly, taskOfObject.ContainingAssembly) 2851Assert.Equal("corlibWithValueTupleRef", comp.GetTypeByMetadataName("System.ValueTuple`2").ContainingAssembly.Name) 2857Assert.Equal(expectedAssemblyName, comp.GetTypeByMetadataName("System.ValueTuple`2").ContainingAssembly.Name)
Semantics\AccessCheckTests.vb (1)
721Dim sourceAssem As AssemblySymbol = c.SourceModule.ContainingAssembly
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (3)
UsedAssembliesTests.vb (3)
87Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used(0))) 466Assert.Same(comp2.ObjectType.ContainingAssembly, comp2.GetAssemblyOrModuleSymbol(used(0))) 2057Assert.Same(comp.ObjectType.ContainingAssembly, comp.GetAssemblyOrModuleSymbol(used(0)))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
CompilationTestUtils.vb (3)
1017e.Location.MetadataModule.ContainingAssembly.Identity.Name) 1066Dim name1 = loc1.MetadataModule.ContainingAssembly.Name 1067Dim name2 = loc2.MetadataModule.ContainingAssembly.Name
Microsoft.CodeAnalysis.Workspaces (42)
Editing\SymbolEditor.cs (3)
103var project = ChangedSolution.GetProject(symbol.ContainingAssembly, cancellationToken); 110project = OriginalSolution.GetProject(symbol.ContainingAssembly, cancellationToken); 117foreach (var projectId in this.GetProjectsForAssembly(symbol.ContainingAssembly))
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
111var assembly = symbol.OriginalDefinition.ContainingAssembly;
FindSymbols\FindReferences\DependentTypeFinder.cs (2)
426solution.GetProject(type.ContainingAssembly, cancellationToken) ?? 427solution.GetOriginatingProject(type.ContainingAssembly);
FindSymbols\SymbolFinder_Helpers.cs (3)
134Contract.ThrowIfFalse(equivalentTypesWithDifferingAssemblies.All(kvp => !SymbolEquivalenceComparer.Instance.Equals(kvp.Key.ContainingAssembly, kvp.Value.ContainingAssembly))); 179var candidateAssemblyName = candidate.ContainingAssembly.Name;
Rename\ConflictEngine\ConflictResolver.cs (2)
238var projectOpt = conflictResolution.CurrentSolution.GetProject(renamedSymbol.ContainingAssembly, cancellationToken); 291if (renamedSymbol.ContainingAssembly != null)
Shared\Extensions\INamespaceSymbolExtensions.cs (1)
170if (Equals(constituent.ContainingAssembly, assembly))
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\ISymbolExtensions.cs (4)
577return symbol.ContainingAssembly.GivesAccessTo(finalDestination.ContainingAssembly) 581return symbol.ContainingAssembly.GivesAccessTo(finalDestination.ContainingAssembly)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (6)
203? IsNonNestedTypeAccessible(type.ContainingAssembly, type.DeclaredAccessibility, within) 216var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 258var withinAssembly = (within as IAssemblySymbol) ?? ((INamedTypeSymbol)within).ContainingAssembly; 295return withinAssembly.IsSameAssemblyOrHasFriendAccessTo(containingType.ContainingAssembly); 298if (!withinAssembly.IsSameAssemblyOrHasFriendAccessTo(containingType.ContainingAssembly)) 309if (withinAssembly.IsSameAssemblyOrHasFriendAccessTo(containingType.ContainingAssembly))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
711foreach (var attributeData in type.ContainingAssembly.GetAttributes())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (1)
79var compilation = ((ISourceAssemblySymbol)symbol.ContainingAssembly).Compilation;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (2)
40/// the "same" <see cref="ISymbol.ContainingAssembly"/>. 157var compilation = ((ISourceAssemblySymbol)symbol.ContainingAssembly).Compilation;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (2)
46visitor.WriteSymbolKey(symbol.ContainingAssembly); 682 => contextualSymbol?.ContainingAssembly,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
269WriteSymbolKey(location.MetadataModule!.ContainingAssembly);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (5)
278=> AssembliesAreEquivalent(x.ContainingAssembly, y.ContainingAssembly) && x.Name == y.Name; 398x.ContainingAssembly != null && 399!AssemblyIdentityComparer.SimpleNameComparer.Equals(x.ContainingAssembly.Name, y.ContainingAssembly.Name) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (1)
141=> CombineHashCodes(x.ContainingAssembly, Hash.Combine(x.Name, currentHash));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\INamedTypeSymbolExtensions.cs (1)
19namedType.ContainingAssembly,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationAbstractMethodSymbol.cs (1)
35: base(containingType?.ContainingAssembly, containingType, attributes, declaredAccessibility, modifiers, name, documentationCommentXml)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (3)
51if (symbol.ContainingAssembly == null) 64symbol.ContainingAssembly.Equals(compilation.Assembly)) 76var project = solution.GetProject(symbol.ContainingAssembly, cancellationToken);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
3974var projectForBaseType = solution.GetProject(classC.BaseType.ContainingAssembly); 3982projectForBaseType = solution2.GetProject(classC.BaseType.ContainingAssembly);
Microsoft.Extensions.Options.SourceGeneration (1)
SymbolLoader.cs (1)
52var containingAssemblyName = unconditionalSuppressMessageAttributeSymbol.ContainingAssembly.Identity.Name;
Microsoft.Interop.ComInterfaceGenerator (4)
ComInterfaceInfo.cs (4)
120&& (baseSymbol.ContainingAssembly is not ISourceAssemblySymbol 121|| (baseSymbol.ContainingAssembly is ISourceAssemblySymbol { Compilation: Compilation baseComp } 147if (SymbolEqualityComparer.Default.Equals(baseSymbol.ContainingAssembly, symbol.ContainingAssembly))
Microsoft.Interop.LibraryImportGenerator (5)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
192AttributeData? bestFitMappingContainingAssembly = method.ContainingAssembly.GetAttributes().FirstOrDefault(attr => attr.AttributeClass.ToDisplayString() == TypeNames.System_Runtime_InteropServices_BestFitMappingAttribute);
Analyzers\ConvertToLibraryImportFixer.cs (4)
593CallingConvention.Cdecl => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly. 595CallingConvention.StdCall => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly. 597CallingConvention.ThisCall => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly. 599CallingConvention.FastCall => editor.SemanticModel.Compilation.ObjectType.ContainingAssembly.
Microsoft.Interop.SourceGeneration (5)
IncrementalGeneratorInitializationContextExtensions.cs (2)
37(context, ct) => SymbolEqualityComparer.Default.Equals(context.Attributes[0].AttributeClass.ContainingAssembly, context.SemanticModel.Compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly))
TypeSymbolExtensions.cs (3)
72if (t.ContainingAssembly is not ISourceAssemblySymbol sourceAssembly 83if (t.ContainingAssembly.Equals(compilation.GetSpecialType(SpecialType.System_Object).ContainingAssembly, SymbolEqualityComparer.Default))
Microsoft.Maui.Controls.SourceGen (3)
CodeBehindGenerator.cs (3)
187 .SingleOrDefault(t => t.ContainingAssembly.Identity.Name == "Microsoft.Maui.Controls"); 558 if (type.ContainingAssembly.Identity.Name != typeInfo.assemblyName) 592 if (type.DeclaredAccessibility == Accessibility.Internal && internalsVisible.Contains(type.ContainingAssembly, SymbolEqualityComparer.Default))
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendAnalyzer.cs (1)
80var symbolAssembly = symbol.ContainingAssembly;
Microsoft.VisualStudio.LanguageServices (11)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
165var callingProject = project.Solution.GetProject(caller.CallingSymbol.ContainingAssembly, cancellationToken);
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
163await BuildMemberOfAsync(namespaceSymbol.ContainingAssembly, cancellationToken).ConfigureAwait(true); 245containingSymbol = containingSymbol.ContainingAssembly;
Library\VsNavInfo\NavInfoFactory.cs (3)
66namespaceSymbol.ContainingAssembly, 106typeSymbol.ContainingAssembly, 119memberSymbol.ContainingAssembly,
Progression\GraphBuilder.cs (1)
162var thisProject = project.Solution.GetProject(symbol.ContainingAssembly) ?? project;
Progression\GraphNodeIdCreation.cs (2)
372if (symbol.ContainingAssembly != null) 374return symbol.ContainingAssembly;
ProjectSystem\AbstractEntryPointFinderService.cs (1)
15=> symbol is not { ContainingAssembly: ISourceAssemblySymbol sourceAssembly }
Workspace\VisualStudioSymbolNavigationService.cs (1)
84var assemblyName = symbol.ContainingAssembly.Identity.Name;
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
1267else if (attributeType.ContainingAssembly.Name == SystemTextJsonNamespace)