18 overrides of ContainingModule
Microsoft.CodeAnalysis.CSharp (18)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
382internal override ModuleSymbol ContainingModule
Symbols\MissingMetadataTypeSymbol.cs (1)
220internal override ModuleSymbol ContainingModule
Symbols\ModuleSymbol.cs (1)
47internal sealed override ModuleSymbol ContainingModule
Symbols\NamespaceSymbol.cs (1)
103internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
148internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
96internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
282internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
240internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
89internal sealed override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
208internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
76internal override ModuleSymbol ContainingModule
Symbols\SignatureOnlyMethodSymbol.cs (1)
161internal override ModuleSymbol ContainingModule { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\SignatureOnlyParameterSymbol.cs (1)
101internal override ModuleSymbol ContainingModule { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\SignatureOnlyPropertySymbol.cs (1)
96internal override ModuleSymbol ContainingModule { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
146internal override ModuleSymbol ContainingModule => _containingType.ContainingModule;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
823internal override ModuleSymbol ContainingModule => _containingModule;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
78internal override ModuleSymbol ContainingModule => _module;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
71internal override ModuleSymbol ContainingModule => _containingModule;
139 references to ContainingModule
Microsoft.CodeAnalysis.CSharp (139)
Binder\Binder_Conversions.cs (2)
419if (Compilation.SourceModule != method.ContainingModule) 431Compilation.SourceModule != method.ContainingModule)
Binder\Binder_Expressions.cs (4)
6259initializerType.ContainingModule != Compilation.SourceModule) 8604if ((object)Compilation.SourceModule != fieldSymbol.OriginalDefinition.ContainingModule && 8710if (!Compilation.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces && Compilation.SourceModule != symbol.ContainingModule) 8722else if (!Compilation.Assembly.RuntimeSupportsDefaultInterfaceImplementation && Compilation.SourceModule != symbol.ContainingModule)
Binder\Binder_Invocation.cs (1)
1736if (Compilation.SourceModule != paramsParameter.ContainingModule)
Binder\Binder_Operators.cs (3)
1379operatorMethod.ContainingModule != Compilation.SourceModule) 2394if (Compilation.SourceModule != methodOpt.ContainingModule) 2422if (Compilation.SourceModule != methodOpt.ContainingModule)
Binder\Binder_Symbols.cs (1)
2512return (symbol.ContainingModule == compilation.SourceModule) ?
Binder\ForEachLoopBinder.cs (2)
1269enumeratorType.ContainingModule != Compilation.SourceModule) 1776if (implementedIEnumerable is not null && needSupportForRefStructInterfaces && type.ContainingModule != Compilation.SourceModule)
Binder\RefSafetyAnalysis.cs (1)
24useUpdatedEscapeRules: symbol.ContainingModule.UseUpdatedEscapeRules,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1304(binder.Compilation.LanguageVersion > LanguageVersion.CSharp12 || member.ContainingModule == binder.Compilation.SourceModule)))
Binder\UsingStatementBinder.cs (1)
290(fromExpression ? expressionOpt!.Type : declarationTypeOpt)!.ContainingModule != originalBinder.Compilation.SourceModule)
CodeGen\EmitExpression.cs (2)
1974(object)actualMethodTargetedByTheCall.ContainingModule == (object)_method.ContainingModule)
Compilation\CSharpCompilation.cs (1)
4688if (symbol.ContainingModule != SourceModule)
Emitter\Model\FieldSymbolAdapter.cs (2)
68AdaptedFieldSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 111else if (AdaptedFieldSymbol.ContainingModule == ((PEModuleBuilder)visitor.Context.Module).SourceModule)
Emitter\Model\MethodSymbolAdapter.cs (3)
113if (AdaptedMethodSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 165AdaptedMethodSymbol.ContainingModule == moduleBeingBuilt.SourceModule) // must be declared in the module we are building 195if (AdaptedMethodSymbol.IsDefinition && AdaptedMethodSymbol.ContainingModule == moduleBeingBuilt.SourceModule)
Emitter\Model\NamedTypeSymbolAdapter.cs (6)
138AdaptedNamedTypeSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 172AdaptedNamedTypeSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 210AdaptedNamedTypeSymbol.ContainingModule == moduleBeingBuilt.SourceModule) // must be declared in the module we are building 804return moduleBeingBuilt.Translate(AdaptedNamedTypeSymbol.ContainingModule, context.Diagnostics); 823Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType == null && AdaptedNamedTypeSymbol.ContainingModule is SourceModuleSymbol); 961Debug.Assert(this.ContainingModule is SourceModuleSymbol);
Emitter\Model\ParameterSymbolAdapter.cs (1)
196AdaptedParameterSymbol.ContainingModule == moduleBeingBuilt.SourceModule)
Emitter\Model\PEAssemblyBuilder.cs (1)
578Debug.Assert(userDefinedAttribute is null || (object)userDefinedAttribute.ContainingModule == _sourceAssembly.SourceModule);
Emitter\Model\PEModuleBuilder.cs (13)
695diagnostics.Add(ErrorCode.ERR_ExportedTypeConflictsWithDeclaration, NoLocation.Singleton, type, type.ContainingModule); 715diagnostics.Add(ErrorCode.ERR_ExportedTypesConflict, NoLocation.Singleton, type, type.ContainingModule, contender, contender.ContainingModule); 720diagnostics.Add(ErrorCode.ERR_ForwardedTypeConflictsWithExportedType, NoLocation.Singleton, type, type.ContainingAssembly, contender, contender.ContainingModule); 1494if ((object)Compilation.SourceModule != symbol.ContainingModule) 1505if ((object)Compilation.SourceModule != symbol.ContainingModule) 1516if ((object)Compilation.SourceModule != symbol.ContainingModule) 1527if ((object)Compilation.SourceModule != symbol.ContainingModule) 1538if ((object)Compilation.SourceModule != symbol.ContainingModule) 1554if ((object)Compilation.SourceModule != symbol.ContainingModule) 1615if ((object)module != symbol && (object)module != symbol.ContainingModule) 1643if ((object)Compilation.SourceModule != symbol.ContainingModule) 1689if ((object)Compilation.SourceModule != symbol.ContainingModule)
Emitter\Model\PropertySymbolAdapter.cs (1)
148Debug.Assert(AdaptedPropertySymbol.ContainingModule is SourceModuleSymbol || AdaptedPropertySymbol.ContainingAssembly.IsLinked);
Emitter\Model\SymbolAdapter.cs (1)
67Debug.Assert(this.ContainingModule is SourceModuleSymbol ||
FlowAnalysis\EmptyStructTypeCache.cs (1)
219member.ContainingModule.Ordinal != 0) && // (an added module is imported)
Lowering\LocalRewriter\LocalRewriter.cs (1)
332if (delegateType?.IsAnonymousType == true && delegateType.ContainingModule == _compilation.SourceModule &&
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
744if (delegateType.IsAnonymousType && delegateType.ContainingModule == _compilation.SourceModule &&
Lowering\MethodToClassRewriter.cs (1)
741Debug.Assert(containingType.ContainingModule is SourceModuleSymbol);
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
182get { return ContainingModule.AreLocalsZeroed; }
Symbols\ConstraintsHelper.cs (1)
946if (args.CurrentCompilation.SourceModule != typeParameter.ContainingModule)
Symbols\EventSymbol.cs (1)
292if (this.ContainingModule.HasUnifiedReferences)
Symbols\FieldSymbol.cs (1)
364if (this.ContainingModule.HasUnifiedReferences)
Symbols\Metadata\PE\MetadataDecoder.cs (1)
605if ((object)peMethod != null && ReferenceEquals(peMethod.ContainingModule, moduleSymbol))
Symbols\Metadata\PE\NullableTypeDecoder.cs (1)
29Debug.Assert((object)accessSymbol.ContainingModule == containingModule);
Symbols\Metadata\PE\PEEventSymbol.cs (4)
168NamedTypeSymbol eventRegistrationTokenTable_T = ((PEModuleSymbol)(this.ContainingModule)).EventRegistrationTokenTable_T; 191NamedTypeSymbol token = ((PEModuleSymbol)(this.ContainingModule)).EventRegistrationToken; 364var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 501ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (PEModuleSymbol)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PEFieldSymbol.cs (2)
584var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 671ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (PEModuleSymbol)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PEMethodSymbol.cs (3)
1578var result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, (PEModuleSymbol)ContainingModule, ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: MethodKind == MethodKind.Constructor); 1608var containingModule = (PEModuleSymbol)ContainingModule; 1697internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
795Debug.Assert((object)symbol.ContainingModule == this);
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
1060var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 1188=> PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, (PEModuleSymbol)ContainingModule, Handle, allowedFeatures: CompilerFeatureRequiredFeatures.None, decoder); 1194var containingModule = (PEModuleSymbol)ContainingModule;
Symbols\Metadata\PE\PEPropertySymbol.cs (4)
616var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 631var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 734var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 1008var result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, (PEModuleSymbol)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (7)
159var moduleSymbol = ((PEModuleSymbol)this.ContainingModule); 427return GetConstraintHandleCollection(((PEModuleSymbol)this.ContainingModule).Module); 476if (((PEModuleSymbol)this.ContainingModule).Module.HasNullableAttribute(_handle, out byte value, out _)) 520var moduleSymbol = ((PEModuleSymbol)this.ContainingModule); 643var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 719=> PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, (PEModuleSymbol)ContainingModule, Handle, CompilerFeatureRequiredFeatures.None, decoder); 725var containingModule = (PEModuleSymbol)ContainingModule;
Symbols\MetadataOrSourceAssemblySymbol.cs (1)
85Debug.Assert(corType.ContainingModule.Ordinal == 0);
Symbols\MethodSymbol.cs (1)
968if (this.ContainingModule?.HasUnifiedReferences == true)
Symbols\MissingMetadataTypeSymbol.cs (1)
84ModuleSymbol containingModule = this.ContainingModule;
Symbols\NamedTypeSymbol.cs (3)
1412if (this.ContainingModule.HasUnifiedReferences) 1448Debug.Assert(owner.ContainingModule.HasUnifiedReferences); 1449if (owner.ContainingModule.GetUnificationUseSiteDiagnostic(ref result, this))
Symbols\ObsoleteAttributeHelpers.cs (3)
103if (symbol.ContainingModule.ObsoleteKind is ObsoleteAttributeKind.Experimental 109if (symbol.ContainingModule.ObsoleteKind is ObsoleteAttributeKind.Uninitialized 160var data = symbol.ObsoleteAttributeData ?? symbol.ContainingModule.ObsoleteAttributeData ?? symbol.ContainingAssembly.ObsoleteAttributeData;
Symbols\PropertySymbol.cs (1)
412if (this.ContainingModule.HasUnifiedReferences)
Symbols\PublicModel\Symbol.cs (1)
207IModuleSymbol ISymbol.ContainingModule => UnderlyingSymbol.ContainingModule.GetPublicSymbol();
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
220Debug.Assert((object)underlying.ContainingModule == (object)_retargetingModule.UnderlyingModule);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (15)
44Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 50Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 56Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 62Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 88Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 94Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 100Debug.Assert(ReferenceEquals(symbol.ContainingModule, _underlyingModule)); 279var module = type.ContainingModule; 341if ((object)type.ContainingModule == (object)_retargetingModule.UnderlyingModule) 663if ((object)symbol.OriginalDefinition.ContainingModule == (object)_retargetingModule.UnderlyingModule && 876Debug.Assert(ReferenceEquals(method.ContainingModule, this.UnderlyingModule)); 886if (ReferenceEquals(method.ContainingModule, this.UnderlyingModule) && ReferenceEquals(method, method.OriginalDefinition)) 926Debug.Assert(ReferenceEquals(property.ContainingModule, this.UnderlyingModule)); 934if (ReferenceEquals(property.ContainingModule, this.UnderlyingModule) && ReferenceEquals(property, property.OriginalDefinition)) 950if (ReferenceEquals(@event.ContainingModule, this.UnderlyingModule) && ReferenceEquals(@event, @event.OriginalDefinition))
Symbols\Source\ImplicitNamedTypeSymbol.cs (1)
98get { return ContainingType?.AreLocalsZeroed ?? ContainingModule.AreLocalsZeroed; }
Symbols\Source\SourceAssemblySymbol.cs (2)
1137result = x.ContainingModule.Ordinal - y.ContainingModule.Ordinal;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
4458if (baseToStringMethod.ContainingModule != this.ContainingModule && !this.DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureSealedToStringInRecord))
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1833if (ReferenceEquals(this.ContainingModule, implementingMethodOriginalDefinition.ContainingModule))
Symbols\Source\SourceMethodSymbol.cs (1)
85internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1454return data?.HasSkipLocalsInitAttribute != true && (ContainingType?.AreLocalsZeroed ?? ContainingModule.AreLocalsZeroed);
Symbols\Source\SourceParameterSymbol.cs (1)
254internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Source\ThisParameterSymbol.cs (1)
194=> _containingMethod?.UseUpdatedEscapeRules ?? _containingType.ContainingModule.UseUpdatedEscapeRules;
Symbols\Symbol.cs (4)
211switch (this.ContainingModule) 313IModuleSymbolInternal ISymbolInternal.ContainingModule => this.ContainingModule; 344return (object)container != null ? container.ContainingModule : null; 903return this.ContainingModule.DefaultMarshallingCharSet;
Symbols\Synthesized\Records\SynthesizedRecordObjectMethod.cs (2)
43if (overridden is object && !(overridden.ContainingType is SourceMemberContainerTypeSymbol { IsRecord: true } && overridden.ContainingModule == overriding.ContainingModule))
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
315internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (2)
124public sealed override bool AreLocalsZeroed => ContainingModule.AreLocalsZeroed; 357internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
113public sealed override bool AreLocalsZeroed => ContainingModule.AreLocalsZeroed;
Symbols\Synthesized\SynthesizedInstanceMethodSymbol.cs (1)
84internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
233Symbol symbol => symbol.ContainingModule.UseUpdatedEscapeRules,
Symbols\TypeSymbol.cs (8)
895implementingTypeIsFromSomeCompilation = currType.OriginalDefinition.ContainingModule is not PEModuleSymbol; 1477if ((object)implementingMember != null && implementingMember.OriginalDefinition.ContainingModule is not PEModuleSymbol && implementingMember.IsExplicitInterfaceImplementation()) 1633else if (implementingType.ContainingModule != implicitImpl.ContainingModule) 1738if (implicitImpl.IsStatic && interfaceMember.ContainingModule != implementingType.ContainingModule) 1894implementedMethod.ContainingModule != implementingMethod.ContainingModule)