25 overrides of DeclaringCompilation
Microsoft.CodeAnalysis.CSharp (25)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
299internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PEEventSymbol.cs (1)
506internal sealed override CSharpCompilation? DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
676internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (1)
102internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1672internal override CSharpCompilation DeclaringCompilation => null;
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
694internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
2431internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (1)
141internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
1174internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
1041internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
713internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingAssemblySymbol.cs (1)
280internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingEventSymbol.cs (1)
187internal sealed override CSharpCompilation? DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingFieldSymbol.cs (1)
136internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
362internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingModuleSymbol.cs (1)
305internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (1)
377internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingNamespaceSymbol.cs (1)
245internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
138internal sealed override CSharpCompilation? DeclaringCompilation
Symbols\Retargeting\RetargetingPropertySymbol.cs (1)
248internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Retargeting\RetargetingTypeParameterSymbol.cs (1)
112internal sealed override CSharpCompilation DeclaringCompilation // perf, not correctness
Symbols\Source\SourceAssemblySymbol.cs (1)
163internal sealed override CSharpCompilation DeclaringCompilation
Symbols\Source\SourceModuleSymbol.cs (1)
458internal override CSharpCompilation DeclaringCompilation
Symbols\SubstitutedTypeParameterSymbol.cs (1)
185internal override CSharpCompilation DeclaringCompilation => ContainingSymbol.DeclaringCompilation;
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
82internal override CSharpCompilation DeclaringCompilation
315 references to DeclaringCompilation
Microsoft.CodeAnalysis.CSharp (315)
Binder\Binder.ValueChecks.cs (1)
1746if (setMethod.DeclaringCompilation != this.Compilation)
Binder\Binder_Attributes.cs (1)
539if (setMethod.IsInitOnly && setMethod.DeclaringCompilation != this.Compilation)
Binder\Binder_Conversions.cs (1)
2390lambdaSymbol.DeclaringCompilation,
Binder\Binder_Lookup.cs (1)
1350if ((object)symbol.DeclaringCompilation != this.Compilation
Binder\Binder_Statements.cs (2)
224method.DeclaringCompilation, 618var endIsReachable = ControlFlowPass.Analyze(localSymbol.DeclaringCompilation, localSymbol, block, ignored);
Binder\Semantics\AccessCheck.cs (4)
30return IsSymbolAccessibleCore(symbol, within, null, out failedThroughTypeCheck, within.DeclaringCompilation, ref useSiteInfo); 44return IsSymbolAccessibleCore(symbol, within, throughTypeOpt, out failedThroughTypeCheck, within.DeclaringCompilation, ref useSiteInfo); 60return IsSymbolAccessibleCore(symbol, within, throughTypeOpt, out failedThroughTypeCheck, within.DeclaringCompilation, ref useSiteInfo, basesBeingResolved); 228var compilation = within.DeclaringCompilation;
Binder\Semantics\OverloadResolution\OverloadResolution.cs (2)
2489var compilation1 = m1.Member.DeclaringCompilation; 2490var compilation2 = m2.Member.DeclaringCompilation;
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
323_declaringSymbol.DeclaringCompilation.GetPreviousSubmissionImports().Concat(_declaringSymbol.GetImports(_declarationSyntax, basesBeingResolved)),
BoundTree\UnboundLambda.cs (1)
569if (lambdaSymbol.DeclaringCompilation?.TestOnlyCompilationData is LambdaBindingData data)
Compilation\CSharpCompilation.cs (1)
528if (methodSymbol?.DeclaringCompilation != this || !methodSymbol.IsDefinition)
Compilation\LexicalOrderSymbolComparer.cs (2)
36Debug.Assert((object)x.DeclaringCompilation == y.DeclaringCompilation);
Compiler\ClsComplianceChecker.cs (1)
968return symbol.DeclaringCompilation != _compilation ||
Compiler\DocumentationCommentCompiler.cs (1)
148CSharpCompilation compilation = symbol.DeclaringCompilation;
Compiler\MethodBodySynthesizer.cs (1)
143var targetSubmissionIndex = targetScriptType.DeclaringCompilation.GetSubmissionSlotIndex();
Compiler\MethodCompiler.cs (2)
1391method.DeclaringCompilation, 2340var compilation = method.DeclaringCompilation;
Emitter\EditAndContinue\PEDeltaAssemblyBuilder.cs (1)
275Debug.Assert(Compilation == template.DeclaringCompilation);
Emitter\Model\NamedTypeSymbolAdapter.cs (2)
365TypeSymbol objectType = AdaptedNamedTypeSymbol.DeclaringCompilation.GetSpecialType(CodeAnalysis.SpecialType.System_Object); 625bool alwaysIncludeConstructors = context.IncludePrivateMembers || AdaptedNamedTypeSymbol.DeclaringCompilation.IsAttributeType(AdaptedNamedTypeSymbol);
Emitter\Model\PEModuleBuilder.cs (3)
470CSharpCompilation compilation = symbol.DeclaringCompilation; 530Debug.Assert(Compilation == template.DeclaringCompilation); 538Debug.Assert(Compilation == template.DeclaringCompilation);
FlowAnalysis\FlowAnalysisPass.cs (1)
44var compilation = method.DeclaringCompilation;
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
31Debug.Assert(containingSymbol is null || containingSymbol.DeclaringCompilation is not null);
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (2)
47_isEnumerable = method.IsAsyncReturningIAsyncEnumerable(method.DeclaringCompilation); 48Debug.Assert(_isEnumerable != method.IsAsyncReturningIAsyncEnumerator(method.DeclaringCompilation));
Lowering\AsyncRewriter\AsyncRewriter.cs (1)
59CSharpCompilation compilation = method.DeclaringCompilation;
Lowering\AsyncRewriter\AsyncStateMachine.cs (1)
29CSharpCompilation compilation = asyncMethod.DeclaringCompilation;
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (1)
45Debug.Assert(containingType.DeclaringCompilation is not null);
Lowering\InitializerRewriter.cs (1)
47method.DeclaringCompilation.IsSubmissionSyntaxTree(initializer.SyntaxTree))
Lowering\IteratorRewriter\IteratorConstructor.cs (2)
26var intType = container.DeclaringCompilation.GetSpecialType(SpecialType.System_Int32); 35var compilation = this.DeclaringCompilation;
Lowering\MethodToClassRewriter.cs (1)
764AddSynthesizedAttribute(ref attributes, this.DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Diagnostics_DebuggerHiddenAttribute__ctor));
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.cs (1)
123var compilation = this.DeclaringCompilation;
Lowering\SynthesizedMethodBaseSymbol.cs (1)
85var compilation = this.DeclaringCompilation;
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
192: internalSymbol2.GetFirstLocationOrNone().SourceTree is { } tree ? $"<tree {internalSymbol2.DeclaringCompilation.GetSyntaxTreeOrdinal(tree)}>"
Symbols\AliasSymbol.cs (4)
239target.CheckAllConstraints(DeclaringCompilation, conversions, GetFirstLocation(), diagnostics); 359if (!ContainingSymbol.DeclaringCompilation.GetExternAliasTarget(Name, out target)) 396if (!DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureUsingTypeAlias)) 400var declarationBinder = ContainingSymbol.DeclaringCompilation
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (1)
250var compilation = ContainingSymbol.DeclaringCompilation;
Symbols\AssemblySymbol.cs (2)
948assemblies.AddRange(DeclaringCompilation.GetBoundReferenceManager().ReferencedAssemblies); 952DeclaringCompilation.GetUnaliasedReferencedAssemblies(assemblies);
Symbols\Attributes\AttributeData.cs (3)
693IsSecurityAttribute(target.DeclaringCompilation)) 734IsSecurityAttribute(target.DeclaringCompilation)) 752IsSecurityAttribute(target.DeclaringCompilation))
Symbols\BaseTypeAnalysis.cs (1)
25TypeDependsClosure(depends, depends.DeclaringCompilation, hs);
Symbols\ConstantValueUtils.cs (1)
36var compilation = symbol.DeclaringCompilation;
Symbols\ConstraintsHelper.cs (1)
104if (!typeParameter.DeclaringCompilation.Assembly.RuntimeSupportsByRefLikeGenerics)
Symbols\MethodSymbol.cs (2)
1158var compilation = this.DeclaringCompilation; 1276CSharpCompilation declaringCompilation = methodToAttribute.DeclaringCompilation;
Symbols\Retargeting\RetargetingParameterSymbol.cs (1)
135/// short circuits the overhead in <see cref="Symbol.DeclaringCompilation"/> and the extra virtual
Symbols\Source\ConstantEvaluationHelpers.cs (1)
276fieldsInvolvedInCycles.AddRange(graph.Keys.GroupBy(static f => f.DeclaringCompilation).
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
397var compilation = this.DeclaringCompilation;
Symbols\Source\GlobalExpressionVariable.cs (1)
81var compilation = this.DeclaringCompilation;
Symbols\Source\ImplicitNamedTypeSymbol.cs (2)
57=> IsScriptClass ? null : this.DeclaringCompilation.GetSpecialType(Microsoft.CodeAnalysis.SpecialType.System_Object); 63diagnostics.ReportUseSite(this.DeclaringCompilation.GetSpecialType(SpecialType.System_Object), GetFirstLocation());
Symbols\Source\LambdaSymbol.cs (1)
53Debug.Assert(containingSymbol.DeclaringCompilation == compilation);
Symbols\Source\LocalFunctionOrSourceMemberMethodSymbol.cs (2)
29TypeWithAnnotations elementType = InMethodBinder.GetIteratorElementTypeFromReturnType(DeclaringCompilation, RefKind, ReturnType, errorLocation: null, diagnostics: null); 33elementType = TypeWithAnnotations.Create(new ExtendedErrorTypeSymbol(DeclaringCompilation, name: "", arity: 0, errorInfo: null, unreported: false));
Symbols\Source\LocalFunctionSymbol.cs (4)
44Debug.Assert(containingSymbol.DeclaringCompilation == binder.Compilation); 127var compilation = DeclaringCompilation; 255var compilation = DeclaringCompilation; 435SourceMemberContainerTypeSymbol.ReportReservedTypeName(identifier.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, location);
Symbols\Source\SourceComplexParameterSymbol.cs (11)
274Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 303var compilation = this.DeclaringCompilation; 326if (attributes is null || !NullableWalker.NeedsAnalysis(DeclaringCompilation, attributes)) 990var compilation = this.DeclaringCompilation; 1067CSharpCompilation compilation = this.DeclaringCompilation; 1095CSharpCompilation compilation = this.DeclaringCompilation; 1128CSharpCompilation compilation = this.DeclaringCompilation; 1169CSharpCompilation compilation = this.DeclaringCompilation; 1230if (!Type.Equals(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken))) 1236method.ReturnType.OriginalDefinition.Equals(this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T))) 1562var collectionTypeKind = ConversionsBase.GetCollectionExpressionTypeKind(DeclaringCompilation, Type, out TypeWithAnnotations elementTypeWithAnnotations);
Symbols\Source\SourceConstructorSymbolBase.cs (2)
36var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntax.SyntaxTree); 89var compilation = DeclaringCompilation;
Symbols\Source\SourceCustomEventSymbol.cs (3)
163_addMethod = CreateAccessorSymbol(DeclaringCompilation, addSyntax, explicitlyImplementedEvent, aliasQualifierOpt, diagnostics); 164_removeMethod = CreateAccessorSymbol(DeclaringCompilation, removeSyntax, explicitlyImplementedEvent, aliasQualifierOpt, diagnostics); 221_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(explicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceDelegateMethodSymbol.cs (3)
243return new LexicalSortKey(this.syntaxReferenceOpt.GetLocation(), this.DeclaringCompilation); 306return new LexicalSortKey(this.syntaxReferenceOpt.GetLocation(), this.DeclaringCompilation); 313var compilation = DeclaringCompilation;
Symbols\Source\SourceDestructorSymbol.cs (1)
84var bodyBinder = this.DeclaringCompilation.GetBinderFactory(syntaxReferenceOpt.SyntaxTree).GetBinder(syntax, syntax, this);
Symbols\Source\SourceEventAccessorSymbol.cs (1)
108CSharpCompilation compilation = this.DeclaringCompilation;
Symbols\Source\SourceEventFieldSymbol.cs (1)
63var compilation = this.DeclaringCompilation;
Symbols\Source\SourceEventSymbol.cs (6)
111return new LexicalSortKey(_location, this.DeclaringCompilation); 196DeclaringCompilation.SymbolDeclaredEvent(this); 316CSharpAttributeData.DecodeSkipLocalsInitAttribute<CommonEventWellKnownAttributeData>(DeclaringCompilation, ref arguments); 328var compilation = this.DeclaringCompilation; 344DeclaringCompilation.SynthesizeTupleNamesAttribute(type.Type)); 750var compilation = DeclaringCompilation;
Symbols\Source\SourceFieldSymbol.cs (3)
136var compilation = DeclaringCompilation; 214=> new LexicalSortKey(_syntaxReference, this.DeclaringCompilation); 374DeclaringCompilation.SymbolDeclaredEvent(this);
Symbols\Source\SourceFixedFieldSymbol.cs (3)
44var compilation = this.DeclaringCompilation; 85BinderFactory binderFactory = this.DeclaringCompilation.GetBinderFactory(SyntaxTree); 209var compilation = ContainingSymbol.DeclaringCompilation;
Symbols\Source\SourceLocalSymbol.cs (1)
53Debug.Assert(containingSymbol.DeclaringCompilation == scopeBinder.Compilation);
Symbols\Source\SourceMemberContainerSymbol.cs (21)
622DeclaringCompilation.SymbolDeclaredEvent(this); 873return FileIdentifier.Create(syntaxTree, DeclaringCompilation?.Options?.SourceReferenceResolver); 983_lazyLexicalSortKey.SetFrom(declaration.GetLexicalSortKey(this.DeclaringCompilation)); 1813var compilation = DeclaringCompilation; 1868ReportReservedTypeName(identifier?.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, identifier?.GetLocation() ?? Location.None); 2634_ = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Runtime_CompilerServices_RequiredMemberAttribute__ctor, diagnostics, GetFirstLocation()); 2639_ = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Runtime_CompilerServices_CompilerFeatureRequiredAttribute__ctor, diagnostics, GetFirstLocation()); 2644_ = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Diagnostics_CodeAnalysis_SetsRequiredMembersAttribute__ctor, diagnostics, GetFirstLocation()); 3075var compilation = declaredMembers.PrimaryConstructor.DeclaringCompilation; 3286return builder.ToReadOnlyAndFree(DeclaringCompilation); 3592var compilation = DeclaringCompilation; 3608return this.DeclaringCompilation.GetBinder(syntaxNode); 4125MessageID.IDS_FeatureParameterlessStructConstructors.CheckFeatureAvailability(diagnostics, m.DeclaringCompilation, location); 4154MessageID.IDS_FeatureStructFieldInitializers.CheckFeatureAvailability(diagnostics, symbol.DeclaringCompilation, symbol.GetFirstLocation()); 4226CSharpCompilation compilation = this.DeclaringCompilation; 4472if (baseToStringMethod.ContainingModule != this.ContainingModule && !this.DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureSealedToStringInRecord)) 4500this.DeclaringCompilation, 4508var objectToString = this.DeclaringCompilation.GetSpecialTypeMember(SpecialMember.System_Object__ToString); 4914var compilation = DeclaringCompilation; 5290var compilation = DeclaringCompilation; 5334var compilation = DeclaringCompilation;
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (9)
328Location location = implementingMember.IsFromCompilation(this.DeclaringCompilation) 968CheckValidNullableEventOverride(overridingEvent.DeclaringCompilation, overriddenEvent, overridingEvent, 998if (DeclaringCompilation.Conversions.HasIdentityOrImplicitReferenceConversion(overridingMethod.ReturnTypeWithAnnotations.Type, overriddenMethod.ReturnTypeWithAnnotations.Type, ref discardedUseSiteInfo)) 1004else if (MessageID.IDS_FeatureCovariantReturnsForOverrides.GetFeatureAvailabilityDiagnosticInfo(this.DeclaringCompilation) is { } diagnosticInfo) 1068DeclaringCompilation.Conversions.HasIdentityOrImplicitReferenceConversion(overridingMemberType.Type, overriddenMemberType.Type, ref discardedUseSiteInfo)) 1076var diagnosticInfo = MessageID.IDS_FeatureCovariantReturnsForOverrides.GetFeatureAvailabilityDiagnosticInfo(this.DeclaringCompilation); 1172CheckValidNullableMethodOverride(overridingMethod.DeclaringCompilation, overriddenMethod, overridingMethod, diagnostics, 1201DeclaringCompilation.LanguageVersion >= MessageID.IDS_FeatureCovariantReturnsForOverrides.RequiredVersion()) 1204var result = DeclaringCompilation.Conversions.HasIdentityOrImplicitReferenceConversion(overridingReturnType.Type, overriddenReturnType.Type, ref useSiteInfo);
Symbols\Source\SourceMemberFieldSymbol.cs (6)
107var compilation = this.DeclaringCompilation; 127this.DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_RequiredMemberAttribute__ctor)); 140Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 448var compilation = this.DeclaringCompilation; 468NamedTypeSymbol tokenTableType = this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationTokenTable_T); 654Type.CheckAllConstraints(DeclaringCompilation, conversions, ErrorLocation, diagnostics);
Symbols\Source\SourceMemberMethodSymbol.cs (5)
330Debug.Assert(containingType.DeclaringCompilation is not null); 745Binder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(contextNode.SyntaxTree)).GetBinder(contextNode); 954var compilation = this.DeclaringCompilation; 983var compilation = DeclaringCompilation; 1017var compilation = this.DeclaringCompilation;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (14)
590CSharpAttributeData.DecodeSkipLocalsInitAttribute<MethodWellKnownAttributeData>(DeclaringCompilation, ref arguments); 656var compilation = this.DeclaringCompilation; 987DeclaringCompilation.AddModuleInitializerMethod(this); 1059var matchingTrees = DeclaringCompilation.GetSyntaxTreesByContentHash(hash); 1111DeclaringCompilation.AddInterception(matchingTree.GetText().GetContentHash(), position, attributeLocation, this); 1218var matchingTrees = DeclaringCompilation.GetSyntaxTreesByPath(normalizedPath); 1228matchingTrees = DeclaringCompilation.GetSyntaxTreesByMappedPath(attributeFilePath); 1242var syntaxTrees = DeclaringCompilation.SyntaxTrees; 1325DeclaringCompilation.AddInterception(matchingTree.GetText().GetContentHash(), referencedToken.Position, attributeLocation, this); 1439var systemType = @this.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type); 1552MessageID.IDS_AsyncMethodBuilderOverride.CheckFeatureAvailability(diagnostics, this.DeclaringCompilation, errorLocation); 1583var iAsyncEnumerableType = DeclaringCompilation.GetWellKnownType(WellKnownType.System_Collections_Generic_IAsyncEnumerable_T); 1587var cancellationTokenType = DeclaringCompilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken); 1608var declaringCompilation = methodSymbol.DeclaringCompilation;
Symbols\Source\SourceNamedTypeSymbol.cs (18)
50var baseBinder = this.DeclaringCompilation.GetBinder(bases); 201ReportReservedTypeName(tp.Identifier.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, location); 334var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntaxRef.SyntaxTree); 415var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntaxRef.SyntaxTree); 783foreach (var decl in this.DeclaringCompilation.MergedRootDeclaration.Declarations) 1051Debug.Assert(this.SpecialType == SpecialType.System_Object || this.DeclaringCompilation.IsAttributeType(this)); 1178CSharpAttributeData.DecodeSkipLocalsInitAttribute<TypeWellKnownAttributeData>(DeclaringCompilation, ref arguments); 1222var compilation = this.DeclaringCompilation; 1271QuickAttributeChecker checker = this.DeclaringCompilation.GetBinderFactory(list.Node.SyntaxTree).GetBinder(list.Node).QuickAttributeChecker; 1299if (!this.DeclaringCompilation.IsAttributeType(this)) 1386if (!this.DeclaringCompilation.IsAttributeType(this)) 1666CSharpCompilation compilation = this.DeclaringCompilation; 1722this.DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor)); 1820Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Reflection_DefaultMemberAttribute__ctor, diagnostics, indexerSymbol.TryGetFirstLocation() ?? GetFirstLocation()); 1847type.Equals(index ??= DeclaringCompilation.GetWellKnownType(WellKnownType.System_Index), TypeCompareKind.AllIgnoreOptions) || 1848type.Equals(range ??= DeclaringCompilation.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.AllIgnoreOptions))) 1877(returnTypeOriginalDefinition.Equals(span ??= DeclaringCompilation.GetWellKnownType(WellKnownType.System_Span_T), TypeCompareKind.AllIgnoreOptions) || 1878returnTypeOriginalDefinition.Equals(readOnlySpan ??= DeclaringCompilation.GetWellKnownType(WellKnownType.System_ReadOnlySpan_T), TypeCompareKind.AllIgnoreOptions)) &&
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (14)
107if (this.IsGenericType && !baseContainsErrorTypes && this.DeclaringCompilation.IsAttributeType(localBase)) 109MessageID.IDS_FeatureGenericAttributes.CheckFeatureAvailability(diagnostics, this.DeclaringCompilation, baseLocation); 120localBase.CheckAllConstraints(DeclaringCompilation, conversions, location, diagnostics); 172@interface.CheckAllConstraints(DeclaringCompilation, conversions, location, diagnostics); 219var baseBinder = this.DeclaringCompilation.GetBinder(bases); 372var type = DeclaringCompilation.GetWellKnownType(WellKnownType.System_IEquatable_T).Construct(this); 448var baseBinder = this.DeclaringCompilation.GetBinder(bases); 690if (t.DeclaringCompilation != this.DeclaringCompilation) 696if (@interface.DeclaringCompilation != this.DeclaringCompilation) 712var compilation = this.DeclaringCompilation; 767if (current.DeclaringCompilation == this.DeclaringCompilation)
Symbols\Source\SourceNamedTypeSymbol_Enum.cs (1)
51var compilation = this.DeclaringCompilation;
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (4)
470CSharpCompilation compilation = declaringSymbol.DeclaringCompilation; 638var compilation = declaringSymbol.DeclaringCompilation; 964var compilation = declaringSymbol.DeclaringCompilation; 1163var compilation = declaringSymbol.DeclaringCompilation;
Symbols\Source\SourceNamespaceSymbol.cs (2)
83_lazyLexicalSortKey.SetFrom(_mergedDeclaration.GetLexicalSortKey(this.DeclaringCompilation)); 237DeclaringCompilation.SymbolDeclaredEvent(this);
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
59if (this.DeclaringCompilation.Options.ConcurrentBuild)
Symbols\Source\SourceOrdinaryMethodOrUserDefinedOperatorSymbol.cs (2)
120var modifierType = Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Runtime_InteropServices_InAttribute, diagnostics, ReturnTypeLocation); 226var compilation = DeclaringCompilation;
Symbols\Source\SourceOrdinaryMethodSymbol.cs (8)
116var withTypeParamsBinder = this.DeclaringCompilation.GetBinderFactory(syntax.SyntaxTree).GetBinder(syntax.ReturnType, syntax, this); 246var attributeConstructor = Binder.GetWellKnownTypeMember(DeclaringCompilation, WellKnownMember.System_Runtime_CompilerServices_ExtensionAttribute__ctor, out var useSiteInfo); 283DeclaringCompilation.SymbolDeclaredEvent(this); 552implementation.DeclaringCompilation, 1037this.DeclaringCompilation 1064this.DeclaringCompilation 1087_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(syntax.ExplicitInterfaceSpecifier.Name), diagnostics); 1138SourceMemberContainerTypeSymbol.ReportReservedTypeName(identifier.Text, this.DeclaringCompilation, diagnostics.DiagnosticBag, location);
Symbols\Source\SourceOrdinaryMethodSymbolBase.cs (1)
103var compilation = this.DeclaringCompilation;
Symbols\Source\SourceParameterSymbolBase.cs (1)
73var compilation = this.DeclaringCompilation;
Symbols\Source\SourcePropertyAccessorSymbol.cs (8)
45bool isNullableAnalysisEnabled = containingType.DeclaringCompilation.IsNullableAnalysisEnabledIn(syntax); 72bool isNullableAnalysisEnabled = containingType.DeclaringCompilation.IsNullableAnalysisEnabledIn(syntax); 391var isInitOnlyType = Binder.GetWellKnownType(this.DeclaringCompilation, 406var compilation = this.DeclaringCompilation; 471var isReadOnlyAttributeUsable = DeclaringCompilation.GetWellKnownTypeMember(WellKnownMember.System_Runtime_CompilerServices_IsReadOnlyAttribute__ctor) != null || 472(DeclaringCompilation.Options.OutputKind != OutputKind.NetModule && 473DeclaringCompilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_IsReadOnlyAttribute) is MissingMetadataTypeSymbol); 810var compilation = this.DeclaringCompilation;
Symbols\Source\SourcePropertySymbol.cs (1)
543var compilation = this.DeclaringCompilation;
Symbols\Source\SourcePropertySymbolBase.cs (12)
270var modifierType = Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Runtime_InteropServices_InAttribute, diagnostics, TypeLocation); 319if (!property.DeclaringCompilation.IsFeatureEnabled(MessageID.IDS_FeatureFieldKeyword)) 521return new LexicalSortKey(Location, this.DeclaringCompilation); 886Binder.ReportUseSiteDiagnosticForSynthesizedAttribute(DeclaringCompilation, 1004var compilation = DeclaringCompilation; 1367var compilation = this.DeclaringCompilation; 1524CSharpAttributeData.DecodeSkipLocalsInitAttribute<PropertyWellKnownAttributeData>(DeclaringCompilation, ref arguments); 1769parameter.Type.CheckAllConstraints(DeclaringCompilation, conversions, parameter.GetFirstLocation(), diagnostics); 1776DeclaringCompilation.SymbolDeclaredEvent(this); 1780DeclaringCompilation.SymbolDeclaredEvent(_getMethod); 1783DeclaringCompilation.SymbolDeclaredEvent(_setMethod); 1804this.Type.CheckAllConstraints(DeclaringCompilation, conversions, Location, diagnostics);
Symbols\Source\SourceTypeParameterSymbol.cs (10)
263DeclaringCompilation, ContainingAssembly.CorLibrary.TypeConversions, _locations[0], diagnostics); 279DeclaringCompilation.EnsureIsUnmanagedAttributeExists(diagnostics, this.GetNonNullSyntaxNode().Location, ModifyCompilationForAttributeEmbedding()); 305if (DeclaringCompilation.ShouldEmitNativeIntegerAttributes() 308DeclaringCompilation.EnsureNativeIntegerAttributeExists(diagnostics, getLocation(), ModifyCompilationForAttributeEmbedding()); 313DeclaringCompilation.EnsureNullableAttributeExists(diagnostics, getLocation(), ModifyCompilationForAttributeEmbedding()); 322if (!DeclaringCompilation.ShouldEmitNullableAttributes(this)) 394var compilation = DeclaringCompilation; 596return this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited: false, this.DeclaringCompilation, diagnostics); 740return this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited: false, this.DeclaringCompilation, diagnostics); 998return this.ResolveBounds(this.ContainingAssembly.CorLibrary, inProgress.Prepend(this), constraintTypes, inherited: true, this.DeclaringCompilation, diagnostics);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
224var binder = this.DeclaringCompilation. 810_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(name), diagnostics);
Symbols\SubstitutedTypeParameterSymbol.cs (1)
185internal override CSharpCompilation DeclaringCompilation => ContainingSymbol.DeclaringCompilation;
Symbols\Symbol.cs (7)
196return OriginalDefinition.DeclaringCompilation; 218return ContainingSymbol?.DeclaringCompilation; 226=> DeclaringCompilation; 407var declaringCompilation = this.DeclaringCompilation; 909return compilation == this.DeclaringCompilation; 929get { return this.DeclaringCompilation != null; } 1030CSharpCompilation compilation = this.DeclaringCompilation;
Symbols\Symbol_Attributes.cs (4)
294/// <param name="binderOpt">Binder to use. If null, <see cref="DeclaringCompilation"/> GetBinderFactory will be used.</param> 310var compilation = this.DeclaringCompilation; 545var binder = GetAttributeBinder(attributeListSyntaxList, DeclaringCompilation, rootBinder); 568CSharpCompilation compilation = this.DeclaringCompilation;
Symbols\SymbolExtensions.cs (2)
26var comp = symbol.DeclaringCompilation; 288return symbol.DeclaringCompilation.Options.AllowUnsafe;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
28var compilation = containingType.DeclaringCompilation;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListTypeSymbol.cs (5)
603var arraySetValueMethod = (MethodSymbol)method.DeclaringCompilation.GetSpecialTypeMember(SpecialMember.System_Array__SetValue)!; 659var constructor = (MethodSymbol)method.DeclaringCompilation.GetWellKnownTypeMember(WellKnownMember.System_IndexOutOfRangeException__ctor)!; 723var constructor = (MethodSymbol)method.DeclaringCompilation.GetWellKnownTypeMember(WellKnownMember.System_NotSupportedException__ctor)!; 770var symbol = DeclaringCompilation.GetWellKnownTypeMember(member); 923AddSynthesizedAttribute(ref attributes, DeclaringCompilation.TrySynthesizeAttribute(WellKnownMember.System_Runtime_CompilerServices_CompilerGeneratedAttribute__ctor));
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
107InMethodBinder result = (binderFactoryOpt ?? this.DeclaringCompilation.GetBinderFactory(typeDecl.SyntaxTree)).GetPrimaryConstructorInMethodBinder(this);
Symbols\Synthesized\Records\SynthesizedRecordBaseEquals.cs (1)
27var compilation = DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
79var compilation = this.DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordDeconstruct.cs (1)
33var compilation = DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordEqualityContractProperty.cs (3)
82return (TypeWithAnnotations.Create(Binder.GetWellKnownType(DeclaringCompilation, WellKnownType.System_Type, diagnostics, Location), NullableAnnotation.NotAnnotated), 96var compilation = this.DeclaringCompilation; 162var compilation = this.DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordEqualityOperatorBase.cs (2)
66var compilation = DeclaringCompilation; 85var compilation = this.DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordEquals.cs (2)
34var compilation = DeclaringCompilation; 77if (_equalityContract.IsStatic || !_equalityContract.Type.Equals(DeclaringCompilation.GetWellKnownType(WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions))
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (1)
32var compilation = DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordObjEquals.cs (1)
29var compilation = DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordOrdinaryMethod.cs (1)
79var compilation = this.DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
91var compilation = DeclaringCompilation;
Symbols\Synthesized\Records\SynthesizedRecordToString.cs (2)
40var compilation = DeclaringCompilation; 55CSharpCompilation compilation = ContainingType.DeclaringCompilation;
Symbols\Synthesized\SynthesizedAccessorValueParameterSymbol.cs (1)
134TypeSymbol eventTokenType = @event.DeclaringCompilation.GetWellKnownType(WellKnownType.System_Runtime_InteropServices_WindowsRuntime_EventRegistrationToken);
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (2)
44var compilation = this.DeclaringCompilation; 166var languageVersion = this.DeclaringCompilation.LanguageVersion;
Symbols\Synthesized\SynthesizedContainer.cs (1)
67var compilation = ContainingSymbol.DeclaringCompilation;
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (3)
30var compilation = containingType.DeclaringCompilation; 385AddSynthesizedAttribute(ref attributes, this.DeclaringCompilation.SynthesizeDebuggerStepThroughAttribute()); 468var compilation = _containingType.DeclaringCompilation;
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (2)
77var compilation = this.DeclaringCompilation; 93(object)DeclaringCompilation.GetWellKnownTypeMember(WellKnownMember.System_Threading_Interlocked__CompareExchange_T) == null)
Symbols\Synthesized\SynthesizedFieldSymbolBase.cs (1)
50CSharpCompilation compilation = this.DeclaringCompilation;
Symbols\Synthesized\SynthesizedInlineArrayTypeSymbol.cs (1)
192var compilation = _containingModule.DeclaringCompilation;
Symbols\Synthesized\SynthesizedInteractiveInitializerMethod.cs (2)
250var compilation = DeclaringCompilation; 264CSharpCompilation compilation = containingType.DeclaringCompilation;
Symbols\Synthesized\SynthesizedLocal.cs (1)
52Debug.Assert(containingMethodOpt is null || containingMethodOpt.DeclaringCompilation is not null);
Symbols\Synthesized\SynthesizedParameterSymbol.cs (1)
154var compilation = this.DeclaringCompilation;
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (3)
38CSharpCompilation compilation = containingType.DeclaringCompilation; 68CSharpCompilation compilation = containingType.DeclaringCompilation; 219CSharpCompilation compilation = DeclaringCompilation;
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
407DeclaringCompilation,
Symbols\Synthesized\SynthesizedSubmissionConstructor.cs (1)
22var compilation = containingType.DeclaringCompilation;
Symbols\Synthesized\TypeSubstitutedLocalSymbol.cs (1)
25Debug.Assert(containingSymbol.DeclaringCompilation is not null);
Symbols\TypeSymbol.cs (9)
778var diagnostics = BindingDiagnosticBag.GetInstance(withDiagnostics: true, withDependencies: this.DeclaringCompilation is object); 835CSharpCompilation compilation = implementingType.DeclaringCompilation; 1016LanguageVersion? availableVersion = implementingType.DeclaringCompilation?.LanguageVersion; 1640LanguageVersion? availableVersion = implementingType.DeclaringCompilation?.LanguageVersion; 1714if (!reportedAnError && implementingType.DeclaringCompilation != null) 1741LanguageVersion? availableVersion = implementingType.DeclaringCompilation?.LanguageVersion; 1770CSharpCompilation compilation = implementingType.DeclaringCompilation; 1848CSharpCompilation compilation = implementingType.DeclaringCompilation; 1969MessageID.IDS_FeatureRefStructInterfaces.CheckFeatureAvailability(diagnostics, implementingSymbol.DeclaringCompilation, applicationSyntaxReference.GetLocation());
Symbols\TypeSymbolExtensions.cs (1)
2090var compilation = declaringSymbol.DeclaringCompilation;
Symbols\UpdatedContainingSymbolLocal.cs (1)
27Debug.Assert(updatedContainingSymbol.DeclaringCompilation is not null);
Symbols\VarianceSafety.cs (1)
176return MessageID.IDS_FeatureVarianceSafetyForStaticInterfaceMembers.RequiredVersion() <= member.DeclaringCompilation.LanguageVersion;