src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
116Document document, State state, SymbolKind kind, Accessibility accessibility, CancellationToken cancellationToken)
182document, state, SymbolKind.Local, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false))
198document, state, SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (20)
34ImmutableArray<AttributeData> attributes, Accessibility accessibility,
50Accessibility accessibility,
83ImmutableArray<AttributeData> attributes, Accessibility accessibility, DeclarationModifiers modifiers,
109Accessibility accessibility,
126Accessibility accessibility,
155Accessibility accessibility,
178ImmutableArray<AttributeData> attributes, Accessibility accessibility, DeclarationModifiers modifiers,
198Accessibility accessibility,
235accessibility: Accessibility.Public,
251Accessibility accessibility,
364Accessibility? accessibility = null,
389Accessibility accessibility,
421Accessibility accessibility,
440Accessibility accessibility,
466Accessibility accessibility,
477accessibility: Accessibility.Public,
518Accessibility? accessibility = null,
549Accessibility? accessibility = null,
576Accessibility? accessibility = null,
597Accessibility? accessibility = null,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorSymbol.cs (1)
20Accessibility accessibility,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorSymbol.cs (1)
15Accessibility.NotApplicable,
Common\GlyphExtensions.cs (45)
55Accessibility.Protected => Glyph.ClassProtected,
56Accessibility.Private => Glyph.ClassPrivate,
57Accessibility.Internal => Glyph.ClassInternal,
63Accessibility.Protected => Glyph.ConstantProtected,
64Accessibility.Private => Glyph.ConstantPrivate,
65Accessibility.Internal => Glyph.ConstantInternal,
71Accessibility.Protected => Glyph.DelegateProtected,
72Accessibility.Private => Glyph.DelegatePrivate,
73Accessibility.Internal => Glyph.DelegateInternal,
79Accessibility.Protected => Glyph.EnumProtected,
80Accessibility.Private => Glyph.EnumPrivate,
81Accessibility.Internal => Glyph.EnumInternal,
87Accessibility.Protected => Glyph.EnumMemberProtected,
88Accessibility.Private => Glyph.EnumMemberPrivate,
89Accessibility.Internal => Glyph.EnumMemberInternal,
98Accessibility.Protected => Glyph.EventProtected,
99Accessibility.Private => Glyph.EventPrivate,
100Accessibility.Internal => Glyph.EventInternal,
106Accessibility.Protected => Glyph.ExtensionMethodProtected,
107Accessibility.Private => Glyph.ExtensionMethodPrivate,
108Accessibility.Internal => Glyph.ExtensionMethodInternal,
114Accessibility.Protected => Glyph.FieldProtected,
115Accessibility.Private => Glyph.FieldPrivate,
116Accessibility.Internal => Glyph.FieldInternal,
122Accessibility.Protected => Glyph.InterfaceProtected,
123Accessibility.Private => Glyph.InterfacePrivate,
124Accessibility.Internal => Glyph.InterfaceInternal,
148Accessibility.Protected => Glyph.MethodProtected,
149Accessibility.Private => Glyph.MethodPrivate,
150Accessibility.Internal => Glyph.MethodInternal,
156Accessibility.Protected => Glyph.ModulePublic,
157Accessibility.Private => Glyph.ModulePrivate,
158Accessibility.Internal => Glyph.ModuleInternal,
173Accessibility.Protected => Glyph.PropertyProtected,
174Accessibility.Private => Glyph.PropertyPrivate,
175Accessibility.Internal => Glyph.PropertyInternal,
190Accessibility.Protected => Glyph.StructureProtected,
191Accessibility.Private => Glyph.StructurePrivate,
192Accessibility.Internal => Glyph.StructureInternal,
211public static Accessibility GetAccessibility(ImmutableArray<string> tags)
218return Accessibility.Public;
220return Accessibility.Protected;
222return Accessibility.Internal;
224return Accessibility.Private;
228return Accessibility.NotApplicable;
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (5)
267Accessibility.Public,
316attributes: default, Accessibility.Internal, modifiers: default,
356attributes: default, Accessibility.Public, modifiers: default,
372attributes: default, Accessibility.Public, DeclarationModifiers.Abstract,
399attributes: default, Accessibility.Public, modifiers: default,
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
116Document document, State state, SymbolKind kind, Accessibility accessibility, CancellationToken cancellationToken)
182document, state, SymbolKind.Local, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false))
198document, state, SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false))
Lowering\IteratorRewriter\IteratorRewriter.vb (10)
139Me.StateField = Me.F.StateMachineField(Me.F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public)
142_currentField = F.StateMachineField(_elementType, Me.Method, GeneratedNames.MakeIteratorCurrentFieldName(), Accessibility.Public)
146F.StateMachineField(F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeIteratorInitialThreadIdName(), Accessibility.Public),
157Accessibility.Private,
161Accessibility.Private)
184Accessibility.Private,
269Accessibility.Private,
278Accessibility.Private)
284Accessibility.Private,
297Accessibility.Private)
Lowering\StateMachineRewriter\StateMachineRewriter.vb (15)
219Accessibility.Friend),
230Accessibility.Friend),
246Accessibility.Friend),
257Accessibility.Friend),
354Return F.StateMachineField(localType, Me.Method, proxyName, New LocalSlotDebugInfo(local.SynthesizedKind, id), slotIndex, Accessibility.Friend)
413Friend Function OpenMethodImplementation(interfaceMethod As WellKnownMember, name As String, accessibility As Accessibility, Optional hasMethodBodyDependency As Boolean = False, Optional associatedProperty As PropertySymbol = Nothing) As SynthesizedMethod
419Friend Function OpenMethodImplementation(interfaceMethod As SpecialMember, name As String, accessibility As Accessibility, Optional hasMethodBodyDependency As Boolean = False, Optional associatedProperty As PropertySymbol = Nothing) As SynthesizedMethod
425Friend Function OpenMethodImplementation(interfaceType As NamedTypeSymbol, interfaceMethod As SpecialMember, name As String, accessibility As Accessibility, Optional hasMethodBodyDependency As Boolean = False, Optional associatedProperty As PropertySymbol = Nothing) As SynthesizedMethod
433accessibility As Accessibility,
453Friend Function OpenPropertyImplementation(interfaceProperty As SpecialMember, name As String, accessibility As Accessibility) As MethodSymbol
459Friend Function OpenPropertyImplementation(interfaceType As NamedTypeSymbol, interfaceMethod As SpecialMember, name As String, accessibility As Accessibility) As MethodSymbol
465Private Function OpenPropertyImplementation(getterToImplement As MethodSymbol, name As String, accessibility As Accessibility) As MethodSymbol
490Friend Function OpenMoveNextMethodImplementation(interfaceMethod As WellKnownMember, accessibility As Accessibility) As SynthesizedMethod
496Friend Function OpenMoveNextMethodImplementation(interfaceMethod As SpecialMember, accessibility As Accessibility) As SynthesizedMethod
502Private Function OpenMoveNextMethodImplementation(methodToImplement As MethodSymbol, accessibility As Accessibility) As SynthesizedMethod
Lowering\SyntheticBoundNodeFactory.vb (6)
115Public Function StateMachineField(type As TypeSymbol, implicitlyDefinedBy As Symbol, name As String, Optional accessibility As Accessibility = Accessibility.Private) As SynthesizedFieldSymbol
121Public Function StateMachineField(type As TypeSymbol, implicitlyDefinedBy As Symbol, name As String, synthesizedKind As SynthesizedLocalKind, slotIndex As Integer, Optional accessibility As Accessibility = Accessibility.Private) As SynthesizedFieldSymbol
127Public Function StateMachineField(type As TypeSymbol, implicitlyDefinedBy As Symbol, name As String, slotDebugInfo As LocalSlotDebugInfo, slotIndex As Integer, Optional accessibility As Accessibility = Accessibility.Private) As SynthesizedFieldSymbol
Semantics\AccessCheck.vb (62)
174Private Shared Function CheckNonNestedTypeAccessibility(assembly As AssemblySymbol, declaredAccessibility As Accessibility, within As Symbol) As AccessCheckResult
181Case Accessibility.NotApplicable, Accessibility.Public
185Case Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndFriend
189Case Accessibility.Friend, Accessibility.ProtectedOrFriend
202declaredAccessibility As Accessibility,
221Case Accessibility.NotApplicable
224Case Accessibility.Public
227Case Accessibility.Private
241Case Accessibility.Friend
246Case Accessibility.ProtectedAndFriend
256Case Accessibility.ProtectedOrFriend
267Case Accessibility.Protected
658If exposedType.DeclaredAccessibility = Accessibility.Public Then
725Dim memberAccessOutsideAssembly As Accessibility = GetEffectiveAccessOutsideAssembly(exposedThrough)
727Debug.Assert(memberAccessOutsideAssembly <> Accessibility.Friend, "How can the access be friend outside the assembly ?")
729If memberAccessOutsideAssembly = Accessibility.Private Then
733Dim typeAccessOutsideAssembly As Accessibility = GetEffectiveAccessOutsideAssembly(exposedType)
735If typeAccessOutsideAssembly = Accessibility.Private Then
739If typeAccessOutsideAssembly = Accessibility.Public Then
743Debug.Assert(typeAccessOutsideAssembly = Accessibility.Protected, "What else can the Type access be outside the assembly ?")
745If memberAccessOutsideAssembly = Accessibility.Public Then
749Debug.Assert(memberAccessOutsideAssembly = Accessibility.Protected, "What else can the Member access be outside the assembly ?")
764Private Shared ReadOnly s_mapAccessToAccessOutsideAssembly() As Accessibility
767s_mapAccessToAccessOutsideAssembly = New Accessibility(Accessibility.Public) {}
769s_mapAccessToAccessOutsideAssembly(Accessibility.NotApplicable) = Accessibility.NotApplicable
770s_mapAccessToAccessOutsideAssembly(Accessibility.Private) = Accessibility.Private
771s_mapAccessToAccessOutsideAssembly(Accessibility.ProtectedAndFriend) = Accessibility.Private
772s_mapAccessToAccessOutsideAssembly(Accessibility.Protected) = Accessibility.Protected
773s_mapAccessToAccessOutsideAssembly(Accessibility.Friend) = Accessibility.Private
774s_mapAccessToAccessOutsideAssembly(Accessibility.ProtectedOrFriend) = Accessibility.Protected
775s_mapAccessToAccessOutsideAssembly(Accessibility.Public) = Accessibility.Public
781) As Accessibility
782Dim effectiveAccess As Accessibility = s_mapAccessToAccessOutsideAssembly(symbol.DeclaredAccessibility)
784If effectiveAccess = Accessibility.Private Then
792Dim accessOfContainer As Accessibility = s_mapAccessToAccessOutsideAssembly(enclosingType.DeclaredAccessibility)
798If effectiveAccess = Accessibility.Private Then
812) As Accessibility
813Dim accessOfMember As Accessibility = symbol.DeclaredAccessibility
861Dim membersAccessibilityInAssemblyContext As Accessibility = GetAccessInAssemblyContext(exposingMember, isOutsideAssembly)
863If membersAccessibilityInAssemblyContext = Accessibility.Private Then
874Dim StopAtAccess As Accessibility = Accessibility.Protected
879Dim exposingTypeAccessibilityInAssemblyContext As Accessibility = GetAccessInAssemblyContext(exposingType, isOutsideAssembly)
882If membersAccessibilityInAssemblyContext <= Accessibility.Protected Then
900If exposingTypeAccessibilityInAssemblyContext <> Accessibility.Protected Then
905Debug.Assert(exposingTypeAccessibilityInAssemblyContext = Accessibility.Protected)
927If GetAccessInAssemblyContext(type, isOutsideAssembly) = Accessibility.Private Then
970If GetAccessInAssemblyContext(type, isOutsideAssembly) <> Accessibility.Protected Then
990stopAtAccess As Accessibility,
1015Dim EnclosingContainerAccess As Accessibility = GetAccessInAssemblyContext(enclosingType, isOutsideAssembly)
Editing\SyntaxGenerator.cs (48)
124Accessibility accessibility = Accessibility.NotApplicable,
165Accessibility accessibility = Accessibility.NotApplicable,
179Accessibility accessibility,
259Accessibility accessibility = Accessibility.NotApplicable,
271Accessibility accessibility = Accessibility.NotApplicable,
355Accessibility accessibility = Accessibility.NotApplicable,
368var propertyAccessibility = property.DeclaredAccessibility;
377var getMethodAccessibility = getMethodSymbol.DeclaredAccessibility;
378getAccessor = GetAccessorDeclaration(getMethodAccessibility < propertyAccessibility ? getMethodAccessibility : Accessibility.NotApplicable, getAccessorStatements);
383var setMethodAccessibility = setMethodSymbol.DeclaredAccessibility;
385setMethodAccessibility < propertyAccessibility ? setMethodAccessibility : Accessibility.NotApplicable,
412Accessibility accessibility,
421Accessibility accessibility = Accessibility.NotApplicable,
425Accessibility accessibility = Accessibility.NotApplicable,
430Accessibility accessibility, bool isInitOnly, IEnumerable<SyntaxNode>? statements);
438Accessibility accessibility = Accessibility.NotApplicable,
484Accessibility accessibility = Accessibility.NotApplicable,
513Accessibility accessibility = Accessibility.NotApplicable,
546Accessibility accessibility = Accessibility.NotApplicable,
602Accessibility accessibility = Accessibility.NotApplicable,
616Accessibility accessibility,
628Accessibility accessibility = Accessibility.NotApplicable,
641Accessibility accessibility,
652Accessibility accessibility = Accessibility.NotApplicable,
663Accessibility accessibility,
672Accessibility accessibility = Accessibility.NotApplicable,
682Accessibility accessibility = Accessibility.NotApplicable,
699Accessibility accessibility = Accessibility.NotApplicable,
711Accessibility accessibility,
1216public abstract Accessibility GetAccessibility(SyntaxNode declaration);
1221public abstract SyntaxNode WithAccessibility(SyntaxNode declaration, Accessibility accessibility);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (28)
73(ImmutableArray<Accessibility> accessibilities, TData data),
208private static (ImmutableArray<Accessibility> accessibilities, TData data) GetSymbolsApplicableAccessibilities<T, TData>(
223private static readonly ImmutableArray<Accessibility> s_allAccessibility =
225Accessibility.NotApplicable,
226Accessibility.Public,
227Accessibility.Internal,
228Accessibility.Private,
229Accessibility.Protected,
230Accessibility.ProtectedAndInternal,
231Accessibility.ProtectedOrInternal,
234private static ImmutableArray<Accessibility> ParseAccessibilityKindList(string symbolSpecApplicableAccessibilities)
246var builder = ArrayBuilder<Accessibility>.GetInstance();
252builder.Add(Accessibility.Public);
256builder.Add(Accessibility.Internal);
259builder.Add(Accessibility.Private);
262builder.Add(Accessibility.Protected);
266builder.Add(Accessibility.ProtectedOrInternal);
269builder.Add(Accessibility.ProtectedAndInternal);
272builder.Add(Accessibility.NotApplicable);
444public static string ToEditorConfigString(this ImmutableArray<Accessibility> accessibilities, string languageName)
459private static string ToEditorConfigString(this Accessibility accessibility, string languageName)
463case Accessibility.NotApplicable:
466case Accessibility.Private:
469case Accessibility.ProtectedAndInternal:
472case Accessibility.Protected:
475case Accessibility.Internal:
485case Accessibility.ProtectedOrInternal:
495case Accessibility.Public:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (20)
32ImmutableArray<Accessibility> accessibilityList = default,
47public ImmutableArray<Accessibility> ApplicableAccessibilityList { get; } = accessibilityList.IsDefault ? DefaultSymbolSpecificationTemplate.ApplicableAccessibilityList : accessibilityList;
85Accessibility.NotApplicable,
86Accessibility.Public,
87Accessibility.Internal,
88Accessibility.Private,
89Accessibility.Protected,
90Accessibility.ProtectedAndInternal,
91Accessibility.ProtectedOrInternal,
101public bool AppliesTo(SymbolKind symbolKind, Accessibility accessibility)
104public bool AppliesTo(SymbolKindOrTypeKind kind, DeclarationModifiers modifiers, Accessibility? accessibility)
158private static Accessibility GetAccessibility(ISymbol symbol)
165return Accessibility.Public;
177return Accessibility.NotApplicable;
188return Accessibility.NotApplicable;
242reader.ReadArray(r => (Accessibility)r.ReadInt32()),
311private static ImmutableArray<Accessibility> GetAccessibilityListFromXElement(XElement accessibilityListElement)
314private static Accessibility ParseAccessibility(XElement accessibilityElement)
315=> (Accessibility)Enum.Parse(typeof(Accessibility), accessibilityElement.Value);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (20)
34ImmutableArray<AttributeData> attributes, Accessibility accessibility,
50Accessibility accessibility,
83ImmutableArray<AttributeData> attributes, Accessibility accessibility, DeclarationModifiers modifiers,
109Accessibility accessibility,
126Accessibility accessibility,
155Accessibility accessibility,
178ImmutableArray<AttributeData> attributes, Accessibility accessibility, DeclarationModifiers modifiers,
198Accessibility accessibility,
235accessibility: Accessibility.Public,
251Accessibility accessibility,
364Accessibility? accessibility = null,
389Accessibility accessibility,
421Accessibility accessibility,
440Accessibility accessibility,
466Accessibility accessibility,
477accessibility: Accessibility.Public,
518Accessibility? accessibility = null,
549Accessibility? accessibility = null,
576Accessibility? accessibility = null,
597Accessibility? accessibility = null,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationArrayTypeSymbol.cs (1)
10internal sealed class CodeGenerationArrayTypeSymbol(ITypeSymbol elementType, int rank, NullableAnnotation nullableAnnotation) : CodeGenerationTypeSymbol(null, null, default, Accessibility.NotApplicable, default, string.Empty, SpecialType.None, nullableAnnotation), IArrayTypeSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationConstructorSymbol.cs (1)
20Accessibility accessibility,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\Symbols\CodeGenerationDestructorSymbol.cs (1)
15Accessibility.NotApplicable,