685 references to Private
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
ILLink.RoslynAnalyzer (7)
CompilationExtensions.cs (1)
102 case Accessibility.Private:
DataFlow\DynamicallyAccessedMembersBinder.cs (6)
158 if (onBaseType && method.DeclaredAccessibility == Accessibility.Private) 197 if (onBaseType && field.DeclaredAccessibility == Accessibility.Private) 258 (property.GetMethod == null || property.GetMethod.DeclaredAccessibility == Accessibility.Private) && 259 (property.SetMethod == null || property.SetMethod.DeclaredAccessibility == Accessibility.Private)) 308 (@event.AddMethod == null || @event.AddMethod.DeclaredAccessibility == Accessibility.Private) && 309 (@event.RemoveMethod == null || @event.RemoveMethod.DeclaredAccessibility == Accessibility.Private))
Microsoft.Analyzers.Extra (1)
Utilities\SymbolExtensions.cs (1)
45case Accessibility.Private:
Microsoft.Analyzers.Local (1)
Utilities\SymbolExtensions.cs (1)
21case Accessibility.Private:
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)
14case Accessibility.Private:
Microsoft.CodeAnalysis.CodeStyle (18)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
164DeclaredAccessibility: Accessibility.Private,
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
739if (memberSymbol.DeclaredAccessibility == Accessibility.Private &&
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (3)
135DeclaredAccessibility: Accessibility.Private, 399if (getterField.DeclaredAccessibility != Accessibility.Private) 569if (result.Property.DeclaredAccessibility != Accessibility.Private &&
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
184DeclaredAccessibility: Accessibility.Private,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AccessibilityUtilities.cs (3)
11if (accessibility1 == Accessibility.Private || accessibility2 == Accessibility.Private) 13return Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
55case Accessibility.Private: 557return Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (2)
225case Accessibility.Private: 279case Accessibility.Private:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
700hasPrivateField |= fieldSymbol.DeclaredAccessibility == Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
228Accessibility.Private, 259builder.Add(Accessibility.Private); 466case Accessibility.Private:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
88Accessibility.Private,
Microsoft.CodeAnalysis.CodeStyle.Fixes (9)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
81var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
240return isAbstract ? Accessibility.Protected : Accessibility.Private;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
142return Accessibility.Private;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
293: Accessibility.Private;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
141? Accessibility.Private 240SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 247: Accessibility.Private;
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
88Accessibility.Private,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
275accessibility: Accessibility.Private,
Microsoft.CodeAnalysis.CSharp (55)
Binder\Binder_Lookup.cs (1)
1654if (s.DeclaredAccessibility == Accessibility.Private)
Binder\Semantics\AccessCheck.cs (3)
100case Accessibility.Private: 271case Accessibility.Private: 362case Accessibility.Private:
Compiler\ClsComplianceChecker.cs (1)
1241case Accessibility.Private:
Emitter\Model\MethodSymbolAdapter.cs (1)
598return (accessibility == Accessibility.Private ||
Emitter\Model\PEModuleBuilder.cs (1)
777if (type.DeclaredAccessibility == Accessibility.Private)
FlowAnalysis\EmptyStructTypeCache.cs (1)
263case Accessibility.Private:
Lowering\IteratorRewriter\IteratorFinallyMethodSymbol.cs (1)
211get { return Accessibility.Private; }
SymbolDisplay\SymbolDisplayVisitor.cs (1)
395case Accessibility.Private:
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.FieldSymbol.cs (1)
133get { return Accessibility.Private; }
Symbols\Metadata\PE\PEEventSymbol.cs (1)
160Debug.Assert(candidateAssociatedField.DeclaredAccessibility == Accessibility.Private);
Symbols\Metadata\PE\PEFieldSymbol.cs (3)
534var access = Accessibility.Private; 552access = Accessibility.Private; 564access = Accessibility.Private;
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
507return Accessibility.Private; 516return Accessibility.Private;
Symbols\Metadata\PE\PENamedTypeSymbol.cs (3)
638Accessibility access = Accessibility.Private; 655access = Accessibility.Private; 1965if (symbol.DeclaredAccessibility == Accessibility.Private)
Symbols\Source\GlobalExpressionVariable.cs (1)
37Debug.Assert(DeclaredAccessibility == Accessibility.Private);
Symbols\Source\LambdaSymbol.cs (1)
216get { return Accessibility.Private; }
Symbols\Source\ModifierUtils.cs (1)
525return Accessibility.Private;
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
94if (delegateType.DeclaredAccessibility <= Accessibility.Private)
Symbols\Source\SourceEventSymbol.cs (1)
533if (this.DeclaredAccessibility == Accessibility.Private && (IsVirtual || (IsAbstract && !isExplicitInterfaceImplementationInInterface) || IsOverride))
Symbols\Source\SourceMemberContainerSymbol.cs (8)
728if (fieldDeclaredAccessibility == Accessibility.Private) 733else if (containerEffectiveAccessibility == Accessibility.Private) 894if (result == Accessibility.Private) return Accessibility.Private; 899case Accessibility.Private: 900return Accessibility.Private; 4410if (printMembersMethod.DeclaredAccessibility != Accessibility.Private) 4672if (equalityContract.DeclaredAccessibility != Accessibility.Private)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1661case Accessibility.Private:
Symbols\Source\SourceMemberMethodSymbol.cs (1)
340if (this.DeclaredAccessibility <= Accessibility.Private || MethodKind == MethodKind.ExplicitInterfaceImplementation)
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
402if (DeclaredAccessibility != Accessibility.Private && IsInterface)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
823else if (this.DeclaredAccessibility == Accessibility.Private && (IsVirtual || (IsAbstract && !isExplicitInterfaceImplementationInInterface) || IsOverride))
Symbols\Source\SourcePropertySymbolBase.cs (2)
1063if (this.DeclaredAccessibility == Accessibility.Private && (IsVirtual || (IsAbstract && !isExplicitInterfaceImplementationInInterface) || IsOverride)) 1152if (accessor.LocalAccessibility == Accessibility.Private)
Symbols\Symbol.cs (1)
257case Accessibility.Private:
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListEnumeratorTypeSymbol.cs (1)
132public override Accessibility DeclaredAccessibility => Accessibility.Private;
Symbols\Synthesized\ReadOnlyListType\SynthesizedReadOnlyListProperty.cs (1)
55public override Accessibility DeclaredAccessibility => Accessibility.Private;
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
36public override Accessibility DeclaredAccessibility => ContainingType.IsSealed ? Accessibility.Private : Accessibility.Protected;
Symbols\Synthesized\SynthesizedContainer.cs (1)
150public override Accessibility DeclaredAccessibility => Accessibility.Private;
Symbols\Synthesized\SynthesizedEntryPointSymbol.cs (1)
99get { return Accessibility.Private; }
Symbols\Synthesized\SynthesizedImplementationMethod.cs (1)
148get { return Accessibility.Private; }
Symbols\Synthesized\SynthesizedSealedPropertyAccessor.cs (1)
88return Accessibility.Private;
Symbols\Synthesized\SynthesizedStaticConstructor.cs (1)
100return Accessibility.Private;
Symbols\TypeSymbolExtensions.cs (6)
1020if ((acc2 == Accessibility.Private || acc2 == Accessibility.Internal || acc2 == Accessibility.ProtectedAndInternal) && s2.ContainingAssembly.HasInternalAccessTo(s1.ContainingAssembly)) 1032if ((acc2 == Accessibility.Private || acc2 == Accessibility.Internal || acc2 == Accessibility.ProtectedAndInternal) && s2.ContainingAssembly.HasInternalAccessTo(s1.ContainingAssembly)) 1048else if (acc2 == Accessibility.Private) 1085case Accessibility.Private: 1149case Accessibility.Private: 1150if (acc2 == Accessibility.Private)
Syntax\SyntaxFacts.cs (1)
364case Accessibility.Private:
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
74if (accessibility != Accessibility.Private)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
531if (member.DeclaredAccessibility == Accessibility.Private &&
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
95DeclaredAccessibility: Accessibility.Private,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (3)
190return Accessibility.Private; 315return Accessibility.Private; 334if (symbol.DeclaredAccessibility is Accessibility.Private or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
116(SyntaxKind.PrivateKeyword, _) => Accessibility.Private, 121(SyntaxKind.ProtectedKeyword, Accessibility.Private) => Accessibility.ProtectedAndInternal,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
127AddAccessibilityModifiers(constructor.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
55case Accessibility.Private:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
219AddAccessibilityModifiers(@event.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\FieldGenerator.cs (1)
126AddAccessibilityModifiers(field.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
285AddAccessibilityModifiers(method.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
277: Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
371AddAccessibilityModifiers(property.DeclaredAccessibility, tokens, info, Accessibility.Private);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (12)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (12)
234[InlineData("class [|c2|] { }", "class C2 { }", TypeKind.Class, Accessibility.Private)] 235[InlineData("struct [|c2|] { }", "struct C2 { }", TypeKind.Struct, Accessibility.Private)] 236[InlineData("interface [|c2|] { }", "interface C2 { }", TypeKind.Interface, Accessibility.Private)] 237[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)] 238[InlineData("enum [|c2|] { }", "enum C2 { }", TypeKind.Enum, Accessibility.Private)] 239[InlineData("class M<[|t|]> {}", "class M<T> {}", SymbolKind.TypeParameter, Accessibility.Private)] 240[InlineData("void M<[|t|]>() {}", "void M<T>() {}", SymbolKind.TypeParameter, Accessibility.Private)] 241[InlineData("int [|m|] { get; }", "int M { get; }", SymbolKind.Property, Accessibility.Private)] 242[InlineData("void [|m|]() {}", "void M() {}", MethodKind.Ordinary, Accessibility.Private)] 244[InlineData("int [|m|];", "int M;", SymbolKind.Field, Accessibility.Private)] 245[InlineData("event System.EventHandler [|m|];", "event System.EventHandler M;", SymbolKind.Event, Accessibility.Private)] 246[InlineData("void Outer(int [|m|]) {}", "void Outer(int M) {}", SymbolKind.Parameter, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
359accessibility: Accessibility.Private,
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
178Accessibility.Private,
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (9)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (2)
92await VerifyAccessibility(markup, Accessibility.Private); 108await VerifyAccessibility(markup, Accessibility.Private);
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (7)
59Accessibility.Private, 126new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal }, 233Assert.Contains(Accessibility.Private, symbolSpec.ApplicableAccessibilityList); 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 })]
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (19)
CodeGen\CodeGenDeconstructTests.cs (1)
3616Assert.Equal(Accessibility.Private, field.DeclaredAccessibility);
CodeGen\CodeGenDynamicTests.cs (1)
592Assert.Equal(Accessibility.Private, container.DeclaredAccessibility);
CodeGen\EventTests.cs (1)
233Assert.Equal(Accessibility.Private, associatedField.DeclaredAccessibility);
CodeGen\IndexerTests.cs (1)
158Assert.Equal(Accessibility.Private, indexer.DeclaredAccessibility);
Emit\EmitMetadataTests.cs (15)
519Assert.Equal(Accessibility.Private, classG.DeclaredAccessibility); 520Assert.Equal(Accessibility.Private, classK.DeclaredAccessibility); 571Assert.Equal(Accessibility.Private, f5.DeclaredAccessibility); 572Assert.Equal(Accessibility.Private, f6.DeclaredAccessibility); 624Assert.Equal(Accessibility.Private, cctor.DeclaredAccessibility); 666CheckConstantField(type, "I", Accessibility.Private, SpecialType.System_Int32, -1); 867var privateOrNotApplicable = isFromSource ? Accessibility.Private : Accessibility.NotApplicable; 883CheckPropertyAccessibility(p5, Accessibility.Private, Accessibility.NotApplicable, Accessibility.Private); 884CheckPropertyAccessibility(p6, Accessibility.Private, Accessibility.Private, Accessibility.NotApplicable); 1088CheckPropertyAccessibility(propertyP, Accessibility.Public, Accessibility.Public, Accessibility.Private); 1160CheckPropertyAccessibility(ip, Accessibility.Private, Accessibility.Private, Accessibility.Private);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Semantics\RecordTests.cs (7)
5240Assert.Equal(Accessibility.Private, print.DeclaredAccessibility); 5424Assert.Equal(Accessibility.Private, print.DeclaredAccessibility); 13388Assert.True(copyCtor.DeclaredAccessibility == Accessibility.Private); 18167Assert.Equal(Accessibility.Private, copyCtor.DeclaredAccessibility); 19104Assert.Equal(modifiers == "sealed " ? Accessibility.Private : Accessibility.Protected, equalityContract.DeclaredAccessibility); 19114Assert.Equal(modifiers == "sealed " ? Accessibility.Private : Accessibility.Protected, equalityContractGet!.DeclaredAccessibility); 20036Assert.Equal(Accessibility.Private, equalityContract.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Features (18)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
120accessibility: Accessibility.Private,
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (2)
598return Accessibility.Private; 643case Accessibility.Private:
Completion\CompletionProviders\OverrideCompletionProvider.cs (2)
153Accessibility.NotApplicable => Accessibility.Private, 175Accessibility.Private => Accessibility.ProtectedAndInternal,
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
42Accessibility.Private,
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
83Accessibility.Private,
EncapsulateField\CSharpEncapsulateFieldService.cs (2)
97Accessibility.Private, 159if (field.DeclaredAccessibility == Accessibility.Private || IsNew(field))
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
102accessibility: Accessibility.Private,
InitializeParameter\CSharpInitializeMemberFromParameterCodeRefactoringProvider.cs (2)
49=> Accessibility.Private; 53=> Accessibility.Private;
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (2)
219: Accessibility.Private; 223if (rule.SymbolSpecification.AppliesTo(SymbolKind.Field, Accessibility.Private))
Snippets\CSharpPropgSnippetProvider.cs (1)
44return (AccessorDeclarationSyntax)generator.SetAccessorDeclaration(Accessibility.Private);
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
74if (accessibility != Accessibility.Private)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
531if (member.DeclaredAccessibility == Accessibility.Private &&
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
95DeclaredAccessibility: Accessibility.Private,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (12)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (12)
234[InlineData("class [|c2|] { }", "class C2 { }", TypeKind.Class, Accessibility.Private)] 235[InlineData("struct [|c2|] { }", "struct C2 { }", TypeKind.Struct, Accessibility.Private)] 236[InlineData("interface [|c2|] { }", "interface C2 { }", TypeKind.Interface, Accessibility.Private)] 237[InlineData("delegate void [|c2|]();", "delegate void C2();", TypeKind.Delegate, Accessibility.Private)] 238[InlineData("enum [|c2|] { }", "enum C2 { }", TypeKind.Enum, Accessibility.Private)] 239[InlineData("class M<[|t|]> {}", "class M<T> {}", SymbolKind.TypeParameter, Accessibility.Private)] 240[InlineData("void M<[|t|]>() {}", "void M<T>() {}", SymbolKind.TypeParameter, Accessibility.Private)] 241[InlineData("int [|m|] { get; }", "int M { get; }", SymbolKind.Property, Accessibility.Private)] 242[InlineData("void [|m|]() {}", "void M() {}", MethodKind.Ordinary, Accessibility.Private)] 244[InlineData("int [|m|];", "int M;", SymbolKind.Field, Accessibility.Private)] 245[InlineData("event System.EventHandler [|m|];", "event System.EventHandler M;", SymbolKind.Event, Accessibility.Private)] 246[InlineData("void Outer(int [|m|]) {}", "void Outer(int M) {}", SymbolKind.Parameter, Accessibility.Private)]
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (10)
Semantics\AccessCheckTests.cs (1)
910Assert.Equal(Accessibility.Private, Private.DeclaredAccessibility);
Semantics\RecordStructTests.cs (2)
5142Assert.Equal(Accessibility.Private, print.DeclaredAccessibility); 5346Assert.Equal(Accessibility.Private, print.DeclaredAccessibility);
Semantics\TopLevelStatementsTests.cs (7)
9058Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility); 9113Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility); 9155Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility); 9177Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility); 9199Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility); 9228Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility); 9322Assert.Equal(Accessibility.Private, entryPoint.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (138)
Symbols\DefaultInterfaceImplementationTests.cs (102)
8491Assert.Equal(Accessibility.Private, m05.DeclaredAccessibility); 8886foreach (var tuple in new[] { (name: "M1", access: Accessibility.Public), (name: "M2", access: Accessibility.Internal), (name: "M3", access: Accessibility.Private) }) 9065Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 9123Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 9136Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 9149Assert.Equal(Accessibility.Private, m3.DeclaredAccessibility); 10437Assert.Equal(Accessibility.Private, m4.DeclaredAccessibility); 10755Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 11076Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 11090Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 11107Assert.Equal(Accessibility.Private, m2Impl.DeclaredAccessibility); 11183Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 11197Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 11214Assert.Equal(Accessibility.Private, m2Impl.DeclaredAccessibility); 13214Assert.Equal(Accessibility.Private, p05.DeclaredAccessibility); 13224Assert.Equal(Accessibility.Private, p05set.DeclaredAccessibility); 13466ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 13500Assert.Equal(Accessibility.Private, p17get.DeclaredAccessibility); 14278(name: "P3", access: Accessibility.Private), 14642Assert.Equal(Accessibility.Private, p1.DeclaredAccessibility); 14674Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 14746Assert.Equal(Accessibility.Private, p1.DeclaredAccessibility); 14757Assert.Equal(Accessibility.Private, p1get.DeclaredAccessibility); 14769Assert.Equal(Accessibility.Private, p2.DeclaredAccessibility); 14780Assert.Equal(Accessibility.Private, p2get.DeclaredAccessibility); 14791Assert.Equal(Accessibility.Private, p3.DeclaredAccessibility); 14806Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 14819Assert.Equal(Accessibility.Private, p4.DeclaredAccessibility); 14830Assert.Equal(Accessibility.Private, p4get.DeclaredAccessibility); 16875Assert.Equal(Accessibility.Private, p4.DeclaredAccessibility); 16887Assert.Equal(Accessibility.Private, p4get.DeclaredAccessibility); 17113Assert.Equal(Accessibility.Private, p4.DeclaredAccessibility); 17129Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 17313Assert.Equal(Accessibility.Private, p2.DeclaredAccessibility); 17325Assert.Equal(Accessibility.Private, p2get.DeclaredAccessibility); 17784Assert.Equal(accessor.DeclaredAccessibility != Accessibility.Private, accessor.IsVirtual); 17785Assert.Equal(accessor.DeclaredAccessibility != Accessibility.Private, accessor.IsMetadataVirtual()); 17792Assert.Same(accessor.DeclaredAccessibility == Accessibility.Private ? null : accessor, test1.FindImplementationForInterfaceMember(accessor)); 18295ValidateProperty23(GetSingleProperty(im, "I3"), false, Accessibility.Private, Accessibility.Public, m.GlobalNamespace.GetTypeMember("Test3")); 18296ValidateProperty23(GetSingleProperty(im, "I4"), false, Accessibility.Public, Accessibility.Private, m.GlobalNamespace.GetTypeMember("Test4")); 18297ValidateProperty23(GetSingleProperty(im, "I5"), false, Accessibility.Private, Accessibility.Public, m.GlobalNamespace.GetTypeMember("Test5")); 18298ValidateProperty23(GetSingleProperty(im, "I6"), false, Accessibility.Public, Accessibility.Private, m.GlobalNamespace.GetTypeMember("Test6")); 18321ValidateProperty23(GetSingleProperty(compilation2, "I3"), false, Accessibility.Private, Accessibility.Public); 18322ValidateProperty23(GetSingleProperty(compilation2, "I4"), false, Accessibility.Public, Accessibility.Private); 18323ValidateProperty23(GetSingleProperty(compilation2, "I5"), false, Accessibility.Private, Accessibility.Public); 18324ValidateProperty23(GetSingleProperty(compilation2, "I6"), false, Accessibility.Public, Accessibility.Private); 18375Assert.Equal(Accessibility.Private, access); 18381Assert.NotEqual(isAbstract || access == Accessibility.Private, m1.IsVirtual); 18382Assert.Equal(isAbstract || access != Accessibility.Private, m1.IsMetadataVirtual()); 18392Assert.Same(access != Accessibility.Private ? implementingMethod : null, test1.FindImplementationForInterfaceMember(m1)); 21691Assert.Equal(Accessibility.Private, p05.DeclaredAccessibility); 21701Assert.Equal(Accessibility.Private, p05set.DeclaredAccessibility); 21943ValidateP16Accessor(p16.GetMethod, Accessibility.Private); 21977Assert.Equal(Accessibility.Private, p17get.DeclaredAccessibility); 26936Assert.Equal(Accessibility.Private, p05.DeclaredAccessibility); 26946Assert.Equal(Accessibility.Private, p05set.DeclaredAccessibility); 27809(name: "P3", access: Accessibility.Private)}) 28148Assert.Equal(Accessibility.Private, p1.DeclaredAccessibility); 28164Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 28244Assert.Equal(Accessibility.Private, p1.DeclaredAccessibility); 28259Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 28271Assert.Equal(Accessibility.Private, p2.DeclaredAccessibility); 28286Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 28298Assert.Equal(Accessibility.Private, p3.DeclaredAccessibility); 28313Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 28325Assert.Equal(Accessibility.Private, p4.DeclaredAccessibility); 28340Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 30214Assert.Equal(Accessibility.Private, p4.DeclaredAccessibility); 30230Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 30544Assert.Equal(Accessibility.Private, p4.DeclaredAccessibility); 30560Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 30706Assert.Equal(Accessibility.Private, p2.DeclaredAccessibility); 30722Assert.Equal(Accessibility.Private, accessor.DeclaredAccessibility); 32336ValidateNestedTypes_01(source1, Accessibility.Private); 33072Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 33909Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 34025Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 36895Assert.Equal(Accessibility.Private, method.DeclaredAccessibility); 37091Assert.Same(interfaceAccessor.DeclaredAccessibility == Accessibility.Private ? null : accessor, implementingType.FindImplementationForInterfaceMember(interfaceAccessor)); 37127Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 38019Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 40160Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 43810Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 43950Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 44080Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 44669Assert.Equal(Accessibility.Private, cctor.DeclaredAccessibility); 44767Assert.Equal(Accessibility.Private, cctor.DeclaredAccessibility); 45077Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 45233Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 45369Assert.Equal(Accessibility.Private, f1.SetMethod.DeclaredAccessibility); 45370Assert.Equal(Accessibility.Private, f2.SetMethod.DeclaredAccessibility); 45371Assert.Equal(Accessibility.Private, f3.SetMethod.DeclaredAccessibility); 45561Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 45701Assert.Equal(Accessibility.Private, f4.DeclaredAccessibility); 51122Assert.Equal(Accessibility.Private, m.DeclaredAccessibility); 52045Assert.Equal(Accessibility.Private, i2m1.DeclaredAccessibility); 52168Assert.Equal(Accessibility.Private, i2m1.DeclaredAccessibility); 52563Assert.Equal(Accessibility.Private, reabstracting.DeclaredAccessibility); 53745Assert.Equal(Accessibility.Private, i2p1.DeclaredAccessibility); 53761Assert.Equal(Accessibility.Private, i2p1Get.DeclaredAccessibility); 53778Assert.Equal(Accessibility.Private, i2p1Set.DeclaredAccessibility); 57527Assert.Equal(Accessibility.Private, reabstracting.DeclaredAccessibility);
Symbols\IndexerTests.cs (1)
2717var privateIndexer = indexers.Single(indexer => indexer.DeclaredAccessibility == Accessibility.Private);
Symbols\PartialPropertiesTests.cs (2)
1457Assert.Equal(Accessibility.Private, p1Def.DeclaredAccessibility); 1460Assert.Equal(Accessibility.Private, p1DefPublic.DeclaredAccessibility);
Symbols\Source\BaseClassTests.cs (1)
1259Assert.Equal(Accessibility.Private, d.DeclaredAccessibility);
Symbols\Source\EventTests.cs (4)
102Assert.Equal(Accessibility.Private, associatedField.DeclaredAccessibility); 140Assert.Equal(Accessibility.Private, associatedField.DeclaredAccessibility); 196Assert.Equal(Accessibility.Private, @event.DeclaredAccessibility); 1868Assert.Equal(Accessibility.Private, event1.AddMethod.DeclaredAccessibility);
Symbols\Source\ExpressionBodiedPropertyTests.cs (2)
471Assert.Equal(Accessibility.Private, p.DeclaredAccessibility); 472Assert.Equal(Accessibility.Private, indexer.DeclaredAccessibility);
Symbols\Source\FieldTests.cs (2)
67Assert.Equal(Accessibility.Private, sym.DeclaredAccessibility); 94Assert.Equal(Accessibility.Private, f.DeclaredAccessibility);
Symbols\Source\FileModifierTests.cs (1)
99Assert.Equal(Accessibility.Private, classC.DeclaredAccessibility);
Symbols\Source\MethodTests.cs (13)
44Assert.Equal(Accessibility.Private, m.DeclaredAccessibility); 126Assert.Equal(Accessibility.Private, m.DeclaredAccessibility); 150Assert.Equal(Accessibility.Private, m.DeclaredAccessibility); 171Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 1187Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 1193Assert.Equal(Accessibility.Private, m3.DeclaredAccessibility); 1198Assert.Equal(Accessibility.Private, m4.DeclaredAccessibility); 1224Assert.Equal(Accessibility.Private, mm.DeclaredAccessibility); 1229Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 1281Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility); 1287Assert.Equal(Accessibility.Private, m3.DeclaredAccessibility); 1905Assert.Equal(Accessibility.Private, staticConstructor.DeclaredAccessibility); 1929Assert.Equal(Accessibility.Private, staticConstructor.DeclaredAccessibility);
Symbols\Source\ModifierTests.cs (4)
51Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 68Assert.Equal(Accessibility.Private, m6.DeclaredAccessibility); 114Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility); 124Assert.Equal(Accessibility.Private, m6.DeclaredAccessibility);
Symbols\StaticAbstractMembersInInterfacesTests.cs (3)
22048Assert.Equal(Accessibility.Private, c1.GetMembers().OfType<MethodSymbol>().Where(m => !m.IsConstructor()).Single().DeclaredAccessibility); 22198Assert.Equal(Accessibility.Private, c1.GetMembers().OfType<MethodSymbol>().Where(m => !m.IsConstructor()).Single().DeclaredAccessibility); 29860Assert.Equal(Accessibility.Private, c1.GetMembers().OfType<MethodSymbol>().Where(m => !m.IsConstructor()).Single().DeclaredAccessibility);
Symbols\TypeTests.cs (3)
284Assert.Equal(Accessibility.Private, type3.DeclaredAccessibility); 302Assert.Equal(Accessibility.Private, type3.DeclaredAccessibility); 307Assert.Equal(Accessibility.Private, type4.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Parsing\ReadOnlyStructs.cs (3)
47Assert.Equal(Accessibility.Private, s1.DeclaredAccessibility); 121Assert.Equal(Accessibility.Private, s1.DeclaredAccessibility); 156Assert.Equal(Accessibility.Private, s1.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Workspaces (17)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
1678case Accessibility.Private:
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (4)
194Accessibility.Private, 605case SyntaxKind.PrivateKeyword: return Accessibility.Private; 624return Accessibility.Private; 631return Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (3)
190return Accessibility.Private; 315return Accessibility.Private; 334if (symbol.DeclaredAccessibility is Accessibility.Private or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
116(SyntaxKind.PrivateKeyword, _) => Accessibility.Private, 121(SyntaxKind.ProtectedKeyword, Accessibility.Private) => Accessibility.ProtectedAndInternal,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
127AddAccessibilityModifiers(constructor.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
55case Accessibility.Private:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
219AddAccessibilityModifiers(@event.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\FieldGenerator.cs (1)
126AddAccessibilityModifiers(field.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
285AddAccessibilityModifiers(method.DeclaredAccessibility, tokens, info, Accessibility.Private);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
277: Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
371AddAccessibilityModifiers(property.DeclaredAccessibility, tokens, info, Accessibility.Private);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (42)
CodeGeneration\SyntaxGeneratorTests.cs (42)
1177Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract), 1189Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract), 1474Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract), 1498Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"), accessibility: Accessibility.Private, modifiers: DeclarationModifiers.Abstract), 2967Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ClassDeclaration("c", accessibility: Accessibility.Internal), Accessibility.Private))); 2968Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.StructDeclaration("s", accessibility: Accessibility.Internal), Accessibility.Private))); 2969Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumDeclaration("i", accessibility: Accessibility.Internal), Accessibility.Private))); 2970Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumDeclaration("e", accessibility: Accessibility.Internal), Accessibility.Private))); 2971Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.DelegateDeclaration("d", accessibility: Accessibility.Internal), Accessibility.Private))); 2972Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.MethodDeclaration("m", accessibility: Accessibility.Internal), Accessibility.Private))); 2973Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ConstructorDeclaration(accessibility: Accessibility.Internal), Accessibility.Private))); 2974Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ParameterDeclaration("p"), Accessibility.Private))); 2975Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Internal), Accessibility.Private))); 2976Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration([Generator.ParameterDeclaration("i")], Generator.IdentifierName("t"), accessibility: Accessibility.Internal), Accessibility.Private))); 2977Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility: Accessibility.Internal), Accessibility.Private))); 2978Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumMember("v"), Accessibility.Private))); 2979Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility: Accessibility.Internal), Accessibility.Private))); 2980Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility: Accessibility.Internal), Accessibility.Private))); 2981Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private))); 2982Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceImportDeclaration("u"), Accessibility.Private))); 2983Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Accessibility.Private))); 2984Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.Attribute("a"), Accessibility.Private))); 2985Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(TypeParameter("tp"), Accessibility.Private))); 2986Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(AccessorDeclaration(SyntaxKind.InitAccessorDeclaration), Accessibility.Private))); 3375Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(setAccessor, Accessibility.Private))); 3829var xPrivate = Generator.WithAccessibility(declX, Accessibility.Private); 3832Assert.Equal(Accessibility.Private, Generator.GetAccessibility(xPrivate)); 3919Generator.ReplaceNode(declC, declX, Generator.WithAccessibility(declX, Accessibility.Private)),
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.CSharp.cs (2)
68accessibility: Accessibility.Private, 289accessibility: Accessibility.Private,
CodeGeneration\CodeGenerationTests.VisualBasic.cs (1)
61accessibility: Accessibility.Private,
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
DkmUtilities.cs (1)
316case Accessibility.Private:
Microsoft.CodeAnalysis.Features (44)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
166accessibility: Accessibility.Private,
Common\GlyphExtensions.cs (14)
56Accessibility.Private => Glyph.ClassPrivate, 64Accessibility.Private => Glyph.ConstantPrivate, 72Accessibility.Private => Glyph.DelegatePrivate, 80Accessibility.Private => Glyph.EnumPrivate, 88Accessibility.Private => Glyph.EnumMemberPrivate, 99Accessibility.Private => Glyph.EventPrivate, 107Accessibility.Private => Glyph.ExtensionMethodPrivate, 115Accessibility.Private => Glyph.FieldPrivate, 123Accessibility.Private => Glyph.InterfacePrivate, 149Accessibility.Private => Glyph.MethodPrivate, 157Accessibility.Private => Glyph.ModulePrivate, 174Accessibility.Private => Glyph.PropertyPrivate, 191Accessibility.Private => Glyph.StructurePrivate, 224return Accessibility.Private;
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (2)
138Accessibility.Private => declaredAccessibility is Accessibility.Private or Accessibility.ProtectedAndInternal,
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
103default, Accessibility.Private,
EncapsulateField\AbstractEncapsulateFieldService.cs (2)
196var markFieldPrivate = field.DeclaredAccessibility != Accessibility.Private; 367if (accessibility is Accessibility.NotApplicable or Accessibility.Private)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (2)
128if (symbol.DeclaredAccessibility == Accessibility.Private) 155if (symbol.DeclaredAccessibility == Accessibility.Private)
GenerateType\AbstractGenerateTypeService.cs (1)
256return Accessibility.Private;
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
609var fieldNamingRule = await _semanticDocument.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, _cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (3)
286if (rule.SymbolSpecification.AppliesTo(SymbolKind.Field, Accessibility.Private)) 290var accessibilityLevel = Accessibility.Private; 294if (defaultAccessibility == Accessibility.Private)
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
113if (calleeMethodSymbol.DeclaredAccessibility != Accessibility.Private)
NavigateTo\RoslynNavigateToItem.cs (1)
319case Accessibility.Private:
Shared\Extensions\ISymbolExtensions_2.cs (1)
165case Accessibility.Private:
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (1)
164DeclaredAccessibility: Accessibility.Private,
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
739if (memberSymbol.DeclaredAccessibility == Accessibility.Private &&
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (3)
135DeclaredAccessibility: Accessibility.Private, 399if (getterField.DeclaredAccessibility != Accessibility.Private) 569if (result.Property.DeclaredAccessibility != Accessibility.Private &&
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
184DeclaredAccessibility: Accessibility.Private,
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
81var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
240return isAbstract ? Accessibility.Protected : Accessibility.Private;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
142return Accessibility.Private;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
293: Accessibility.Private;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
141? Accessibility.Private 240SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 247: Accessibility.Private;
src\Analyzers\Core\CodeFixes\MakeFieldReadonly\AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
88Accessibility.Private,
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
630.Replace(nameof(Accessibility.Private), string.Empty)
Microsoft.CodeAnalysis.VisualBasic (73)
Analysis\FlowAnalysis\DataFlowPass.vb (1)
826If field.DeclaredAccessibility <> Accessibility.Private Then
Binding\Binder_Utils.vb (3)
235access = Accessibility.Private 240If access = Accessibility.Private Then 1553AccessibilityPrivate = CUShort(Accessibility.Private)
Compilation\ClsComplianceChecker.vb (1)
823Case Accessibility.Private, Accessibility.ProtectedAndFriend, Accessibility.Friend
Declarations\DeclarationModifiersExtensions.vb (1)
12Case DeclarationModifiers.Private : Return Accessibility.Private
Emit\PEModuleBuilder.vb (1)
560If entry.type.DeclaredAccessibility = Accessibility.Private Then
Errors\ErrorMessageHelpers.vb (1)
17Case Accessibility.Private
Lowering\AsyncRewriter\AsyncRewriter.vb (1)
179Accessibility.Private,
Lowering\IteratorRewriter\IteratorRewriter.vb (7)
157Accessibility.Private, 161Accessibility.Private) 184Accessibility.Private, 269Accessibility.Private, 278Accessibility.Private) 284Accessibility.Private, 297Accessibility.Private)
Lowering\LambdaRewriter\SynthesizedLambdaCacheFieldSymbol.vb (1)
25Optional accessibility As Accessibility = Accessibility.Private,
Lowering\LambdaRewriter\SynthesizedLambdaMethod.vb (1)
32Return If(TypeOf ContainingType Is LambdaFrame, Accessibility.Friend, Accessibility.Private)
Lowering\MethodToClassRewriter\MethodToClassRewriter.MyBaseMyClassWrapper.vb (1)
292Return Accessibility.Private
Lowering\StateMachineRewriter\StateMachineFieldSymbol.vb (3)
27Optional accessibility As Accessibility = Accessibility.Private, 48Optional accessibility As Accessibility = Accessibility.Private, 69Optional accessibility As Accessibility = Accessibility.Private,
Lowering\StateMachineRewriter\SynthesizedContainer.vb (1)
264Return Accessibility.Private
Lowering\SynthesizedSubmissionFields.vb (1)
58_hostObjectField = New SynthesizedFieldSymbol(_declaringSubmissionClass, _declaringSubmissionClass, hostObjectTypeSymbol, "<host-object>", accessibility:=Accessibility.Private, isReadOnly:=True, isShared:=False)
Lowering\SyntheticBoundNodeFactory.vb (3)
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 (12)
185Case Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndFriend 227Case Accessibility.Private 729If memberAccessOutsideAssembly = Accessibility.Private Then 735If typeAccessOutsideAssembly = Accessibility.Private Then 770s_mapAccessToAccessOutsideAssembly(Accessibility.Private) = Accessibility.Private 771s_mapAccessToAccessOutsideAssembly(Accessibility.ProtectedAndFriend) = Accessibility.Private 773s_mapAccessToAccessOutsideAssembly(Accessibility.Friend) = Accessibility.Private 784If effectiveAccess = Accessibility.Private Then 798If effectiveAccess = Accessibility.Private Then 863If membersAccessibilityInAssemblyContext = Accessibility.Private Then 927If GetAccessInAssemblyContext(type, isOutsideAssembly) = Accessibility.Private Then
SymbolDisplay\SymbolDisplayVisitor.vb (1)
352Case Accessibility.Private
Symbols\AccessibilityExtensions.vb (1)
23Case Accessibility.Private
Symbols\Metadata\PE\PEFieldSymbol.vb (3)
110Dim access As Accessibility = Accessibility.Private 124access = Accessibility.Private 133access = Accessibility.Private
Symbols\Metadata\PE\PEMethodSymbol.vb (3)
596Dim access As Accessibility = Accessibility.Private 610access = Accessibility.Private 619access = Accessibility.Private
Symbols\Metadata\PE\PENamedTypeSymbol.vb (2)
341Dim access As Accessibility = Accessibility.Private 354access = Accessibility.Private
Symbols\MethodSymbol.vb (2)
517If Me.DeclaredAccessibility = Accessibility.Private Then 523If type.DeclaredAccessibility = Accessibility.Private Then
Symbols\MissingNamespaceSymbol.vb (1)
127Return Accessibility.Private
Symbols\PEOrSourceOrMergedNamespaceSymbol.vb (3)
42Private _lazyDeclaredAccessibilityOfMostAccessibleDescendantType As Byte = CByte(Accessibility.Private) ' Not calculated yet. 61If _lazyDeclaredAccessibilityOfMostAccessibleDescendantType = Accessibility.Private Then 69parent._lazyDeclaredAccessibilityOfMostAccessibleDescendantType = Accessibility.Private
Symbols\Source\CustomEventAccessorSymbol.vb (1)
57Return Accessibility.Private
Symbols\Source\LambdaSymbol.vb (1)
145Return Accessibility.Private
Symbols\Source\SourceMemberContainerTypeSymbol.vb (2)
27[Private] = CUShort(Accessibility.Private) 1900If implMethod.DeclaredAccessibility <> Accessibility.Private Then
Symbols\Source\SourceMemberFieldSymbol.vb (1)
435If(container.IsValueType, Accessibility.Public, Accessibility.Private),
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (1)
341If member.DeclaredAccessibility <> Accessibility.Private Then
Symbols\Source\SourcePropertySymbol.vb (4)
170((getMethod.LocalAccessibility = Accessibility.Private) OrElse (setMethod.LocalAccessibility = Accessibility.Private)) Then 1038ElseIf [property].IsNotOverridable AndAlso localAccessibility = Accessibility.Private Then 1040ElseIf [property].IsDefault AndAlso localAccessibility = Accessibility.Private Then
Symbols\Source\SourceTypeParameterSymbol.vb (1)
369If (_container.DeclaredAccessibility = Accessibility.Private) AndAlso
Symbols\Source\SynthesizedEntryPointSymbol.vb (1)
125Return Accessibility.Private
Symbols\Source\SynthesizedFieldSymbol.vb (1)
33Optional accessibility As Accessibility = Accessibility.Private,
Symbols\Symbol.vb (1)
97Case Accessibility.Private
Symbols\SynthesizedSymbols\SynthesizedBackingFieldBase.vb (1)
97Return Accessibility.Private
Symbols\SynthesizedSymbols\SynthesizedConstructorBase.vb (1)
79Return Accessibility.Private
Symbols\SynthesizedSymbols\SynthesizedInterfaceImplementationStubSymbol.vb (1)
120Return Accessibility.Private
Syntax\SyntaxFacts.vb (1)
534Case Accessibility.Private
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (5)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiers.vb (1)
77Return accessibility = Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (2)
110Return Accessibility.Private 174Return Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicAccessibilityFacts.vb (2)
200accessibility = Accessibility.Private 211ElseIf accessibility = Accessibility.Private Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (1)
109AddAccessibilityModifiers(field.DeclaredAccessibility, tokens, destination, options, Accessibility.Private)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
172Case Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
38Case Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
382Case Accessibility.Private
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
187accessibility:=Accessibility.Private,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
CodeGen\CodeGenAsyncTests.vb (2)
9227Assert.Equal(Accessibility.Private, method.DeclaredAccessibility) 9255Assert.Equal(Accessibility.Private, type.DeclaredAccessibility)
Emit\EmitMetadata.vb (2)
505Assert.Equal(Accessibility.Private, classG.DeclaredAccessibility) 807Assert.Equal(Accessibility.Private, cctor.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
EncapsulateField\VisualBasicEncapsulateFieldService.vb (1)
108If field.DeclaredAccessibility = Accessibility.Private OrElse IsShadows(field) Then
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
65accessibility:=Accessibility.Private,
InitializeParameter\VisualBasicInitializeMemberFromParameterCodeRefactoringProvider.vb (1)
50Return If(containingType.TypeKind = TypeKind.Class Or containingType.TypeKind = TypeKind.Module, Accessibility.Private, Accessibility.Public)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiers.vb (1)
77Return accessibility = Accessibility.Private
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\TopLevelEditingTests.vb (1)
6580InstanceConstructors.Single(Function(ctor) ctor.DeclaredAccessibility = Accessibility.Private))},
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (25)
Binding\LookupTests.vb (25)
958Assert.Equal(Accessibility.Private, system.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 959Assert.Equal(Accessibility.Private, deployment.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 960Assert.Equal(Accessibility.Private, internal.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 961Assert.Equal(Accessibility.Private, isolation.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 967Assert.Equal(Accessibility.Private, system.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 968Assert.Equal(Accessibility.Private, deployment.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 969Assert.Equal(Accessibility.Private, internal.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 976Assert.Equal(Accessibility.Private, system.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 977Assert.Equal(Accessibility.Private, io.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 978Assert.Equal(Accessibility.Private, isolatedStorage.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1027Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1028Assert.Equal(Accessibility.Private, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1059Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1060Assert.Equal(Accessibility.Private, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1066Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1067Assert.Equal(Accessibility.Private, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1072Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1087Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1088Assert.Equal(Accessibility.Private, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1094Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1095Assert.Equal(Accessibility.Private, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1100Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1116Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1117Assert.Equal(Accessibility.Private, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1122Assert.Equal(Accessibility.Private, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (17)
SymbolsTests\AnonymousTypes\AnonymousTypesEmittedSymbolsTests.vb (1)
690Assert.Equal(Accessibility.Private, field.DeclaredAccessibility)
SymbolsTests\AssemblyAndNamespaceTests.vb (1)
124Assert.Equal(Accessibility.Private, sym2.DeclaredAccessibility)
SymbolsTests\Source\FieldTests.vb (2)
125Assert.Equal(Accessibility.Private, fieldR.DeclaredAccessibility) 215Assert.Equal(Accessibility.Private, fieldC.DeclaredAccessibility)
SymbolsTests\Source\ImplementsTests.vb (1)
3894Assert.Equal(Accessibility.Private, m1_stub.DeclaredAccessibility)
SymbolsTests\Source\MethodTests.vb (4)
317Assert.Equal(Accessibility.Private, m1.DeclaredAccessibility) 337Assert.Equal(Accessibility.Private, m2.DeclaredAccessibility) 1084Assert.Equal(Accessibility.Private, mem.DeclaredAccessibility) 1131Assert.Equal(Accessibility.Private, mem.DeclaredAccessibility)
SymbolsTests\Source\NamespaceGlobalTests.vb (1)
491Assert.Equal(Accessibility.Private, symbolC2(0).DeclaredAccessibility)
SymbolsTests\Source\PropertyTests.vb (5)
740Assert.Equal(field.DeclaredAccessibility, Accessibility.Private) 4512Dim privateOrNotApplicable = If(isFromSource, Accessibility.Private, Accessibility.NotApplicable) 4522CheckPropertyAccessibility(p5, Accessibility.Private, Accessibility.NotApplicable, Accessibility.Private) 8150Assert.Equal(field.DeclaredAccessibility, Accessibility.Private)
SymbolsTests\Source\TypeTests.vb (2)
258Assert.Equal(Accessibility.Private, i1Class.DeclaredAccessibility) 735Assert.Equal(Accessibility.Private, mem1.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (12)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
1061declaration = WithAccessibility(declaration, Accessibility.Private)
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (3)
411Case SyntaxKind.PrivateKeyword : Return Accessibility.Private 429Return Accessibility.Private 434Return Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (2)
110Return Accessibility.Private 174Return Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicAccessibilityFacts.vb (2)
200accessibility = Accessibility.Private 211ElseIf accessibility = Accessibility.Private Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (1)
109AddAccessibilityModifiers(field.DeclaredAccessibility, tokens, destination, options, Accessibility.Private)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
172Case Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
38Case Accessibility.Private
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
382Case Accessibility.Private
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (40)
CodeGeneration\SyntaxGeneratorTests.vb (40)
887Generator.MethodDeclaration("m", accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Partial), 1769Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract), 1781Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.None), 1823Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract), 1830Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Private, modifiers:=DeclarationModifiers.Abstract), 2669Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ClassDeclaration("c", accessibility:=Accessibility.Internal), Accessibility.Private))) 2670Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.StructDeclaration("s", accessibility:=Accessibility.Internal), Accessibility.Private))) 2671Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumDeclaration("i", accessibility:=Accessibility.Internal), Accessibility.Private))) 2672Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumDeclaration("e", accessibility:=Accessibility.Internal), Accessibility.Private))) 2673Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.DelegateDeclaration("d", accessibility:=Accessibility.Internal), Accessibility.Private))) 2674Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.MethodDeclaration("m", accessibility:=Accessibility.Internal), Accessibility.Private))) 2675Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ConstructorDeclaration(accessibility:=Accessibility.Internal), Accessibility.Private))) 2676Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ParameterDeclaration("p"), Accessibility.Private))) 2677Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private))) 2678Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.IndexerDeclaration({Generator.ParameterDeclaration("i")}, Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private))) 2679Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private))) 2680Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumMember("v"), Accessibility.Private))) 2681Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private))) 2682Assert.Equal(Accessibility.Private, Generator.GetAccessibility(Generator.WithAccessibility(Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility:=Accessibility.Internal), Accessibility.Private))) 2683Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private))) 2684Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceImportDeclaration("u"), Accessibility.Private))) 2685Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Accessibility.Private))) 2686Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.Attribute("a"), Accessibility.Private))) 2687Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(SyntaxFactory.TypeParameter("tp"), Accessibility.Private))) 3079Assert.Equal(Accessibility.Private, _g.GetAccessibility(_g.WithAccessibility(setAccessor, Accessibility.Private))) 3520Dim xPrivate = Generator.WithAccessibility(declX, Accessibility.Private) 3523Assert.Equal(Accessibility.Private, Generator.GetAccessibility(xPrivate))
Microsoft.CodeAnalysis.Workspaces (15)
Rename\RenameUtilities.cs (1)
122if (symbol.DeclaredAccessibility != Accessibility.Private)
Shared\Extensions\SyntaxGeneratorExtensions.cs (1)
158if (overriddenProperty.SetMethod is { DeclaredAccessibility: not Accessibility.Private } &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AccessibilityUtilities.cs (3)
11if (accessibility1 == Accessibility.Private || accessibility2 == Accessibility.Private) 13return Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
55case Accessibility.Private: 557return Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (2)
225case Accessibility.Private: 279case Accessibility.Private:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.cs (1)
700hasPrivateField |= fieldSymbol.DeclaredAccessibility == Accessibility.Private;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
228Accessibility.Private, 259builder.Add(Accessibility.Private); 466case Accessibility.Private:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (1)
88Accessibility.Private,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
275accessibility: Accessibility.Private,
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
EditorConfigParsing\NamingStyleParserTests.cs (6)
110accessibility => Assert.Equal(Accessibility.Private, accessibility), 148accessibility => Assert.Equal(Accessibility.Private, accessibility), 232accessibility => Assert.Equal(Accessibility.Private, accessibility), 268accessibility => Assert.Equal(Accessibility.Private, accessibility), 306accessibility => Assert.Equal(Accessibility.Private, accessibility), 342accessibility => Assert.Equal(Accessibility.Private, accessibility),
SyntaxNodeTests.cs (1)
103var cgenField = gen.FieldDeclaration("X", gen.TypeExpression(SpecialType.System_Int32), Accessibility.Private);
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (1)
651if (!onMostDerivedType && fs.DeclaredAccessibility == Accessibility.Private)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
Microsoft.Gen.Logging (3)
Parsing\Parser.cs (1)
662if (!onMostDerivedType && ms.DeclaredAccessibility == Accessibility.Private)
Parsing\Parser.TagProvider.cs (1)
189case Accessibility.Private:
src\Generators\Shared\RoslynExtensions.cs (1)
170case Accessibility.Private:
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
170case Accessibility.Private:
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
Microsoft.Interop.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
Microsoft.VisualStudio.LanguageServices (4)
Library\ObjectBrowser\ObjectList.cs (2)
173case Accessibility.Private: 249case Accessibility.Private:
Progression\GraphBuilder.cs (1)
449case Accessibility.Private:
Progression\IconHelper.cs (1)
24case Accessibility.Private:
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (3)
1035Accessibility.Private => EnvDTE.vsCMAccess.vsCMAccessPrivate, 2993return Accessibility.Private; 3002return Accessibility.Private;
ObjectBrowser\DescriptionBuilder.cs (1)
140case Accessibility.Private:
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
GlyphExtensionsTests.cs (2)
41Accessibility.Private); 45Accessibility.Private,
Microsoft.VisualStudio.LanguageServices.VisualBasic (4)
CodeModel\VisualBasicCodeModelService.vb (2)
1434Case Accessibility.Private 3615Return Accessibility.Private
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
144Case Accessibility.Private
ObjectBrowser\DescriptionBuilder.vb (1)
293Case Accessibility.Private
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
System.Text.RegularExpressions.Generator (2)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
121case Accessibility.Private:
UpgradeToGeneratedRegexCodeFixer.cs (1)
187accessibility: Accessibility.Private);