34 references to AccessCheck
Microsoft.CodeAnalysis.CSharp (34)
Binder\Binder.cs (3)
776return AccessCheck.IsSymbolAccessible(symbol, within, ref useSiteInfo); 785return this.Flags.Includes(BinderFlags.IgnoreAccessibility) || AccessCheck.IsSymbolAccessible(symbol, within, ref useSiteInfo, throughTypeOpt); 802return AccessCheck.IsSymbolAccessible(symbol, within, throughTypeOpt, out failedThroughTypeCheck, ref useSiteInfo, basesBeingResolved);
Binder\Binder_Statements.cs (1)
3943if (!AccessCheck.IsSymbolAccessible(baseConstructor, constructor.ContainingType, ref useSiteInfo))
Binder\Semantics\SemanticFacts.cs (2)
39return AccessCheck.IsSymbolAccessible( 64return AccessCheck.IsSymbolAccessible(symbol, within, ref discardedUseSiteInfo);
Compilation\CSharpCompilation.cs (3)
2402AccessCheck.IsSymbolAccessible(symbol0, (AssemblySymbol)within0, ref discardedUseSiteInfo) : 2403AccessCheck.IsSymbolAccessible(symbol0, (NamedTypeSymbol)within0, ref discardedUseSiteInfo, throughType0); 4702if (!AccessCheck.IsEffectivelyPublicOrInternal(symbol, out bool isInternal))
FlowAnalysis\NullableWalker.cs (1)
5481(containingType is null || AccessCheck.IsSymbolAccessible(member, containingType, ref discardedUseSiteInfo)))
Lowering\LocalRewriter\LocalRewriter_Call.cs (1)
192var isAccessible = AccessCheck.IsSymbolAccessible(interceptor, containingMethod.ContainingType, ref useSiteInfo);
Symbols\EventSymbol.cs (1)
196(accessingTypeOpt is { } && !AccessCheck.IsSymbolAccessible(overridden, accessingTypeOpt, ref discardedUseSiteInfo)))
Symbols\Metadata\PE\NullableTypeDecoder.cs (1)
33_ = AccessCheck.IsEffectivelyPublicOrInternal(accessSymbol, out _);
Symbols\Metadata\PE\PEModuleSymbol.cs (1)
810if (AccessCheck.IsEffectivelyPublicOrInternal(symbol, out bool isInternal))
Symbols\MethodSymbol.cs (1)
454(accessingTypeOpt is { } && !AccessCheck.IsSymbolAccessible(overridden, accessingTypeOpt, ref discardedUseSiteInfo)) ||
Symbols\OverriddenOrHiddenMembersHelpers.cs (1)
1073return AccessCheck.IsSymbolAccessible(overridden.OriginalDefinition, overridingContainingType.OriginalDefinition, ref discardedUseSiteInfo);
Symbols\PropertySymbol.cs (1)
293(accessingTypeOpt is { } && !AccessCheck.IsSymbolAccessible(overridden, accessingTypeOpt, ref discardedUseSiteInfo)))
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
308if (!AccessCheck.IsSymbolAccessible(implementedMember, implementingMember.ContainingType, ref useSiteInfo, throughTypeOpt: null)) 332!AccessCheck.IsSymbolAccessible(accessor, implementingMember.ContainingType, ref useSiteInfo, throughTypeOpt: null))
Symbols\Source\SourceConstructorSymbol.cs (1)
173diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this);
Symbols\Source\SourceEventSymbol.cs (1)
581diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this);
Symbols\Source\SourceFieldSymbol.cs (1)
58diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(containingType), ErrorLocation, this);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
265diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), GetFirstLocation(), this);
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (4)
709bool isAccessible = AccessCheck.IsSymbolAccessible(hiddenMember, this, ref useSiteInfo); 879Debug.Assert(AccessCheck.IsSymbolAccessible(overriddenMember, overridingType, ref discardedUseSiteInfo)); 1130if (overridingProperty.GetMethod != ownOrInheritedGetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedGetMethod, overridingType, ref useSiteInfo)) 1136if (overridingProperty.SetMethod != ownOrInheritedSetMethod && !AccessCheck.IsSymbolAccessible(ownOrInheritedSetMethod, overridingType, ref useSiteInfo))
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
952if (!AccessCheck.IsSymbolAccessible(this, ContainingAssembly, ref useSiteInfo))
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
894diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this);
Symbols\Source\SourcePropertyAccessorSymbol.cs (1)
545diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this);
Symbols\Source\SourcePropertySymbolBase.cs (1)
1118diagnostics.Add(AccessCheck.GetProtectedMemberInSealedTypeError(ContainingType), location, this);
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
97AccessCheck.IsSymbolAccessible(member, within, ref useSiteInfo))
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
95Debug.Assert(AccessCheck.IsSymbolAccessible(_overriddenAccessor, this.ContainingType, ref discardedUseSiteInfo));
Symbols\TypeSymbol.cs (1)
1008!AccessCheck.IsSymbolAccessible(interfaceMember, named, ref useSiteInfo2, throughTypeOpt: null))