18 overrides of ContainingModule
Microsoft.CodeAnalysis.CSharp (18)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
596internal override ModuleSymbol ContainingModule
Symbols\MissingMetadataTypeSymbol.cs (1)
220internal override ModuleSymbol ContainingModule
Symbols\ModuleSymbol.cs (1)
47internal sealed override ModuleSymbol ContainingModule
Symbols\NamespaceSymbol.cs (1)
104internal 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)
291internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
283internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
84internal sealed override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
208internal override ModuleSymbol ContainingModule
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
78internal override ModuleSymbol ContainingModule
Symbols\SignatureOnlyMethodSymbol.cs (1)
163internal override ModuleSymbol ContainingModule { get { throw ExceptionUtilities.Unreachable(); } }
Symbols\SignatureOnlyParameterSymbol.cs (1)
107internal 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)
159internal override ModuleSymbol ContainingModule => _containingType.ContainingModule;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (1)
872internal override ModuleSymbol ContainingModule => _containingModule;
Symbols\Synthesized\SynthesizedEmbeddedAttributeSymbol.cs (1)
83internal override ModuleSymbol ContainingModule => _module;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
76internal override ModuleSymbol ContainingModule => _containingModule;
169 references to ContainingModule
Microsoft.CodeAnalysis.CSharp (169)
Binder\Binder_Conversions.cs (3)
484if (Compilation.SourceModule != method.ContainingModule) 496Compilation.SourceModule != method.ContainingModule) 508(Compilation.SourceModule != method.ContainingModule) &&
Binder\Binder_Expressions.cs (4)
6461initializerType.ContainingModule != Compilation.SourceModule) 9212if ((object)Compilation.SourceModule != fieldSymbol.OriginalDefinition.ContainingModule && 9343if (!Compilation.Assembly.RuntimeSupportsStaticAbstractMembersInInterfaces && Compilation.SourceModule != symbol.ContainingModule) 9355else if (!Compilation.Assembly.RuntimeSupportsDefaultInterfaceImplementation && Compilation.SourceModule != symbol.ContainingModule)
Binder\Binder_Invocation.cs (1)
1855if (Compilation.SourceModule != paramsParameter.ContainingModule)
Binder\Binder_Lookup.cs (1)
1457else if (!this.Compilation.SourceModule.Equals(unwrappedSymbol.ContainingModule) && unwrappedSymbol.IsHiddenByCodeAnalysisEmbeddedAttribute())
Binder\Binder_Operators.cs (5)
489if (Compilation.SourceModule != method.ContainingModule) 2224operatorMethod.ContainingModule != Compilation.SourceModule) 3595if (Compilation.SourceModule != method.ContainingModule) 4006if (Compilation.SourceModule != methodOpt.ContainingModule) 4034if (Compilation.SourceModule != methodOpt.ContainingModule)
Binder\Binder_Symbols.cs (4)
2067arg0 = srcSymbol.ContainingModule; 2221arg0 = first.ContainingModule; 2224ModuleSymbol arg2 = second.ContainingModule; 2615return (symbol.ContainingModule == compilation.SourceModule) ?
Binder\ForEachLoopBinder.cs (2)
1288enumeratorType.ContainingModule != Compilation.SourceModule && 1825if (implementedIEnumerable is not null && needSupportForRefStructInterfaces && type.ContainingModule != Compilation.SourceModule &&
Binder\RefSafetyAnalysis.cs (1)
26useUpdatedEscapeRules: symbol.ContainingModule.UseUpdatedEscapeRules,
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
1323(binder.Compilation.LanguageVersion > LanguageVersion.CSharp12 || member.ContainingModule == binder.Compilation.SourceModule)))
Binder\UsingStatementBinder.cs (1)
302(fromExpression ? expressionOpt!.Type : declarationTypeOpt)!.ContainingModule != originalBinder.Compilation.SourceModule)
CodeGen\EmitExpression.cs (2)
2005(object)actualMethodTargetedByTheCall.ContainingModule == (object)_method.ContainingModule)
Compilation\CSharpCompilation.cs (1)
4925if (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)
123if (AdaptedMethodSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 175AdaptedMethodSymbol.ContainingModule == moduleBeingBuilt.SourceModule) // must be declared in the module we are building 205if (AdaptedMethodSymbol.IsDefinition && AdaptedMethodSymbol.ContainingModule == moduleBeingBuilt.SourceModule)
Emitter\Model\NamedTypeSymbolAdapter.cs (6)
139AdaptedNamedTypeSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 175AdaptedNamedTypeSymbol.ContainingModule == moduleBeingBuilt.SourceModule) 213AdaptedNamedTypeSymbol.ContainingModule == moduleBeingBuilt.SourceModule) // must be declared in the module we are building 825return moduleBeingBuilt.Translate(AdaptedNamedTypeSymbol.ContainingModule, context.Diagnostics); 844Debug.Assert((object)AdaptedNamedTypeSymbol.ContainingType == null && AdaptedNamedTypeSymbol.ContainingModule is SourceModuleSymbol); 982Debug.Assert(this.ContainingModule is SourceModuleSymbol);
Emitter\Model\ParameterSymbolAdapter.cs (1)
196AdaptedParameterSymbol.ContainingModule == moduleBeingBuilt.SourceModule)
Emitter\Model\PEAssemblyBuilder.cs (1)
707Debug.Assert(userDefinedAttribute is null || (object)userDefinedAttribute.ContainingModule == _sourceAssembly.SourceModule);
Emitter\Model\PEModuleBuilder.cs (15)
748diagnostics.Add(ErrorCode.ERR_ExportedTypeConflictsWithDeclaration, NoLocation.Singleton, type, type.ContainingModule); 768diagnostics.Add(ErrorCode.ERR_ExportedTypesConflict, NoLocation.Singleton, type, type.ContainingModule, contender, contender.ContainingModule); 773diagnostics.Add(ErrorCode.ERR_ForwardedTypeConflictsWithExportedType, NoLocation.Singleton, type, type.ContainingAssembly, contender, contender.ContainingModule); 843Debug.Assert(type is { ContainingModule: SourceModuleSymbol } or PENamedTypeSymbol or RetargetingNamedTypeSymbol); 1646if ((object)Compilation.SourceModule != symbol.ContainingModule) 1657if ((object)Compilation.SourceModule != symbol.ContainingModule) 1668if ((object)Compilation.SourceModule != symbol.ContainingModule) 1679if ((object)Compilation.SourceModule != symbol.ContainingModule) 1690if ((object)Compilation.SourceModule != symbol.ContainingModule) 1701if ((object)Compilation.SourceModule != symbol.ContainingModule) 1717if ((object)Compilation.SourceModule != symbol.ContainingModule) 1778if ((object)module != symbol && (object)module != symbol.ContainingModule) 1806if ((object)Compilation.SourceModule != symbol.ContainingModule) 1852if ((object)Compilation.SourceModule != symbol.ContainingModule)
Emitter\Model\PropertySymbolAdapter.cs (1)
148Debug.Assert(AdaptedPropertySymbol.ContainingModule is SourceModuleSymbol || AdaptedPropertySymbol.ContainingAssembly.IsLinked);
Emitter\Model\SymbolAdapter.cs (1)
68Debug.Assert(this.ContainingModule is SourceModuleSymbol ||
FlowAnalysis\EmptyStructTypeCache.cs (1)
220member.ContainingModule.Ordinal != 0) && // (an added module is imported)
Lowering\ClosureConversion\LambdaCapturedVariable.cs (2)
189if (ContainingModule == definition.ContainingModule)
Lowering\LocalRewriter\LocalRewriter.cs (1)
336if (delegateType?.IsAnonymousType == true && delegateType.ContainingModule == _compilation.SourceModule &&
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
759if (delegateType.IsAnonymousType && delegateType.ContainingModule == _compilation.SourceModule &&
Lowering\MethodToClassRewriter.cs (1)
391Debug.Assert(containingType.ContainingModule is SourceModuleSymbol);
Lowering\StateMachineRewriter\StateMachineFieldSymbol.cs (2)
104if (ContainingModule == definition.ContainingModule)
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.TypeOrDelegateTemplateSymbol.cs (1)
193get { return ContainingModule.AreLocalsZeroed; }
Symbols\ConstraintsHelper.cs (1)
968if (args.CurrentCompilation is not null && args.CurrentCompilation.SourceModule != typeParameter.ContainingModule)
Symbols\EventSymbol.cs (1)
297if (this.ContainingModule.HasUnifiedReferences)
Symbols\FieldSymbol.cs (1)
366if (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 (7)
171NamedTypeSymbol eventRegistrationTokenTable_T = ((PEModuleSymbol)(this.ContainingModule)).EventRegistrationTokenTable_T; 194NamedTypeSymbol token = ((PEModuleSymbol)(this.ContainingModule)).EventRegistrationToken; 367var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 543ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (PEModuleSymbol)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false); 555var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 568return ContainingModule.UseUpdatedMemorySafetyRules 583return ContainingModule.UseUpdatedMemorySafetyRules
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
693ObsoleteAttributeHelpers.InitializeObsoleteDataFromMetadata(ref _lazyObsoleteAttributeData, _handle, (PEModuleSymbol)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PEMethodSymbol.cs (5)
1701var result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, (PEModuleSymbol)ContainingModule, ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: MethodKind == MethodKind.Constructor); 1731var containingModule = (PEModuleSymbol)ContainingModule; 1822internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules; 1826if (ContainingModule.UseUpdatedMemorySafetyRules) 1846return ContainingModule.UseUpdatedMemorySafetyRules
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
684Debug.Assert((object)symbol.ContainingModule == this);
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
1131var containingModule = (PEModuleSymbol)ContainingModule; 1257=> PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, (PEModuleSymbol)ContainingModule, Handle, allowedFeatures: CompilerFeatureRequiredFeatures.None, decoder); 1263var containingModule = (PEModuleSymbol)ContainingModule;
Symbols\Metadata\PE\PEPropertySymbol.cs (7)
639var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 654var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 669var containingPEModuleSymbol = (PEModuleSymbol)this.ContainingModule; 681return ContainingModule.UseUpdatedMemorySafetyRules 696return ContainingModule.UseUpdatedMemorySafetyRules 829var containingModule = (PEModuleSymbol)this.ContainingModule; 1104var result = ObsoleteAttributeHelpers.GetObsoleteDataFromMetadata(_handle, (PEModuleSymbol)(this.ContainingModule), ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (7)
160var moduleSymbol = ((PEModuleSymbol)this.ContainingModule); 428return GetConstraintHandleCollection(((PEModuleSymbol)this.ContainingModule).Module); 477if (((PEModuleSymbol)this.ContainingModule).Module.HasNullableAttribute(_handle, out byte value, out _)) 521var moduleSymbol = ((PEModuleSymbol)this.ContainingModule); 651var containingModule = (PEModuleSymbol)this.ContainingModule; 731=> PEUtilities.DeriveCompilerFeatureRequiredAttributeDiagnostic(this, (PEModuleSymbol)ContainingModule, Handle, CompilerFeatureRequiredFeatures.None, decoder); 737var containingModule = (PEModuleSymbol)ContainingModule;
Symbols\MetadataOrSourceAssemblySymbol.cs (1)
85Debug.Assert(corType.ContainingModule.Ordinal == 0);
Symbols\MethodSymbol.cs (1)
985if (this.ContainingModule?.HasUnifiedReferences == true)
Symbols\MissingMetadataTypeSymbol.cs (1)
84ModuleSymbol containingModule = this.ContainingModule;
Symbols\NamedTypeSymbol.cs (3)
1652if (this.ContainingModule.HasUnifiedReferences) 1688Debug.Assert(owner.ContainingModule.HasUnifiedReferences); 1689if (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)
411if (this.ContainingModule.HasUnifiedReferences)
Symbols\PublicModel\Symbol.cs (1)
207IModuleSymbol ISymbol.ContainingModule => UnderlyingSymbol.ContainingModule.GetPublicSymbol();
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
231Debug.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)
1138result = x.ContainingModule.Ordinal - y.ContainingModule.Ordinal;
Symbols\Source\SourceEventSymbol.cs (1)
481if (ContainingModule.UseUpdatedMemorySafetyRules)
Symbols\Source\SourceMemberContainerSymbol.cs (4)
392this.ContainingModule.UseUpdatedMemorySafetyRules) 965internal bool IntroducesUnsafeContext => HasUnsafeModifier && !ContainingModule.UseUpdatedMemorySafetyRules; 5298if (baseToStringMethod.ContainingModule != this.ContainingModule && !this.DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureSealedToStringInRecord))
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1905if (ReferenceEquals(this.ContainingModule, implementingMethodOriginalDefinition.ContainingModule))
Symbols\Source\SourceMethodSymbol.cs (3)
94internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules; 102internal bool IntroducesUnsafeContext => HasUnsafeModifier && !ContainingModule.UseUpdatedMemorySafetyRules; 114if (ContainingModule.UseUpdatedMemorySafetyRules)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1511return data?.HasSkipLocalsInitAttribute != true && (ContainingType?.AreLocalsZeroed ?? ContainingModule.AreLocalsZeroed);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
416if ((object)baseType.ContainingModule != DeclaringCompilation.SourceModule)
Symbols\Source\SourceParameterSymbol.cs (1)
254internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Source\SourcePropertySymbol.cs (1)
829if (ContainingModule.UseUpdatedMemorySafetyRules)
Symbols\Source\SourcePropertySymbolBase.cs (1)
1613if (!this.ContainingModule.UseUpdatedEscapeRules)
Symbols\Source\ThisParameterSymbol.cs (1)
207=> _containingMethod?.UseUpdatedEscapeRules ?? _containingType.ContainingModule.UseUpdatedEscapeRules;
Symbols\Symbol.cs (4)
209switch (this.ContainingModule) 311IModuleSymbolInternal ISymbolInternal.ContainingModule => this.ContainingModule; 342return (object)container != null ? container.ContainingModule : null; 910return 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)
319internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Synthesized\SynthesizedGlobalMethodSymbol.cs (2)
124public sealed override bool AreLocalsZeroed => ContainingModule.AreLocalsZeroed; 361internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Synthesized\SynthesizedHotReloadExceptionSymbol.cs (1)
134public sealed override bool AreLocalsZeroed => ContainingModule.AreLocalsZeroed;
Symbols\Synthesized\SynthesizedMethodSymbol.cs (1)
100internal sealed override bool UseUpdatedEscapeRules => ContainingModule.UseUpdatedEscapeRules;
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
233Symbol symbol => symbol.ContainingModule.UseUpdatedEscapeRules,
Symbols\Synthesized\SynthesizedTypeParameterSymbol.cs (2)
52if (ContainingSymbol.ContainingModule == definition.ContainingModule)
Symbols\TypeSymbol.cs (8)
899implementingTypeIsFromSomeCompilation = currType.OriginalDefinition.ContainingModule is not PEModuleSymbol; 1487if ((object)implementingMember != null && implementingMember.OriginalDefinition.ContainingModule is not PEModuleSymbol && implementingMember.IsExplicitInterfaceImplementation()) 1643else if (implementingType.ContainingModule != implicitImpl.ContainingModule) 1748if (implicitImpl.IsStatic && interfaceMember.ContainingModule != implementingType.ContainingModule) 1921implementedMethod.ContainingModule != implementingMethod.ContainingModule)