330 references to Protected
ILLink.CodeFixProvider (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (3)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (1)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.CodeStyle (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
89Accessibility.Protected,
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
Microsoft.CodeAnalysis.CSharp (31)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (1)
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)
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\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)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
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);
Microsoft.CodeAnalysis.CSharp.Workspaces (6)
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)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
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;
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Microsoft.CodeAnalysis.VisualBasic (33)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
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)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (22)
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],
Microsoft.CodeAnalysis.VisualBasic.Workspaces (7)
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)
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)
Microsoft.VisualStudio.LanguageServices (6)
Microsoft.VisualStudio.LanguageServices.CSharp (3)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)