2 implementations of IModuleSymbol
Microsoft.CodeAnalysis.CSharp (1)
Symbols\PublicModel\ModuleSymbol.cs (1)
12internal sealed class ModuleSymbol : Symbol, IModuleSymbol
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\ModuleSymbol.vb (1)
16Implements IModuleSymbol, IModuleSymbolInternal
147 references to IModuleSymbol
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
ILLink.RoslynAnalyzer (1)
CompilationExtensions.cs (1)
49 foreach (var module in compilation.Assembly.Modules) {
Microsoft.CodeAnalysis (15)
Compilation\Compilation.cs (4)
875/// Gets the <see cref="IAssemblySymbol"/> or <see cref="IModuleSymbol"/> for a metadata reference used to create this 923/// Gets the <see cref="IModuleSymbol"/> for the module being created by compiling all of 926public IModuleSymbol SourceModule { get { return CommonSourceModule; } } 927protected abstract IModuleSymbol CommonSourceModule { get; }
Diagnostic\Location.cs (2)
51public IModuleSymbol? MetadataModule { get { return (IModuleSymbol?)MetadataModuleInternal?.GetISymbol(); } }
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
264foreach (var module in _compilation.Assembly.Modules) 313Debug.Assert(symbol is IAssemblySymbol || symbol is IModuleSymbol);
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
150foreach (var module in assemblySymbol.Modules)
Symbols\IAssemblySymbol.cs (1)
41IEnumerable<IModuleSymbol> Modules { get; }
Symbols\ISymbol.cs (2)
79/// Gets the <see cref="IModuleSymbol"/> for the containing module. Returns null if the 82IModuleSymbol ContainingModule { get; }
Symbols\SymbolVisitor.cs (1)
68public virtual void VisitModule(IModuleSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
71public virtual TResult? VisitModule(IModuleSymbol symbol)
Symbols\SymbolVisitor`2.cs (1)
76public virtual TResult VisitModule(IModuleSymbol symbol, TArgument argument)
Microsoft.CodeAnalysis.CodeStyle (17)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
39/// <item>Two <see cref="IModuleSymbol"/>s are the "same" if they have
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ModuleSymbolKey.cs (5)
11private sealed class ModuleSymbolKey : AbstractSymbolKey<IModuleSymbol> 15public sealed override void Create(IModuleSymbol symbol, SymbolKeyWriter visitor) 19SymbolKeyReader reader, IModuleSymbol? contextualSymbol, out string? failureReason) 29using var result = PooledArrayBuilder<IModuleSymbol>.GetInstance(containingSymbolResolution.SymbolCount); 38if (assemblyModules is ImmutableArray<IModuleSymbol> modules)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
98case IModuleSymbol module:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
743private static IModuleSymbol? GetModule(IEnumerable<IModuleSymbol> modules, string moduleName) 745foreach (var module in modules)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
396public override void VisitModule(IModuleSymbol moduleSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
124SymbolKind.NetModule => ModulesAreEquivalent((IModuleSymbol)x, (IModuleSymbol)y), 277private bool ModulesAreEquivalent(IModuleSymbol x, IModuleSymbol y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
66SymbolKind.NetModule => CombineHashCodes((IModuleSymbol)x, currentHash), 140private int CombineHashCodes(IModuleSymbol x, int currentHash)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
88public IModuleSymbol ContainingModule => null;
Microsoft.CodeAnalysis.CSharp (14)
Compilation\CSharpCompilation.cs (1)
3979protected override IModuleSymbol CommonSourceModule
Emitter\Model\PEModuleBuilder.cs (1)
1614var module = Compilation.SourceModule;
SymbolDisplay\SymbolDisplayVisitor.cs (1)
160public override void VisitModule(IModuleSymbol symbol)
Symbols\PublicModel\AssemblySymbol.cs (2)
17private IEnumerable<IModuleSymbol> _lazyModules; 29IEnumerable<IModuleSymbol> IAssemblySymbol.Modules
Symbols\PublicModel\ModuleSymbol.cs (5)
24INamespaceSymbol IModuleSymbol.GlobalNamespace 32INamespaceSymbol IModuleSymbol.GetModuleNamespace(INamespaceSymbol namespaceSymbol) 37ImmutableArray<IAssemblySymbol> IModuleSymbol.ReferencedAssemblySymbols 45ImmutableArray<AssemblyIdentity> IModuleSymbol.ReferencedAssemblies => _underlying.ReferencedAssemblies; 47ModuleMetadata IModuleSymbol.GetMetadata() => _underlying.GetMetadata();
Symbols\PublicModel\PreprocessingSymbol.cs (1)
110IModuleSymbol? ISymbol.ContainingModule => null;
Symbols\PublicModel\Symbol.cs (1)
207IModuleSymbol ISymbol.ContainingModule => UnderlyingSymbol.ContainingModule.GetPublicSymbol();
Symbols\SymbolExtensions.cs (2)
653internal static IModuleSymbol? GetPublicSymbol(this ModuleSymbol? symbol) 655return symbol.GetPublicSymbol<IModuleSymbol>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
SymbolKey\SymbolKeyCompilationsTests.cs (2)
636var module1 = compilation1.Assembly.Modules.First(); 637var module2 = compilation2.Assembly.Modules.First();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (6)
Emit\CompilationEmitTests.cs (6)
4019var module = assembly.Modules.Single(); 4055var module = assembly.Modules.Single(); 4085var module = assembly.Modules.Single(); 4116var module = assembly.Modules.Single(); 4147var module = assembly.Modules.Single(); 4178var module = assembly.Modules.Single();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
153var m = s1.GetCompilation().Assembly.Modules.Single();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (11)
Semantics\NullableReferenceTypesTests.cs (11)
100379var m = comp.SourceModule; 100418var m = comp.SourceModule; 100438var m = comp.SourceModule; 100493var m = comp.SourceModule; 100537var m = comp.SourceModule; 100582var m = comp.SourceModule; 100621var m = comp.SourceModule; 100915var m = comp.SourceModule; 100964var m = comp.SourceModule; 100991var m = comp.SourceModule; 105038var m = comp.SourceModule;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Compilation\SymbolVisitorTests.cs (3)
107public override void VisitModule(IModuleSymbol symbol) 286public override string VisitModule(IModuleSymbol symbol) 399public override int VisitModule(IModuleSymbol symbol, StringBuilder argument)
DocumentationComments\DocumentationCommentIDTests.cs (1)
197var symbol = comp.SourceModule;
Symbols\AssemblyAndNamespaceTests.cs (1)
59var sym = comp.SourceModule;
Symbols\CSharpCompilerFeatureRequiredTests.cs (1)
53internal override string VisualizeRealIL(IModuleSymbol peModule, CompilationTestData.MethodData methodData, IReadOnlyDictionary<int, string> markers, bool areLocalsZeroed)
Symbols\Retargeting\RetargetingTests.cs (5)
39var sourceModule = compilation.SourceModule; 110var sourceModule = compilation.SourceModule; 143var sourceModule = compilation.SourceModule; 177var sourceModule = compilation.SourceModule; 213var sourceModule = compilation.SourceModule;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
BasicCompilationUtils.cs (1)
47internal override string VisualizeRealIL(IModuleSymbol peModule, MethodData methodData, IReadOnlyDictionary<int, string> markers, bool areLocalsZeroed)
CSharpTestBase.cs (2)
1035Action<IModuleSymbol> translate(Action<ModuleSymbol> action) 1878internal override string VisualizeRealIL(IModuleSymbol peModule, CompilationTestData.MethodData methodData, IReadOnlyDictionary<int, string> markers, bool areLocalsZeroed)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
AbstractTypeParameterChecker.cs (1)
151public sealed override void VisitModule(IModuleSymbol symbol)
Microsoft.CodeAnalysis.Features (3)
FindUsages\DefinitionItemFactory.cs (1)
227if (definition is IAssemblySymbol or IModuleSymbol or INamespaceSymbol { IsGlobalNamespace: true })
LanguageServices\AnonymousTypeDisplayService\AbstractStructuralTypeDisplayService.StructuralTypeCollectorVisitor.cs (1)
63public override void VisitModule(IModuleSymbol symbol)
MetadataAsSource\AbstractMetadataAsSourceService.AbstractWrappedSymbol.cs (1)
33public IModuleSymbol ContainingModule => _symbol.ContainingModule;
Microsoft.CodeAnalysis.Features.UnitTests (1)
FindUsages\DefinitionItemFactoryTests.cs (1)
212var m = compilation.Assembly.Modules.Single();
Microsoft.CodeAnalysis.Test.Utilities (14)
CommonTestBase.cs (7)
78Action<IModuleSymbol> sourceSymbolValidator = null, 80Action<IModuleSymbol> symbolValidator = null, 97var module = compilation.Assembly.Modules.First(); 150internal static void RunValidators(CompilationVerifier verifier, Action<PEAssembly> assemblyValidator, Action<IModuleSymbol> symbolValidator) 170var moduleSymbol = verifier.GetSymbolFromMetadata(reference, verifier.Compilation.Options.MetadataImportOptions); 185Action<IModuleSymbol> symbolValidator, 507internal abstract string VisualizeRealIL(IModuleSymbol peModule, CompilationTestData.MethodData methodData, IReadOnlyDictionary<int, string> markers, bool areLocalsZeroed);
CompilationVerifier.cs (5)
37private IModuleSymbol _lazyModuleSymbol; 43private readonly Func<IModuleSymbol, CompilationTestData.MethodData, IReadOnlyDictionary<int, string>, bool, string> _visualizeRealIL; 47Func<IModuleSymbol, CompilationTestData.MethodData, IReadOnlyDictionary<int, string>, bool, string> visualizeRealIL = null, 688internal IModuleSymbol GetSymbolFromMetadata(MetadataReference metadataReference, MetadataImportOptions importOptions) 704return (IModuleSymbol)symbol;
ICompilationVerifier.cs (2)
14IModuleSymbol GetModuleSymbolForEmittedImage(ImmutableArray<byte> peImage, MetadataImportOptions importOptions); 15IModuleSymbol GetModuleSymbolForEmittedImage();
Microsoft.CodeAnalysis.UnitTests (1)
Symbols\DocumentationCommentIdTests.cs (1)
189IModuleSymbol peModule, CompilationTestData.MethodData methodData, IReadOnlyDictionary<int, string> markers, bool areLocalsZeroed)
Microsoft.CodeAnalysis.VisualBasic (10)
Compilation\VisualBasicCompilation.vb (1)
2811Protected Overrides ReadOnly Property CommonSourceModule As IModuleSymbol
SymbolDisplay\SymbolDisplayVisitor.vb (1)
198Public Overrides Sub VisitModule(symbol As IModuleSymbol)
Symbols\AssemblySymbol.vb (2)
765Private ReadOnly Property IAssemblySymbol_Modules As IEnumerable(Of IModuleSymbol) Implements IAssemblySymbol.Modules 767Return ImmutableArray(Of IModuleSymbol).CastUp(Me.Modules)
Symbols\ModuleSymbol.vb (5)
123Public ReadOnly Property ReferencedAssemblies As ImmutableArray(Of AssemblyIdentity) Implements IModuleSymbol.ReferencedAssemblies 134Public MustOverride Function GetMetadata() As ModuleMetadata Implements IModuleSymbol.GetMetadata 297Private ReadOnly Property IModuleSymbol_GlobalNamespace As INamespaceSymbol Implements IModuleSymbol.GlobalNamespace 303Private Function IModuleSymbol_GetModuleNamespace(namespaceSymbol As INamespaceSymbol) As INamespaceSymbol Implements IModuleSymbol.GetModuleNamespace 307Private ReadOnly Property IModuleSymbol_ReferencedAssemblySymbols As ImmutableArray(Of IAssemblySymbol) Implements IModuleSymbol.ReferencedAssemblySymbols
Symbols\Symbol.vb (1)
1186Private ReadOnly Property ISymbol_ContainingModule As IModuleSymbol Implements ISymbol.ContainingModule
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
SymbolsTests\Metadata\PE\VisualBasicCompilerFeatureRequiredTests.vb (1)
25Friend Overrides Function VisualizeRealIL(peModule As IModuleSymbol, methodData As CompilationTestData.MethodData, markers As IReadOnlyDictionary(Of Integer, String), areLocalsZeroed As Boolean) As String
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
BasicTestBase.vb (2)
19Private Function Translate(action As Action(Of ModuleSymbol)) As Action(Of IModuleSymbol) 450Friend Overrides Function VisualizeRealIL(peModule As IModuleSymbol, methodData As CompilationTestData.MethodData, markers As IReadOnlyDictionary(Of Integer, String), areLocalsZeroed As Boolean) As String
Microsoft.CodeAnalysis.Workspaces (21)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
39/// <item>Two <see cref="IModuleSymbol"/>s are the "same" if they have
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.ModuleSymbolKey.cs (5)
11private sealed class ModuleSymbolKey : AbstractSymbolKey<IModuleSymbol> 15public sealed override void Create(IModuleSymbol symbol, SymbolKeyWriter visitor) 19SymbolKeyReader reader, IModuleSymbol? contextualSymbol, out string? failureReason) 29using var result = PooledArrayBuilder<IModuleSymbol>.GetInstance(containingSymbolResolution.SymbolCount); 38if (assemblyModules is ImmutableArray<IModuleSymbol> modules)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamespaceSymbolKey.cs (1)
98case IModuleSymbol module:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (3)
743private static IModuleSymbol? GetModule(IEnumerable<IModuleSymbol> modules, string moduleName) 745foreach (var module in modules)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
396public override void VisitModule(IModuleSymbol moduleSymbol)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.EquivalenceVisitor.cs (4)
124SymbolKind.NetModule => ModulesAreEquivalent((IModuleSymbol)x, (IModuleSymbol)y), 277private bool ModulesAreEquivalent(IModuleSymbol x, IModuleSymbol y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SymbolEquivalenceComparer.GetHashCodeVisitor.cs (2)
66SymbolKind.NetModule => CombineHashCodes((IModuleSymbol)x, currentHash), 140private int CombineHashCodes(IModuleSymbol x, int currentHash)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationSymbol.cs (1)
88public IModuleSymbol ContainingModule => null;
Workspace\Solution\SolutionCompilationState.cs (1)
30/// Symbols need to be either <see cref="IAssemblySymbol"/> or <see cref="IModuleSymbol"/>.
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (1)
22/// cref="IModuleSymbol"/> or <see cref="IDynamicTypeSymbol"/>.
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (1)
56/// The <see cref="IAssemblySymbol"/>s or <see cref="IModuleSymbol"/>s produced through <see
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
61foreach (var module in compilation.Assembly.Modules)
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
61foreach (var module in compilation.Assembly.Modules)
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
Microsoft.Interop.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
49foreach (var module in compilation.Assembly.Modules)