330 references to Protected
ILLink.CodeFixProvider (1)
BaseAttributeCodeFixProvider.cs (1)
136 if (m is not { DeclaredAccessibility: Accessibility.Public or Accessibility.Protected }) {
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
StaticRouteHandlerModel\Emitters\DiagnosticEmitter.cs (3)
19if (response.ResponseType?.DeclaredAccessibility is Accessibility.Private or Accessibility.Protected) 40if (typeSymbol.DeclaredAccessibility is Accessibility.Private or Accessibility.Protected || 43typeArg.DeclaredAccessibility is Accessibility.Private or Accessibility.Protected))
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (1)
GeneratorHelpers.cs (1)
18case Accessibility.Protected:
Microsoft.CodeAnalysis (4)
Symbols\Accessibility.cs (4)
24/// (more restrictive than <see cref="Protected"/>, <see cref="Internal"/> and <see cref="ProtectedOrInternal"/>). 30/// (more restrictive than <see cref="Protected"/>, <see cref="Friend"/> and <see cref="ProtectedOrFriend"/>). 41/// (less restrictive than <see cref="Protected"/>, <see cref="Internal"/> and <see cref="ProtectedAndInternal"/>). 47/// (less restrictive than <see cref="Protected"/>, <see cref="Friend"/> and <see cref="ProtectedAndFriend"/>).
Microsoft.CodeAnalysis.CodeStyle (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AccessibilityUtilities.cs (3)
21if (accessibility1 == Accessibility.Protected || accessibility2 == Accessibility.Protected) 23return Accessibility.Protected;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
571: Accessibility.Protected;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (2)
226case Accessibility.Protected: 320case Accessibility.Protected:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
229Accessibility.Protected, 262builder.Add(Accessibility.Protected); 472case Accessibility.Protected:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
89Accessibility.Protected,
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
53return Accessibility.Protected;
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
144case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
660TypeToGenerateIn.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
59case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.AbstractCodeAction.cs (2)
92return Accessibility.Protected; 99case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
240return isAbstract ? Accessibility.Protected : Accessibility.Private; 262return Accessibility.Protected;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
162return Accessibility.Protected;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
142: Accessibility.Protected;
Microsoft.CodeAnalysis.CSharp (31)
Binder\Binder_Expressions.cs (1)
8735case Accessibility.Protected:
Binder\Semantics\AccessCheck.cs (3)
93case Accessibility.Protected: 272case Accessibility.Protected: 403case Accessibility.Protected:
Compiler\ClsComplianceChecker.cs (1)
1238case Accessibility.Protected:
Compiler\DocumentationCommentCompiler.cs (1)
670case Accessibility.Protected:
Compiler\MethodBodySynthesizer.cs (1)
604if ((accessibility == Accessibility.ProtectedOrInternal || accessibility == Accessibility.Protected) &&
SymbolDisplay\SymbolDisplayVisitor.cs (1)
406case Accessibility.Protected:
Symbols\AccessibilityExtensions.cs (1)
17case Accessibility.Protected:
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
560access = Accessibility.Protected;
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
513return Accessibility.Protected;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
664access = Accessibility.Protected;
Symbols\Metadata\PE\PEPropertySymbol.cs (2)
493? Accessibility.Protected 505? Accessibility.Protected
Symbols\PropertyOrEventSymbolExtensions.cs (1)
79return ((minAccessibility == Accessibility.Protected) && (maxAccessibility == Accessibility.Internal))
Symbols\Source\ModifierUtils.cs (1)
527return Accessibility.Protected;
Symbols\Source\SourceMemberContainerSymbol.cs (3)
4365if (!this.IsSealed && (constructor.DeclaredAccessibility != Accessibility.Public && constructor.DeclaredAccessibility != Accessibility.Protected)) 4415else if (printMembersMethod.DeclaredAccessibility != Accessibility.Protected) 4677else if (equalityContract.DeclaredAccessibility != Accessibility.Protected)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (2)
1666case Accessibility.Protected: 1712return overriding.DeclaredAccessibility == Accessibility.Protected;
Symbols\Source\SourcePropertySymbolBase.cs (1)
1147((accessor != Accessibility.Protected) || (property != Accessibility.Internal));
Symbols\Symbol.cs (1)
279case Accessibility.Protected:
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
36public override Accessibility DeclaredAccessibility => ContainingType.IsSealed ? Accessibility.Private : Accessibility.Protected;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
42get { return ContainingType.IsAbstract ? Accessibility.Protected : Accessibility.Public; }
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
79return Accessibility.Protected;
Symbols\TypeSymbolExtensions.cs (4)
1035goto case Accessibility.Protected; 1040case Accessibility.Protected: 1060else if (acc2 == Accessibility.Protected || acc2 == Accessibility.ProtectedAndInternal) 1114case Accessibility.Protected:
Syntax\SyntaxFacts.cs (1)
370case Accessibility.Protected:
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
301if (primaryConstructor.DeclaredAccessibility == Accessibility.Protected)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (3)
115(SyntaxKind.PrivateKeyword, Accessibility.Protected) => Accessibility.ProtectedAndInternal, 118(SyntaxKind.InternalKeyword, Accessibility.Protected) => Accessibility.ProtectedOrInternal, 123(SyntaxKind.ProtectedKeyword, _) => Accessibility.Protected,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
52case Accessibility.Protected:
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
257var alternateAccessibility = accessibility == Accessibility.Public ? Accessibility.Protected : Accessibility.Public;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (8)
60Accessibility.Protected, 126new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal }, 188Accessibility.Protected, 274new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal }, 313new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal }, 375[InlineData("*", new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal })] 376[InlineData(null, new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal })] 377[InlineData("internal,protected,invalid", new[] { Accessibility.Internal, Accessibility.Protected })]
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
BreakingChanges.cs (2)
129Assert.Equal(Accessibility.Protected, derivedProperty1Synthesized.DeclaredAccessibility); 132Assert.Equal(Accessibility.Protected, derivedProperty2Synthesized.DeclaredAccessibility);
CodeGen\DestructorTests.cs (1)
838Assert.Equal(Accessibility.Protected, destructor.DeclaredAccessibility);
Emit\EmitMetadataTests.cs (8)
512Assert.Equal(Accessibility.Protected, classF.DeclaredAccessibility); 565Assert.Equal(Accessibility.Protected, f4.DeclaredAccessibility); 603Assert.Equal(Accessibility.Protected, ctor.DeclaredAccessibility); 872CheckPropertyAccessibility(p4, Accessibility.Protected, Accessibility.Protected, Accessibility.NotApplicable); 875CheckPropertyAccessibility(p9, Accessibility.Protected, Accessibility.Protected, privateOrNotApplicable); 876CheckPropertyAccessibility(p10, Accessibility.ProtectedOrInternal, Accessibility.Protected, Accessibility.ProtectedOrInternal);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (15)
Semantics\PrimaryConstructorTests.cs (1)
478Assert.Equal(Accessibility.Protected, ctor.DeclaredAccessibility);
Semantics\RecordTests.cs (14)
4921Assert.Equal(Accessibility.Protected, print.DeclaredAccessibility); 4996Assert.Equal(Accessibility.Protected, print.DeclaredAccessibility); 5073Assert.Equal(Accessibility.Protected, print.DeclaredAccessibility); 5458Assert.Equal(Accessibility.Protected, print.DeclaredAccessibility); 5851Assert.Equal(Accessibility.Protected, print.DeclaredAccessibility); 9982Assert.Equal(Accessibility.Protected, b1Ctor.DeclaredAccessibility); 18159Assert.Equal(Accessibility.Protected, copyCtor.DeclaredAccessibility); 18915Assert.Equal(Accessibility.Protected, equalityContract.DeclaredAccessibility); 18925Assert.Equal(Accessibility.Protected, equalityContractGet!.DeclaredAccessibility); 19031Assert.Equal(Accessibility.Protected, equalityContract.DeclaredAccessibility); 19041Assert.Equal(Accessibility.Protected, equalityContractGet!.DeclaredAccessibility); 19104Assert.Equal(modifiers == "sealed " ? Accessibility.Private : Accessibility.Protected, equalityContract.DeclaredAccessibility); 19114Assert.Equal(modifiers == "sealed " ? Accessibility.Private : Accessibility.Protected, equalityContractGet!.DeclaredAccessibility); 20067Assert.Equal(Accessibility.Protected, equalityContract.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Features (8)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (2)
602return Accessibility.Protected; 647case Accessibility.Protected:
Completion\CompletionProviders\OverrideCompletionProvider.cs (3)
155Accessibility.Protected => Accessibility.ProtectedAndInternal, 164Accessibility.Protected => Accessibility.ProtectedOrInternal, 171Accessibility.NotApplicable => Accessibility.Protected,
GenerateType\CSharpGenerateTypeService.cs (1)
548else if (accessibilityConstraint is Accessibility.Protected or
Snippets\CSharpConstructorSnippetProvider.cs (1)
73accessibility: syntaxContext.PrecedingModifiers.Any() ? Accessibility.NotApplicable : (containingTypeSymbol.IsAbstract ? Accessibility.Protected : Accessibility.Public));
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
301if (primaryConstructor.DeclaredAccessibility == Accessibility.Protected)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (1)
257var alternateAccessibility = accessibility == Accessibility.Public ? Accessibility.Protected : Accessibility.Public;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (59)
Symbols\DefaultInterfaceImplementationTests.cs (39)
8455Assert.Equal(Accessibility.Protected, m02.DeclaredAccessibility); 11801foreach (var tuple in new[] { (name: "M1", access: Accessibility.Protected), (name: "M2", access: Accessibility.ProtectedOrInternal), (name: "M3", access: Accessibility.ProtectedAndInternal) }) 11863ValidateMethodModifiersImplicit_10(compilation1.SourceModule, Accessibility.Protected); 11886CompileAndVerify(compilation1, expectedOutput: !ExecutionConditionUtil.IsMonoOrCoreClr ? null : "M1", verify: VerifyOnMonoOrCoreClr, symbolValidator: (m) => ValidateMethodModifiersImplicit_10(m, Accessibility.Protected)).VerifyDiagnostics(); 11888ValidateMethodModifiersImplicit_10(compilation1.SourceModule, Accessibility.Protected); 11896ValidateMethodModifiers_10(compilation2.GetTypeByMetadataName("I1").GetMember<MethodSymbol>("M1"), Accessibility.Protected); 11913ValidateMethodModifiersImplicit_10(compilation3.SourceModule, Accessibility.Protected); 11920CompileAndVerify(compilation3, expectedOutput: !ExecutionConditionUtil.IsMonoOrCoreClr ? null : "M1", verify: VerifyOnMonoOrCoreClr, symbolValidator: (m) => ValidateMethodModifiersImplicit_10(m, Accessibility.Protected)).VerifyDiagnostics(); 11921ValidateMethodModifiersImplicit_10(compilation3.SourceModule, Accessibility.Protected); 12222CompileAndVerify(compilation1, expectedOutput: ExecutionConditionUtil.IsMonoOrCoreClr ? "M1" : null, verify: VerifyOnMonoOrCoreClr, symbolValidator: (m) => ValidateMethodModifiersExplicit_10(m, Accessibility.Protected)); 12224ValidateMethodModifiersExplicit_10(compilation1.SourceModule, Accessibility.Protected); 12232ValidateMethodModifiers_10(compilation2.GetTypeByMetadataName("I1").GetMember<MethodSymbol>("M1"), Accessibility.Protected); 12243CompileAndVerify(compilation3, expectedOutput: "M1", symbolValidator: (m) => ValidateMethodModifiersExplicit_10(m, Accessibility.Protected)); 12245ValidateMethodModifiersExplicit_10(compilation3.SourceModule, Accessibility.Protected); 12459ValidateMethodModifiers_10_02(source1, source2, Accessibility.Protected, 12669Assert.Equal(Accessibility.Protected, m1.DeclaredAccessibility); 13151Assert.Equal(Accessibility.Protected, p02.DeclaredAccessibility); 13161Assert.Equal(Accessibility.Protected, p02get.DeclaredAccessibility); 13392ValidateP13Accessor(p13.SetMethod, Accessibility.Protected); 20514foreach (var tuple in new[] { (name: "P1", access: Accessibility.Protected, getAccess: Accessibility.Protected, setAccess: Accessibility.Protected), 20517(name: "P4", access: Accessibility.Public, getAccess: Accessibility.Protected, setAccess: Accessibility.Public), 20593ValidatePropertyModifiers_11_01(source1, source2, Accessibility.Protected, 20770ValidatePropertyModifiers_23(source1, source2, Accessibility.Protected, Accessibility.Public, 21162ValidatePropertyModifiers_20(source1, source2, Accessibility.Protected); 21339ValidatePropertyModifiers_22(source1, Accessibility.Protected); 21628Assert.Equal(Accessibility.Protected, p02.DeclaredAccessibility); 21638Assert.Equal(Accessibility.Protected, p02get.DeclaredAccessibility); 21869ValidateP13Accessor(p13.SetMethod, Accessibility.Protected); 26873Assert.Equal(Accessibility.Protected, p02.DeclaredAccessibility); 26883Assert.Equal(Accessibility.Protected, p02get.DeclaredAccessibility); 31226foreach (var tuple in new[] { (name: "P1", access: Accessibility.Protected), 31302ValidateEventModifiers_11(source1, source2, Accessibility.Protected, 31614ValidateEventModifiers_20(source1, source2, Accessibility.Protected); 31930ValidateNestedTypes_01(source0 + source1, Accessibility.Protected, targetFramework: TargetFramework.NetCoreApp, execute: ExecutionConditionUtil.IsMonoOrCoreClr, verify: VerifyOnMonoOrCoreClr_FailsIlVerify); 31938Assert.Equal(Accessibility.Protected, compilation1.GetMember("I1.T" + i).DeclaredAccessibility); 43749Assert.Equal(Accessibility.Protected, f2.DeclaredAccessibility); 44317Assert.Equal(Accessibility.Protected, f1.DeclaredAccessibility);
Symbols\IndexerTests.cs (1)
2716var protectedIndexer = indexers.Single(indexer => indexer.DeclaredAccessibility == Accessibility.Protected);
Symbols\Metadata\MetadataMemberTests.cs (1)
165Assert.Equal(Accessibility.Protected, ctor.DeclaredAccessibility);
Symbols\Metadata\PE\LoadingFields.cs (2)
70Assert.Equal(Accessibility.Protected, f2.DeclaredAccessibility); 94Assert.Equal(Accessibility.Protected, f5.DeclaredAccessibility);
Symbols\Metadata\PE\LoadingMethods.cs (2)
62Assert.Equal(Accessibility.Protected, localM2.DeclaredAccessibility); 80Assert.Equal(Accessibility.Protected, localM3.DeclaredAccessibility);
Symbols\Metadata\PE\TypeAccessibility.cs (1)
90Assert.Equal(Accessibility.Protected, serializedArg.DeclaredAccessibility);
Symbols\OverriddenOrHiddenMembersTests.cs (3)
2921p.DeclaredAccessibility == (p.ContainingType.Name == "A" ? Accessibility.ProtectedOrInternal : Accessibility.Protected)); 2969p.DeclaredAccessibility == (p.ContainingType.Name == "A" ? Accessibility.ProtectedOrInternal : Accessibility.Protected)); 3285e.DeclaredAccessibility == (e.ContainingType.Name == "A" ? Accessibility.ProtectedOrInternal : Accessibility.Protected));
Symbols\Source\EventTests.cs (2)
161Assert.Equal(Accessibility.Protected, @event.DeclaredAccessibility); 1873Assert.Equal(Accessibility.Protected, event2.AddMethod.DeclaredAccessibility);
Symbols\Source\MethodTests.cs (2)
91check(@"abstract internal class A { }", "A", 1, Accessibility.Protected); 668Assert.Equal(Accessibility.Protected, m0.DeclaredAccessibility);
Symbols\Source\ModifierTests.cs (2)
56Assert.Equal(Accessibility.Protected, m3.DeclaredAccessibility); 118Assert.Equal(Accessibility.Protected, m3.DeclaredAccessibility);
Symbols\Source\PropertyTests.cs (4)
795Accessibility.Protected, 800Accessibility.Protected, 804Accessibility.Protected, 805Accessibility.Protected,
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1680case Accessibility.Protected:
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
606case SyntaxKind.ProtectedKeyword: return Accessibility.Protected;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (3)
115(SyntaxKind.PrivateKeyword, Accessibility.Protected) => Accessibility.ProtectedAndInternal, 118(SyntaxKind.InternalKeyword, Accessibility.Protected) => Accessibility.ProtectedOrInternal, 123(SyntaxKind.ProtectedKeyword, _) => Accessibility.Protected,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
52case Accessibility.Protected:
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
CodeGeneration\SyntaxGeneratorTests.cs (5)
1486Generator.IndexerDeclaration(parameters: [Generator.ParameterDeclaration("p", Generator.IdentifierName("a"))], type: Generator.IdentifierName("t"), accessibility: Accessibility.Protected, modifiers: DeclarationModifiers.Abstract), 3415Generator.GetAccessorDeclaration(Accessibility.Protected, [Generator.ReturnStatement()])), 3421Generator.SetAccessorDeclaration(Accessibility.Protected, [Generator.ReturnStatement()])), 3430Generator.GetAccessorDeclaration(Accessibility.Protected, [Generator.ReturnStatement()])), 3436Generator.SetAccessorDeclaration(Accessibility.Protected, [Generator.ReturnStatement()])),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.CSharp.cs (1)
641accessibility: Accessibility.Protected,
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
607accessibility: Accessibility.Protected,
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
DkmUtilities.cs (1)
314case Accessibility.Protected:
Microsoft.CodeAnalysis.Features (33)
Common\GlyphExtensions.cs (14)
55Accessibility.Protected => Glyph.ClassProtected, 63Accessibility.Protected => Glyph.ConstantProtected, 71Accessibility.Protected => Glyph.DelegateProtected, 79Accessibility.Protected => Glyph.EnumProtected, 87Accessibility.Protected => Glyph.EnumMemberProtected, 98Accessibility.Protected => Glyph.EventProtected, 106Accessibility.Protected => Glyph.ExtensionMethodProtected, 114Accessibility.Protected => Glyph.FieldProtected, 122Accessibility.Protected => Glyph.InterfaceProtected, 148Accessibility.Protected => Glyph.MethodProtected, 156Accessibility.Protected => Glyph.ModulePublic, 173Accessibility.Protected => Glyph.PropertyProtected, 190Accessibility.Protected => Glyph.StructureProtected, 220return Accessibility.Protected;
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (2)
140Accessibility.Protected => declaredAccessibility is Accessibility.Protected or Accessibility.ProtectedAndInternal or Accessibility.ProtectedOrInternal,
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (1)
91accessibility: _state.ContainingType.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
66Accessibility = desiredAccessibility ?? (ContainingType.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
649case Accessibility.Protected:
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (1)
240.Where(c => c.DeclaredAccessibility is Accessibility.Public or Accessibility.Protected && !c.IsObsolete())
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
32Accessibility.Protected or
NavigateTo\RoslynNavigateToItem.cs (1)
325case Accessibility.Protected:
Shared\Extensions\ISymbolExtensions_2.cs (1)
169case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
53return Accessibility.Protected;
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
144case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
660TypeToGenerateIn.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
59case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.AbstractCodeAction.cs (2)
92return Accessibility.Protected; 99case Accessibility.Protected:
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (2)
240return isAbstract ? Accessibility.Protected : Accessibility.Private; 262return Accessibility.Protected;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
162return Accessibility.Protected;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
142: Accessibility.Protected;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
629.Replace(nameof(Accessibility.Protected), string.Empty)
Microsoft.CodeAnalysis.VisualBasic (33)
Binding\Binder.vb (1)
970Case Accessibility.Protected,
Binding\Binder_Utils.vb (2)
233access = Accessibility.Protected 1554AccessibilityProtected = CUShort(Accessibility.Protected)
Binding\LookupResult.vb (2)
837If first.DeclaredAccessibility = Accessibility.Protected AndAlso 844If second.DeclaredAccessibility = Accessibility.Protected AndAlso
Compilation\ClsComplianceChecker.vb (1)
819Case Accessibility.Protected, Accessibility.ProtectedOrFriend
Declarations\DeclarationModifiersExtensions.vb (1)
14Case DeclarationModifiers.Protected : Return Accessibility.Protected
Errors\ErrorMessageHelpers.vb (1)
19Case Accessibility.Protected
Semantics\AccessCheck.vb (12)
185Case Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndFriend 267Case Accessibility.Protected 743Debug.Assert(typeAccessOutsideAssembly = Accessibility.Protected, "What else can the Type access be outside the assembly ?") 749Debug.Assert(memberAccessOutsideAssembly = Accessibility.Protected, "What else can the Member access be outside the assembly ?") 772s_mapAccessToAccessOutsideAssembly(Accessibility.Protected) = Accessibility.Protected 774s_mapAccessToAccessOutsideAssembly(Accessibility.ProtectedOrFriend) = Accessibility.Protected 874Dim StopAtAccess As Accessibility = Accessibility.Protected 882If membersAccessibilityInAssemblyContext <= Accessibility.Protected Then 900If exposingTypeAccessibilityInAssemblyContext <> Accessibility.Protected Then 905Debug.Assert(exposingTypeAccessibilityInAssemblyContext = Accessibility.Protected) 970If GetAccessInAssemblyContext(type, isOutsideAssembly) <> Accessibility.Protected Then
SymbolDisplay\SymbolDisplayVisitor.vb (1)
356Case Accessibility.Protected
Symbols\AccessibilityExtensions.vb (1)
25Case Accessibility.Protected
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
130access = Accessibility.Protected
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
616access = Accessibility.Protected
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
361access = Accessibility.Protected
Symbols\Metadata\PE\PEPropertyOrEventHelpers.vb (1)
62Return If(((minAccessibility = Accessibility.[Protected]) AndAlso (maxAccessibility = Accessibility.Friend)), Accessibility.ProtectedOrFriend, maxAccessibility)
Symbols\Metadata\PE\PEPropertySymbol.vb (1)
434Return If(((minAccessibility = Accessibility.Protected) AndAlso (maxAccessibility = Accessibility.Friend)), Accessibility.ProtectedOrFriend, maxAccessibility)
Symbols\Source\OverrideHidingHelper.vb (1)
1011Return overriding.DeclaredAccessibility = Accessibility.Protected
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
28[Protected] = CUShort(Accessibility.Protected)
Symbols\Source\SourcePropertySymbol.vb (1)
1056Return (accessor < [property]) AndAlso ((accessor <> Accessibility.Protected) OrElse ([property] <> Accessibility.Friend))
Symbols\Symbol.vb (1)
111Case Accessibility.Protected
Symbols\SynthesizedSymbols\SynthesizedConstructorBase.vb (1)
81Return Accessibility.Protected
Syntax\SyntaxFacts.vb (1)
537Case Accessibility.Protected
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicAccessibilityFacts.vb (3)
197If accessibility = Accessibility.Protected Then 203If accessibility = Accessibility.Protected Then 214accessibility = Accessibility.Protected
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
127accessibility:=Accessibility.Protected,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
170Case Accessibility.Protected
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
35Case Accessibility.Protected
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
384Case Accessibility.Protected
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
230accessibility:=Accessibility.Protected,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Emit\EmitMetadata.vb (2)
500Assert.Equal(Accessibility.Protected, classF.DeclaredAccessibility) 786Assert.Equal(Accessibility.Protected, ctor.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Completion\CompletionProviders\OverrideCompletionProvider.vb (2)
113If seenAccessibility = Accessibility.Protected Then 119seenAccessibility = Accessibility.Protected
src\Analyzers\VisualBasic\CodeFixes\ImplementInterface\VisualBasicImplementInterfaceService.vb (1)
127accessibility:=Accessibility.Protected,
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (22)
SymbolsTests\Metadata\MetadataMemberTests.vb (1)
169Assert.Equal(Accessibility.Protected, ctor.DeclaredAccessibility)
SymbolsTests\Metadata\PE\LoadingFields.vb (2)
60Assert.Equal(Accessibility.Protected, f2.DeclaredAccessibility) 81Assert.Equal(Accessibility.Protected, f5.DeclaredAccessibility)
SymbolsTests\Metadata\PE\LoadingMethods.vb (2)
60Assert.Equal(Accessibility.Protected, (M2.DeclaredAccessibility)) 77Assert.Equal(Accessibility.Protected, (M3.DeclaredAccessibility))
SymbolsTests\Metadata\PE\TypeAccessibility.vb (1)
79Assert.Equal(Accessibility.Protected, SerializedArg.DeclaredAccessibility)
SymbolsTests\Source\FieldTests.vb (1)
132Assert.Equal(Accessibility.Protected, fieldS.DeclaredAccessibility)
SymbolsTests\Source\MethodTests.vb (3)
102Assert.Equal(Accessibility.Protected, m2.DeclaredAccessibility) 134Assert.Equal(Accessibility.Protected, m5.DeclaredAccessibility) 415Assert.Equal(Accessibility.Protected, m2.DeclaredAccessibility)
SymbolsTests\Source\PropertyTests.vb (10)
1252VerifyAutoProperty(type, "P", Accessibility.Protected, isFromSource) 4516CheckPropertyAccessibility(p4, Accessibility.Protected, Accessibility.Protected, Accessibility.NotApplicable) 4517CheckPropertyAccessibility(p10, Accessibility.ProtectedOrFriend, Accessibility.Protected, Accessibility.ProtectedOrFriend) 4528CheckPropertyAccessibility(p9, Accessibility.Protected, Accessibility.Protected, privateOrNotApplicable) 4706Accessibility.[Protected], 4711Accessibility.[Protected], 4715Accessibility.[Protected], 4716Accessibility.[Protected],
SymbolsTests\Source\TypeTests.vb (2)
292Assert.Equal(Accessibility.Protected, i2Arity1.DeclaredAccessibility) 306Assert.Equal(Accessibility.Protected, i2Arity2.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (1)
412Case SyntaxKind.ProtectedKeyword : Return Accessibility.Protected
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicAccessibilityFacts.vb (3)
197If accessibility = Accessibility.Protected Then 203If accessibility = Accessibility.Protected Then 214accessibility = Accessibility.Protected
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
170Case Accessibility.Protected
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
35Case Accessibility.Protected
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
384Case Accessibility.Protected
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (5)
CodeGeneration\SyntaxGeneratorTests.vb (5)
1206Generator.GetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})), 1216Generator.SetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})), 1229Generator.GetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})), 1239Generator.SetAccessorDeclaration(Accessibility.Protected, {Generator.ReturnStatement()})), 1849Generator.IndexerDeclaration({Generator.ParameterDeclaration("p", Generator.IdentifierName("a"))}, Generator.IdentifierName("t"), Accessibility.Protected, DeclarationModifiers.Abstract),
Microsoft.CodeAnalysis.Workspaces (11)
FindSymbols\SymbolFinder_Helpers.cs (1)
22Accessibility.Protected or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AccessibilityUtilities.cs (3)
21if (accessibility1 == Accessibility.Protected || accessibility2 == Accessibility.Protected) 23return Accessibility.Protected;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (1)
571: Accessibility.Protected;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (2)
226case Accessibility.Protected: 320case Accessibility.Protected:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
229Accessibility.Protected, 262builder.Add(Accessibility.Protected); 472case Accessibility.Protected:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
89Accessibility.Protected,
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
EditorConfigParsing\NamingStyleParserTests.cs (8)
73accessibility => Assert.Equal(Accessibility.Protected, accessibility), 111accessibility => Assert.Equal(Accessibility.Protected, accessibility), 149accessibility => Assert.Equal(Accessibility.Protected, accessibility), 195accessibility => Assert.Equal(Accessibility.Protected, accessibility), 233accessibility => Assert.Equal(Accessibility.Protected, accessibility), 269accessibility => Assert.Equal(Accessibility.Protected, accessibility), 307accessibility => Assert.Equal(Accessibility.Protected, accessibility), 343accessibility => Assert.Equal(Accessibility.Protected, accessibility),
Microsoft.Gen.Logging (1)
Parsing\Parser.TagProvider.cs (1)
190case Accessibility.Protected:
Microsoft.VisualStudio.LanguageServices (6)
Library\ObjectBrowser\AbstractListItemFactory.cs (1)
159return symbol.DeclaredAccessibility is Accessibility.Protected or Accessibility.ProtectedOrInternal
Library\ObjectBrowser\ObjectList.cs (2)
177case Accessibility.Protected: 253case Accessibility.Protected:
Progression\GraphBuilder.cs (1)
445case Accessibility.Protected:
Progression\IconHelper.cs (1)
27case Accessibility.Protected:
Venus\ContainedLanguageCodeSupport.cs (1)
192accessibility: Accessibility.Protected,
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (2)
1007or Accessibility.Protected 1037Accessibility.Protected => EnvDTE.vsCMAccess.vsCMAccessProtected,
ObjectBrowser\DescriptionBuilder.cs (1)
144case Accessibility.Protected:
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
GlyphExtensionsTests.cs (1)
53declaredAccessibility: Accessibility.Protected);
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
CodeModel\VisualBasicCodeModelService.vb (2)
1406symbol.DeclaredAccessibility = Accessibility.Protected OrElse 1436Case Accessibility.Protected
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
146Case Accessibility.Protected
ObjectBrowser\DescriptionBuilder.vb (1)
297Case Accessibility.Protected