1190 references to Public
ConfigurationSchemaGenerator (4)
RuntimeSource\Configuration.Binder\ConfigurationBindingGenerator.Parser.cs (2)
610if (candidate.DeclaredAccessibility is not Accessibility.Public) 852type.InstanceConstructors.SingleOrDefault(ctor => ctor.DeclaredAccessibility is Accessibility.Public && ctor.Parameters.Length is 0) is not null;
RuntimeSource\Configuration.Binder\Specs\Members\PropertySpec.cs (2)
14bool setterIsPublic = setMethod?.DeclaredAccessibility is Accessibility.Public; 20CanGet = property.GetMethod?.DeclaredAccessibility is Accessibility.Public;
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (2)
136 if (m is not { DeclaredAccessibility: Accessibility.Public or Accessibility.Protected }) { 140 if (t.DeclaredAccessibility != Accessibility.Public) {
ILLink.RoslynAnalyzer (18)
DataFlow\DynamicallyAccessedMembersBinder.cs (17)
43 foreach (var c in typeDefinition.GetConstructorsOnType (filter: m => (m.DeclaredAccessibility == Accessibility.Public) && m.Parameters.Length == 0)) 128 if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.Public && method.DeclaredAccessibility != Accessibility.Public) 131 if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.NonPublic && method.DeclaredAccessibility == Accessibility.Public) 164 if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.Public && method.DeclaredAccessibility != Accessibility.Public) 167 if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.NonPublic && method.DeclaredAccessibility == Accessibility.Public) 203 if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.Public && field.DeclaredAccessibility != Accessibility.Public) 206 if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.NonPublic && field.DeclaredAccessibility == Accessibility.Public) 227 if (nestedType.DeclaredAccessibility != Accessibility.Public) 232 if (nestedType.DeclaredAccessibility == Accessibility.Public) 268 if ((property.GetMethod == null || (property.GetMethod.DeclaredAccessibility != Accessibility.Public)) 269 && (property.SetMethod == null || (property.SetMethod.DeclaredAccessibility != Accessibility.Public))) 274 if ((property.GetMethod != null) && (property.GetMethod.DeclaredAccessibility == Accessibility.Public)) continue; 275 if ((property.SetMethod != null) && (property.SetMethod.DeclaredAccessibility == Accessibility.Public)) continue; 318 if ((@event.AddMethod == null || (@event.AddMethod.DeclaredAccessibility != Accessibility.Public)) 319 && (@event.RemoveMethod == null || (@event.RemoveMethod.DeclaredAccessibility != Accessibility.Public))) 324 if ((@event.AddMethod != null) && @event.AddMethod.DeclaredAccessibility == Accessibility.Public) continue; 325 if ((@event.RemoveMethod != null) && @event.RemoveMethod.DeclaredAccessibility == Accessibility.Public) continue;
TrimAnalysis\ReflectionAccessAnalyzer.cs (1)
82 foreach (var c in typeSymbol.GetConstructorsOnType (filter: m => (m.DeclaredAccessibility == Accessibility.Public) && m.Parameters.Length == 0))
Microsoft.Analyzers.Extra (1)
MakeExeTypesInternalAnalyzer.cs (1)
94if (type.DeclaredAccessibility == Accessibility.Public && type.ContainingType == null)
Microsoft.AspNetCore.Analyzers (2)
StartupFacts.cs (2)
60if (symbol.DeclaredAccessibility != Accessibility.Public) 98if (symbol.DeclaredAccessibility != Accessibility.Public)
Microsoft.AspNetCore.App.Analyzers (6)
src\Shared\Roslyn\MvcFacts.cs (2)
28if (type.DeclaredAccessibility != Accessibility.Public) 98return method.DeclaredAccessibility == Accessibility.Public;
src\Shared\RoslynUtils\ParsabilityHelper.cs (4)
96return methodSymbol.DeclaredAccessibility == Accessibility.Public && 106return methodSymbol.DeclaredAccessibility == Accessibility.Public && 136return methodSymbol.DeclaredAccessibility == Accessibility.Public && 147return methodSymbol.DeclaredAccessibility == Accessibility.Public &&
Microsoft.AspNetCore.App.SourceGenerators (1)
PublicTopLevelProgramGenerator.cs (1)
26.Select(static (symbol, _) => symbol?.DeclaredAccessibility == Accessibility.Public ? null : symbol)
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentParameterAnalyzer.cs (2)
82if (property.DeclaredAccessibility != Accessibility.Public) 89else if (property.SetMethod?.DeclaredAccessibility != Accessibility.Public)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
ComponentParameterAnalyzer.cs (2)
76if (property.DeclaredAccessibility != Accessibility.Public) 83else if (property.SetMethod?.DeclaredAccessibility != Accessibility.Public)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (6)
src\Shared\RoslynUtils\ParsabilityHelper.cs (4)
96return methodSymbol.DeclaredAccessibility == Accessibility.Public && 106return methodSymbol.DeclaredAccessibility == Accessibility.Public && 136return methodSymbol.DeclaredAccessibility == Accessibility.Public && 147return methodSymbol.DeclaredAccessibility == Accessibility.Public &&
StaticRouteHandlerModel\EndpointParameter.cs (2)
469var constructors = type.Constructors.Where(constructor => constructor.DeclaredAccessibility == Accessibility.Public && !constructor.IsStatic); 473var properties = type.GetMembers().OfType<IPropertySymbol>().Where(property => property.DeclaredAccessibility == Accessibility.Public);
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (1)
72method.DeclaredAccessibility == Accessibility.Public;
src\Shared\Roslyn\MvcFacts.cs (2)
28if (type.DeclaredAccessibility != Accessibility.Public) 98return method.DeclaredAccessibility == Accessibility.Public;
TopLevelParameterNameAnalyzer.cs (1)
110if (member.DeclaredAccessibility != Accessibility.Public ||
Microsoft.AspNetCore.Mvc.Api.Analyzers (4)
src\Shared\Roslyn\MvcFacts.cs (2)
28if (type.DeclaredAccessibility != Accessibility.Public) 98return method.DeclaredAccessibility == Accessibility.Public;
SymbolApiResponseMetadataProvider.cs (2)
111.FirstOrDefault(m => m.Kind == SymbolKind.Method && m.IsStatic && m.DeclaredAccessibility == Accessibility.Public); 125if (!conventionMethod.IsStatic || conventionMethod.DeclaredAccessibility != Accessibility.Public)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (1)
GeneratorHelpers.cs (1)
22case Accessibility.Public:
Microsoft.CodeAnalysis (2)
Symbols\ISymbolExtensions.cs (2)
152if (scopeType is not INamedTypeSymbol { Name: WellKnownMemberNames.LockScopeTypeName, Arity: 0, IsValueType: true, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public } || 183DeclaredAccessibility: Accessibility.Public,
Microsoft.CodeAnalysis.CodeStyle (18)
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
39.FirstOrDefault(m => m.DeclaredAccessibility == Accessibility.Public &&
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
89.FirstOrDefault(m => m.DeclaredAccessibility == Accessibility.Public &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AccessibilityUtilities.cs (1)
36return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (2)
198return type.GetMembers().WhereAsArray(m => m.DeclaredAccessibility == Accessibility.Public && 221return accessor != null && IsImplementable(accessor) && accessor.DeclaredAccessibility != Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
655.Where(x => x.DeclaredAccessibility == Accessibility.Public) 695.Where(x => x.DeclaredAccessibility == Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (2)
221case Accessibility.Public: 275case Accessibility.Public:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (2)
25=> Accessibility.Public; 71return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
226Accessibility.Public, 252builder.Add(Accessibility.Public); 495case Accessibility.Public:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
84if (symbol.DeclaredAccessibility != Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
86Accessibility.Public, 165return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (1)
68(method2 == null || method2.DeclaredAccessibility != Accessibility.Public);
Microsoft.CodeAnalysis.CodeStyle.Fixes (25)
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
56return Accessibility.Public;
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
49if (method.DeclaredAccessibility != Accessibility.Public)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
145case Accessibility.Public:
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
82var propertyNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Property, Accessibility.Public, cancellationToken).ConfigureAwait(false); 596accessibility: Accessibility.Public, 660TypeToGenerateIn.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
60case Accessibility.Public:
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.AbstractCodeAction.cs (3)
87return Accessibility.Public; 91if (classType.IsAbstractClass() && baseConstructor.DeclaredAccessibility == Accessibility.Public) 100return Accessibility.Public;
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
42accessibility: Accessibility.Public,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
271return Accessibility.Public;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
138return Accessibility.Public; 171return Accessibility.Public;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
93var accessibility = Accessibility.Public;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
292? Accessibility.Public
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
225accessibility: Explicitly ? Accessibility.NotApplicable : Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (2)
234accessibility: Accessibility.Public, 476accessibility: Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
297accessibility: Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
53accessibility: Accessibility.Public, 445method.DeclaredAccessibility == Accessibility.Public &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
207method.DeclaredAccessibility == Accessibility.Public &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
133.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnType: var returnType, Parameters.Length: 0 } && 149.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnsVoid: true, Parameters.Length: 0 }) is IMethodSymbol disposeMethodFromPattern)
Microsoft.CodeAnalysis.CSharp (65)
Binder\Binder_Attributes.cs (3)
621invalidNamedArgument |= (namedArgumentNameSymbol.DeclaredAccessibility != Accessibility.Public); 645getMethod!.DeclaredAccessibility != Accessibility.Public || 646setMethod!.DeclaredAccessibility != Accessibility.Public;
Binder\Binder_Operators.cs (1)
1274if (op.ParameterCount == 1 && op.DeclaredAccessibility == Accessibility.Public)
Binder\ForEachLoopBinder.cs (3)
1445if (result.IsStatic || result.DeclaredAccessibility != Accessibility.Public) 1649if (lookupSymbol.IsStatic || lookupSymbol.DeclaredAccessibility != Accessibility.Public || lookupSymbol.Kind != SymbolKind.Property) 1682moveNextMethodCandidate.Method.IsStatic || moveNextMethodCandidate.Method.DeclaredAccessibility != Accessibility.Public ||
Binder\LockBinder.cs (2)
87if (scopeType is not NamedTypeSymbol { Name: WellKnownMemberNames.LockScopeTypeName, Arity: 0, IsValueType: true, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public } || 121DeclaredAccessibility: Accessibility.Public,
Binder\PatternExplainer.cs (1)
653if (declaredMember is FieldSymbol { IsConst: true, IsStatic: true, DeclaredAccessibility: Accessibility.Public } field &&
Binder\Semantics\AccessCheck.cs (3)
92case Accessibility.Public: 267case Accessibility.Public: 325if (declaredAccessibility == Accessibility.Public)
Compiler\ClsComplianceChecker.cs (1)
1237case Accessibility.Public:
Compiler\DocumentationCommentCompiler.cs (1)
669case Accessibility.Public:
Emitter\Model\AttributeDataAdapter.cs (1)
185if (member.DeclaredAccessibility == Accessibility.Public)
Emitter\Model\PEModuleBuilder.cs (1)
586if (symbol.DeclaredAccessibility != Accessibility.Public)
Emitter\NoPia\EmbeddedType.cs (1)
78return UnderlyingNamedType.AdaptedNamedTypeSymbol.DeclaredAccessibility == Accessibility.Public;
Emitter\NoPia\EmbeddedTypesManager.cs (1)
458(containerKind == TypeKind.Struct && (field.AdaptedFieldSymbol.IsStatic || field.AdaptedFieldSymbol.DeclaredAccessibility != Accessibility.Public)))
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (2)
484if ((method.DeclaredAccessibility == Accessibility.Public) && 512if ((property.DeclaredAccessibility == Accessibility.Public) &&
Lowering\IteratorRewriter\IteratorConstructor.cs (1)
46get { return Accessibility.Public; }
SymbolDisplay\SymbolDisplayVisitor.cs (1)
407case Accessibility.Public:
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.PropertySymbol.cs (1)
181get { return Accessibility.Public; }
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.SynthesizedMethodBase.cs (1)
61get { return Accessibility.Public; }
Symbols\AssemblySymbol.cs (1)
1037return result.DeclaredAccessibility == Accessibility.Public || IsSymbolAccessible(result, this);
Symbols\Attributes\AttributeData.cs (2)
562property.DeclaredAccessibility == Accessibility.Public && property.GetMemberArity() == 0 && 563(object)property.SetMethod != null && property.SetMethod.DeclaredAccessibility == Accessibility.Public)
Symbols\Compilation_WellKnownMembers.cs (1)
296!(member.DeclaredAccessibility == Accessibility.Public || (accessWithinOpt is object && Symbol.IsSymbolAccessible(member, accessWithinOpt))))
Symbols\ConstraintsHelper.cs (1)
1496if (constructor.DeclaredAccessibility != Accessibility.Public)
Symbols\ErrorMethodSymbol.cs (1)
88get { return Accessibility.Public; }
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
219else if (specifierType.DeclaredAccessibility != Accessibility.Public)
Symbols\MemberSymbolExtensions.cs (1)
146return accessor.IsImplementable() && accessor.DeclaredAccessibility != Accessibility.Public;
Symbols\Metadata\PE\MetadataDecoder.cs (1)
378candidate.DeclaredAccessibility != Accessibility.Public)
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
556access = Accessibility.Public;
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
510return Accessibility.Public; 1204if (!this.HasRuntimeSpecialName && this.IsStatic && this.DeclaredAccessibility == Accessibility.Public)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
344this.DeclaredAccessibility == Accessibility.Public) // NB: this.flags was set above. 660access = Accessibility.Public;
Symbols\MetadataOrSourceAssemblySymbol.cs (1)
62if (result is null || result.DeclaredAccessibility != Accessibility.Public)
Symbols\NamespaceSymbol.cs (1)
168return Accessibility.Public;
Symbols\NativeIntegerTypeSymbol.cs (1)
83if (underlyingMember.DeclaredAccessibility != Accessibility.Public)
Symbols\Source\ModifierUtils.cs (2)
531return Accessibility.Public; 540return Accessibility.Public;
Symbols\Source\SourceAssemblySymbol.cs (1)
1895return !obj.IsErrorType() && obj.DeclaredAccessibility == Accessibility.Public;
Symbols\Source\SourceFixedFieldSymbol.cs (1)
233get { return Accessibility.Public; }
Symbols\Source\SourceMemberContainerSymbol.cs (4)
4112if (m.DeclaredAccessibility != Accessibility.Public) 4311if (deconstruct.DeclaredAccessibility != Accessibility.Public) 4365if (!this.IsSealed && (constructor.DeclaredAccessibility != Accessibility.Public && constructor.DeclaredAccessibility != Accessibility.Protected)) 4738if (thisEquals.DeclaredAccessibility != Accessibility.Public)
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (1)
1664case Accessibility.Public:
Symbols\Source\SourceNamespaceSymbol.cs (1)
371if (declaredAccessibility != Accessibility.Public && declaredAccessibility != Accessibility.Internal)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
82else if (this.DeclaredAccessibility != Accessibility.Public || !this.IsStatic)
Symbols\Symbol.cs (1)
254case Accessibility.Public:
Symbols\Synthesized\Records\SynthesizedRecordClone.cs (1)
162DeclaredAccessibility: Accessibility.Public,
Symbols\Synthesized\Records\SynthesizedRecordPrintMembers.cs (1)
326return m.DeclaredAccessibility == Accessibility.Public && !m.IsStatic;
Symbols\Synthesized\SynthesizedDelegateSymbol.cs (1)
229return Accessibility.Public;
Symbols\Synthesized\SynthesizedInstanceConstructor.cs (1)
42get { return ContainingType.IsAbstract ? Accessibility.Protected : Accessibility.Public; }
Symbols\Synthesized\SynthesizedIntrinsicOperatorSymbol.cs (1)
348return Accessibility.Public;
Symbols\TypeSymbol.cs (4)
832bool canBeImplementedImplicitlyInCSharp9 = interfaceMember.DeclaredAccessibility == Accessibility.Public && !interfaceMember.IsEventOrPropertyWithImplementableNonPublicAccessor(); 1726if (member.DeclaredAccessibility != Accessibility.Public || member == implicitImpl) 1991else if (closestMismatch.DeclaredAccessibility != Accessibility.Public) 2235if (candidateMember.DeclaredAccessibility != Accessibility.Public || candidateMember.IsStatic != interfaceMember.IsStatic)
Symbols\TypeSymbolExtensions.cs (1)
1005if (acc1 == Accessibility.Public)
Syntax\SyntaxFacts.cs (1)
374case Accessibility.Public:
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
109if (containingType.DeclaredAccessibility == Accessibility.Public)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
34=> !symbol.IsStatic && symbol.DeclaredAccessibility == Accessibility.Public;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
306else if (primaryConstructor.DeclaredAccessibility != Accessibility.Public)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
65if (lockType is not { DeclaredAccessibility: Accessibility.Public }) 68if (lockType.GetTypeMembers("Scope").FirstOrDefault() is not { TypeKind: TypeKind.Struct, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public })
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
311? Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
113(SyntaxKind.PublicKeyword, _) => Accessibility.Public,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (2)
191if (setAccessor.DeclaredAccessibility != Accessibility.Public && 207if (setAccessor.DeclaredAccessibility != Accessibility.Public &&
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
96SymbolVisibility.Public => accessibility is Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
49case Accessibility.Public:
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (3)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (3)
233[InlineData("} namespace [|c2|] {", "} namespace C2 {", SymbolKind.Namespace, Accessibility.Public)] 257var alternateAccessibility = accessibility == Accessibility.Public ? Accessibility.Protected : Accessibility.Public;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (94)
CodeActions\GenerateType\GenerateTypeTests_Dialog.cs (85)
355accessibility: Accessibility.Public, 550accessibility: Accessibility.Public, 594accessibility: Accessibility.Public, 639accessibility: Accessibility.Public, 684accessibility: Accessibility.Public, 722accessibility: Accessibility.Public, 758accessibility: Accessibility.Public, 797accessibility: Accessibility.Public, 839accessibility: Accessibility.Public, 875accessibility: Accessibility.Public, 918accessibility: Accessibility.Public, 965accessibility: Accessibility.Public, 1014accessibility: Accessibility.Public, 1069accessibility: Accessibility.Public, 1114accessibility: Accessibility.Public, 1163accessibility: Accessibility.Public, 1222accessibility: Accessibility.Public, 1261accessibility: Accessibility.Public, 1306accessibility: Accessibility.Public, 1345accessibility: Accessibility.Public, 1391accessibility: Accessibility.Public, 1431accessibility: Accessibility.Public, 1470accessibility: Accessibility.Public, 1514accessibility: Accessibility.Public, 1552accessibility: Accessibility.Public, 1597accessibility: Accessibility.Public, 1636accessibility: Accessibility.Public, 1681accessibility: Accessibility.Public, 1718accessibility: Accessibility.Public, 1758accessibility: Accessibility.Public, 1803accessibility: Accessibility.Public, 1847accessibility: Accessibility.Public, 1898accessibility: Accessibility.Public, 1935accessibility: Accessibility.Public, 1965accessibility: Accessibility.Public, 1986accessibility: Accessibility.Public, 2008accessibility: Accessibility.Public, 2038accessibility: Accessibility.Public, 2075accessibility: Accessibility.Public, 2113accessibility: Accessibility.Public, 2151accessibility: Accessibility.Public, 2188accessibility: Accessibility.Public, 2218accessibility: Accessibility.Public, 2269accessibility: Accessibility.Public, 2297accessibility: Accessibility.Public, 2332accessibility: Accessibility.Public, 2367accessibility: Accessibility.Public, 2403accessibility: Accessibility.Public, 2438accessibility: Accessibility.Public, 2471accessibility: Accessibility.Public, 2504accessibility: Accessibility.Public, 2537accessibility: Accessibility.Public, 2566accessibility: Accessibility.Public, 2595accessibility: Accessibility.Public, 2625accessibility: Accessibility.Public, 2660accessibility: Accessibility.Public, 2695accessibility: Accessibility.Public, 2728accessibility: Accessibility.Public, 2761accessibility: Accessibility.Public, 2791accessibility: Accessibility.Public, 2820accessibility: Accessibility.Public, 2855accessibility: Accessibility.Public, 2890accessibility: Accessibility.Public, 2923accessibility: Accessibility.Public, 2956accessibility: Accessibility.Public, 2986accessibility: Accessibility.Public, 3015accessibility: Accessibility.Public, 3049accessibility: Accessibility.Public, 3080accessibility: Accessibility.Public, 3110accessibility: Accessibility.Public, 3147accessibility: Accessibility.Public, 3184accessibility: Accessibility.Public, 3227accessibility: Accessibility.Public, 3276accessibility: Accessibility.Public, 3306accessibility: Accessibility.Public, 3335accessibility: Accessibility.Public, 3370accessibility: Accessibility.Public, 3402accessibility: Accessibility.Public, 3427accessibility: Accessibility.Public, 3462accessibility: Accessibility.Public, 3489accessibility: Accessibility.Public, 3530accessibility: Accessibility.Public, 3563accessibility: Accessibility.Public, 3596accessibility: Accessibility.Public, 3635accessibility: Accessibility.Public,
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (2)
59await VerifyAccessibility(markup, Accessibility.Public); 76await VerifyAccessibility(markup, Accessibility.Public);
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (7)
57Accessibility.Public, 126new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal }, 186Accessibility.Public, 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 (31)
BreakingChanges.cs (8)
105Assert.Equal(Accessibility.Public, baseProperty1.DeclaredAccessibility); 106Assert.Equal(Accessibility.Public, baseProperty1.GetMethod.DeclaredAccessibility); 109Assert.Equal(Accessibility.Public, baseProperty2.DeclaredAccessibility); 111Assert.Equal(Accessibility.Public, baseProperty2.SetMethod.DeclaredAccessibility); 117Assert.Equal(Accessibility.Public, derivedProperty1.DeclaredAccessibility); 118Assert.Equal(Accessibility.Public, derivedProperty1.GetMethod.DeclaredAccessibility); 121Assert.Equal(Accessibility.Public, derivedProperty2.DeclaredAccessibility); 123Assert.Equal(Accessibility.Public, derivedProperty2.SetMethod.DeclaredAccessibility);
CodeGen\CodeGenDynamicTests.cs (2)
601Assert.Equal(Accessibility.Public, field.DeclaredAccessibility); 839Assert.Equal(Accessibility.Public, member.DeclaredAccessibility);
CodeGen\EventTests.cs (1)
211Assert.Equal(Accessibility.Public, @event.DeclaredAccessibility);
CodeGen\IndexerTests.cs (1)
260Assert.Equal(Accessibility.Public, indexer.DeclaredAccessibility);
Emit\EmitMetadataTests.cs (19)
443Assert.Equal(Accessibility.Public, classA.DeclaredAccessibility); 510Assert.Equal(Accessibility.Public, classD.DeclaredAccessibility); 562Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 670CheckConstantField(type, "S", Accessibility.Public, SpecialType.System_String, "string"); 869CheckPropertyAccessibility(p1, Accessibility.Public, Accessibility.Public, Accessibility.Public); 873CheckPropertyAccessibility(p7, Accessibility.Public, privateOrNotApplicable, Accessibility.Public); 1088CheckPropertyAccessibility(propertyP, Accessibility.Public, Accessibility.Public, Accessibility.Private); 1094CheckPropertyAccessibility(propertyP, Accessibility.Public, Accessibility.Public, Accessibility.NotApplicable); 1100CheckPropertyAccessibility(propertyQ, Accessibility.Public, Accessibility.Public, Accessibility.Internal); 1115CheckPropertyAccessibility(propertyP, Accessibility.Public, Accessibility.Public, Accessibility.NotApplicable); 1121CheckPropertyAccessibility(propertyQ, Accessibility.Public, Accessibility.NotApplicable, Accessibility.Internal); 1410Assert.Equal(Accessibility.Public, field.DeclaredAccessibility); // Dev10: value__ is public
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (52)
Attributes\AttributeTests_IsByRefLike.cs (2)
46AssertDeclaresType(peModule, WellKnownType.System_Runtime_CompilerServices_IsByRefLikeAttribute, Accessibility.Public); 683AssertDeclaresType(peModule, WellKnownType.System_Runtime_CompilerServices_IsByRefLikeAttribute, Accessibility.Public);
Attributes\AttributeTests_IsUnmanaged.cs (12)
45AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, module.ContainingAssembly.Name); 69AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, module.ContainingAssembly.Name); 99AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, module.ContainingAssembly.Name); 121AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, module.ContainingAssembly.Name); 147AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 173AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 209AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 237AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 264AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 290AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 327AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display); 356AttributeValidation.AssertReferencedIsUnmanagedAttribute(Accessibility.Public, typeParameter, reference.Display);
Attributes\AttributeTests_NullablePublicOnly.cs (1)
602Assert.Equal(publicDefinition ? Accessibility.Public : Accessibility.Internal, type.DeclaredAccessibility);
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
45AssertDeclaresType(peModule, WellKnownType.System_Runtime_CompilerServices_IsReadOnlyAttribute, Accessibility.Public);
Attributes\AttributeTests_RefReadOnly.cs (1)
51AssertDeclaresType(peModule, WellKnownType.System_Runtime_CompilerServices_IsReadOnlyAttribute, Accessibility.Public);
Attributes\AttributeTests_RefSafetyRules.cs (1)
237Assert.Equal(publicDefinition ? Accessibility.Public : Accessibility.Internal, type.DeclaredAccessibility);
Semantics\PrimaryConstructorTests.cs (3)
407Assert.Equal(Accessibility.Public, ctor.DeclaredAccessibility); 614Assert.Equal(Accessibility.Public, ctor.DeclaredAccessibility); 1079Assert.Equal(Accessibility.Public, symbol.ContainingSymbol.DeclaredAccessibility);
Semantics\RecordTests.cs (31)
3435Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 3466Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 3498Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 3525Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 4929Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5004Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5081Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5248Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5432Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5466Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5859Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 14010Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 14047Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 14130Assert.Equal(Accessibility.Public, deconstruct.DeclaredAccessibility); 15658Assert.Equal(Accessibility.Public, deconstruct.DeclaredAccessibility); 18089Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 18198Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 18311Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 18319Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 18327Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 18462Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 18622Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 18661Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 18697Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 20334Assert.Equal(Accessibility.Public, op.DeclaredAccessibility); 20344Assert.Equal(Accessibility.Public, op.DeclaredAccessibility); 20453Assert.Equal(Accessibility.Public, op.DeclaredAccessibility); 20463Assert.Equal(Accessibility.Public, op.DeclaredAccessibility); 21151Assert.Equal(Accessibility.Public, symbol.ContainingSymbol.DeclaredAccessibility); 22654Assert.Equal(Accessibility.Public, clone.DeclaredAccessibility); 23123Assert.Equal(Accessibility.Public, baseEquals.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Features (21)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
600return Accessibility.Public;
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
199=> namespaceSymbol != null && namespaceSymbol.GetTypeMembers(name).Any(static t => t.DeclaredAccessibility == Accessibility.Public);
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (1)
109if (type.DeclaredAccessibility == Accessibility.Public && type.Name.StartsWith(CallConvPrefix))
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
147? Accessibility.Public
GenerateType\CSharpGenerateTypeService.cs (4)
543if (accessibilityConstraint is Accessibility.Public or 553? Accessibility.Public 809accessibility: Accessibility.Public, 823accessibility: Accessibility.Public,
ImplementInterface\CSharpImplementImplicitlyCodeRefactoringProvider.cs (1)
53=> generator.WithAccessibility(WithoutExplicitImpl(decl), Accessibility.Public);
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (3)
246if (rule.SymbolSpecification.AppliesTo(SymbolKind.Property, Accessibility.Public)) 251Accessibility.Public, 260Accessibility.Public,
Snippets\CSharpConstructorSnippetProvider.cs (1)
73accessibility: syntaxContext.PrecedingModifiers.Any() ? Accessibility.NotApplicable : (containingTypeSymbol.IsAbstract ? Accessibility.Protected : Accessibility.Public));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
109if (containingType.DeclaredAccessibility == Accessibility.Public)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\Helpers.cs (1)
34=> !symbol.IsStatic && symbol.DeclaredAccessibility == Accessibility.Public;
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
306else if (primaryConstructor.DeclaredAccessibility != Accessibility.Public)
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
65if (lockType is not { DeclaredAccessibility: Accessibility.Public }) 68if (lockType.GetTypeMembers("Scope").FirstOrDefault() is not { TypeKind: TypeKind.Struct, IsRefLikeType: true, DeclaredAccessibility: Accessibility.Public })
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\PositionalParameterInfo.cs (2)
191if (setAccessor.DeclaredAccessibility != Accessibility.Public && 207if (setAccessor.DeclaredAccessibility != Accessibility.Public &&
src\Analyzers\CSharp\CodeFixes\MakeMemberRequired\CSharpMakeMemberRequiredCodeFixProvider.cs (1)
96SymbolVisibility.Public => accessibility is Accessibility.Public,
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (3)
233[InlineData("} namespace [|c2|] {", "} namespace C2 {", SymbolKind.Namespace, Accessibility.Public)] 257var alternateAccessibility = accessibility == Accessibility.Public ? Accessibility.Protected : Accessibility.Public;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (15)
Semantics\NativeIntegerTests.cs (2)
313if (underlyingMember.DeclaredAccessibility != Accessibility.Public) 427if (underlyingMember.DeclaredAccessibility != Accessibility.Public)
Semantics\OperatorTests.cs (2)
7663Assert.Equal(Accessibility.Public, symbol1.DeclaredAccessibility); 8458Assert.Equal(Accessibility.Public, symbol1.DeclaredAccessibility);
Semantics\RecordStructTests.cs (9)
662Assert.Equal(Accessibility.Public, comp.GlobalNamespace.GetTypeMember("S2").DeclaredAccessibility); 3450Assert.Equal(Accessibility.Public, deconstruct.DeclaredAccessibility); 4339Assert.Equal(Accessibility.Public, recordEquals.DeclaredAccessibility); 4348Assert.Equal(Accessibility.Public, objectEquals.DeclaredAccessibility); 4357Assert.Equal(Accessibility.Public, gethashCode.DeclaredAccessibility); 4906Assert.Equal(Accessibility.Public, op.DeclaredAccessibility); 4916Assert.Equal(Accessibility.Public, op.DeclaredAccessibility); 5150Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility); 5354Assert.Equal(Accessibility.Public, toString.DeclaredAccessibility);
Semantics\TopLevelStatementsTests.cs (2)
9112Assert.Equal(Accessibility.Public, entryPoint.ContainingType.DeclaredAccessibility); 9154Assert.Equal(Accessibility.Public, entryPoint.ContainingType.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (296)
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
1039Assert.Equal(Accessibility.Public, methodDispose.DeclaredAccessibility);
Symbols\AnonymousTypesSymbolTests.cs (2)
1096Assert.Equal(Accessibility.Public, property.DeclaredAccessibility); 1126Assert.Equal(Accessibility.Public, method.DeclaredAccessibility);
Symbols\CheckedUserDefinedOperatorsTests.cs (3)
60Assert.Equal(Accessibility.Public, opSymbol.DeclaredAccessibility); 1277Assert.Equal(Accessibility.Public, opSymbol.DeclaredAccessibility); 2511Assert.Equal(Accessibility.Public, opSymbol.DeclaredAccessibility);
Symbols\CompilationCreationTests.cs (2)
2375Assert.Equal(Accessibility.Public, foo2.DeclaredAccessibility); 2435Assert.Equal(Accessibility.Public, type3.DeclaredAccessibility);
Symbols\DefaultInterfaceImplementationTests.cs (244)
208Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 2024Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 2699Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 2708Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 6419Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 6428Assert.Equal(Accessibility.Public, e1.DeclaredAccessibility); 8443Assert.Equal(Accessibility.Public, m01.DeclaredAccessibility); 8503Assert.Equal(Accessibility.Public, m06.DeclaredAccessibility); 8515Assert.Equal(Accessibility.Public, m07.DeclaredAccessibility); 8527Assert.Equal(Accessibility.Public, m08.DeclaredAccessibility); 8539Assert.Equal(Accessibility.Public, m09.DeclaredAccessibility); 8551Assert.Equal(Accessibility.Public, m10.DeclaredAccessibility); 8563Assert.Equal(Accessibility.Public, m11.DeclaredAccessibility); 8575Assert.Equal(Accessibility.Public, m12.DeclaredAccessibility); 8796Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 8835Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 8886foreach (var tuple in new[] { (name: "M1", access: Accessibility.Public), (name: "M2", access: Accessibility.Internal), (name: "M3", access: Accessibility.Private) }) 8983Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 8996Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 9009Assert.Equal(Accessibility.Public, m3.DeclaredAccessibility); 10152Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 10233Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 10247Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 10261Assert.Equal(Accessibility.Public, m3.DeclaredAccessibility); 10275Assert.Equal(Accessibility.Public, m4.DeclaredAccessibility); 10341Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 10395Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 10409Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 10423Assert.Equal(Accessibility.Public, m3.DeclaredAccessibility); 10451Assert.Equal(Accessibility.Public, m5.DeclaredAccessibility); 10621Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 10635Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 10741Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 10769Assert.Equal(Accessibility.Public, m3.DeclaredAccessibility); 10783Assert.Equal(Accessibility.Public, m4.DeclaredAccessibility); 10797Assert.Equal(Accessibility.Public, m5.DeclaredAccessibility); 10849Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility); 13125Assert.Equal(Accessibility.Public, p01.DeclaredAccessibility); 13139Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 13235Assert.Equal(Accessibility.Public, p06.DeclaredAccessibility); 13245Assert.Equal(Accessibility.Public, p06get.DeclaredAccessibility); 13256Assert.Equal(Accessibility.Public, p07.DeclaredAccessibility); 13266Assert.Equal(Accessibility.Public, p07set.DeclaredAccessibility); 13277Assert.Equal(Accessibility.Public, p08.DeclaredAccessibility); 13287Assert.Equal(Accessibility.Public, p08get.DeclaredAccessibility); 13298Assert.Equal(Accessibility.Public, p09.DeclaredAccessibility); 13308Assert.Equal(Accessibility.Public, p09set.DeclaredAccessibility); 13319Assert.Equal(Accessibility.Public, p10.DeclaredAccessibility); 13329Assert.Equal(Accessibility.Public, p10get.DeclaredAccessibility); 13339Assert.Equal(Accessibility.Public, p11.DeclaredAccessibility); 13353Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 13364Assert.Equal(Accessibility.Public, p12.DeclaredAccessibility); 13378Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 13389Assert.Equal(Accessibility.Public, p13.DeclaredAccessibility); 13391ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 13414Assert.Equal(Accessibility.Public, p14.DeclaredAccessibility); 13417ValidateP14Accessor(p14.SetMethod, Accessibility.Public); 13439Assert.Equal(Accessibility.Public, p15.DeclaredAccessibility); 13441ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 13464Assert.Equal(Accessibility.Public, p16.DeclaredAccessibility); 13467ValidateP16Accessor(p16.SetMethod, Accessibility.Public); 13490Assert.Equal(Accessibility.Public, p17.DeclaredAccessibility); 13531Assert.Equal(Accessibility.Public, p19.DeclaredAccessibility); 13533ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 13925Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 13935Assert.Equal(Accessibility.Public, p1get.DeclaredAccessibility); 14017Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 14033Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 14091Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 14106Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 14276foreach (var tuple in new[] { (name: "P1", access: Accessibility.Public), 14404Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 14415Assert.Equal(Accessibility.Public, p1get.DeclaredAccessibility); 14427Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 14438Assert.Equal(Accessibility.Public, p2set.DeclaredAccessibility); 14450Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 14461Assert.Equal(Accessibility.Public, p3get.DeclaredAccessibility); 16194Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 16226Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 16324Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 16336Assert.Equal(Accessibility.Public, p1get.DeclaredAccessibility); 16350Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 16362Assert.Equal(Accessibility.Public, p2get.DeclaredAccessibility); 16376Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 16388Assert.Equal(Accessibility.Public, p3set.DeclaredAccessibility); 16600Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 16634Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 16790Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 16802Assert.Equal(Accessibility.Public, p1get.DeclaredAccessibility); 16816Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 16828Assert.Equal(Accessibility.Public, p2set.DeclaredAccessibility); 16844Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 16860Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 16900Assert.Equal(Accessibility.Public, p5.DeclaredAccessibility); 16912Assert.Equal(Accessibility.Public, p5set.DeclaredAccessibility); 17033Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 17045Assert.Equal(Accessibility.Public, p1get.DeclaredAccessibility); 17059Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 17071Assert.Equal(Accessibility.Public, p2get.DeclaredAccessibility); 17084Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 17100Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 17143Assert.Equal(Accessibility.Public, p5.DeclaredAccessibility); 17155Assert.Equal(Accessibility.Public, p5get.DeclaredAccessibility); 17282Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 17298Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 17338Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 17354Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 17368Assert.Equal(Accessibility.Public, p4.DeclaredAccessibility); 17384Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 17398Assert.Equal(Accessibility.Public, p5.DeclaredAccessibility); 17410Assert.Equal(Accessibility.Public, p5get.DeclaredAccessibility); 17761Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 17769ValidateAccessor(p1.SetMethod, Accessibility.Public); 17773ValidateAccessor(p1.GetMethod, Accessibility.Public); 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); 18349Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 18436ValidatePropertyModifiers_23(source1, source2, Accessibility.Internal, Accessibility.Public, 19174ValidatePropertyModifiers_23(source1, source2, Accessibility.Public, Accessibility.Internal, 19860ValidateMethod(p1get, Accessibility.Public); 19875Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 19904ValidateMethod(p1get, Accessibility.Public); 20517(name: "P4", access: Accessibility.Public, getAccess: Accessibility.Protected, setAccess: Accessibility.Public), 20518(name: "P5", access: Accessibility.Public, getAccess: Accessibility.Public, setAccess: Accessibility.ProtectedOrInternal), 20519(name: "P6", access: Accessibility.Public, getAccess: Accessibility.ProtectedAndInternal, setAccess: Accessibility.Public)}) 20770ValidatePropertyModifiers_23(source1, source2, Accessibility.Protected, Accessibility.Public, 20817ValidatePropertyModifiers_23(source1, source2, Accessibility.ProtectedOrInternal, Accessibility.Public, 20864ValidatePropertyModifiers_23(source1, source2, Accessibility.Public, Accessibility.ProtectedAndInternal, 21602Assert.Equal(Accessibility.Public, p01.DeclaredAccessibility); 21616Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 21712Assert.Equal(Accessibility.Public, p06.DeclaredAccessibility); 21722Assert.Equal(Accessibility.Public, p06get.DeclaredAccessibility); 21733Assert.Equal(Accessibility.Public, p07.DeclaredAccessibility); 21743Assert.Equal(Accessibility.Public, p07set.DeclaredAccessibility); 21754Assert.Equal(Accessibility.Public, p08.DeclaredAccessibility); 21764Assert.Equal(Accessibility.Public, p08get.DeclaredAccessibility); 21775Assert.Equal(Accessibility.Public, p09.DeclaredAccessibility); 21785Assert.Equal(Accessibility.Public, p09set.DeclaredAccessibility); 21796Assert.Equal(Accessibility.Public, p10.DeclaredAccessibility); 21806Assert.Equal(Accessibility.Public, p10get.DeclaredAccessibility); 21816Assert.Equal(Accessibility.Public, p11.DeclaredAccessibility); 21830Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 21841Assert.Equal(Accessibility.Public, p12.DeclaredAccessibility); 21855Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 21866Assert.Equal(Accessibility.Public, p13.DeclaredAccessibility); 21868ValidateP13Accessor(p13.GetMethod, Accessibility.Public); 21891Assert.Equal(Accessibility.Public, p14.DeclaredAccessibility); 21894ValidateP14Accessor(p14.SetMethod, Accessibility.Public); 21916Assert.Equal(Accessibility.Public, p15.DeclaredAccessibility); 21918ValidateP15Accessor(p15.GetMethod, Accessibility.Public); 21941Assert.Equal(Accessibility.Public, p16.DeclaredAccessibility); 21944ValidateP16Accessor(p16.SetMethod, Accessibility.Public); 21967Assert.Equal(Accessibility.Public, p17.DeclaredAccessibility); 22008Assert.Equal(Accessibility.Public, p19.DeclaredAccessibility); 22010ValidateP13Accessor(p19.GetMethod, Accessibility.Public); 25164ValidatePropertyModifiers_23(source1, source2, Accessibility.Internal, Accessibility.Public, 25827ValidatePropertyModifiers_23(source1, source2, Accessibility.Public, Accessibility.Internal, 26847Assert.Equal(Accessibility.Public, p01.DeclaredAccessibility); 26861Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 26957Assert.Equal(Accessibility.Public, p06.DeclaredAccessibility); 26967Assert.Equal(Accessibility.Public, p06get.DeclaredAccessibility); 26978Assert.Equal(Accessibility.Public, p07.DeclaredAccessibility); 26988Assert.Equal(Accessibility.Public, p07set.DeclaredAccessibility); 26999Assert.Equal(Accessibility.Public, p08.DeclaredAccessibility); 27009Assert.Equal(Accessibility.Public, p08get.DeclaredAccessibility); 27020Assert.Equal(Accessibility.Public, p09.DeclaredAccessibility); 27030Assert.Equal(Accessibility.Public, p09set.DeclaredAccessibility); 27041Assert.Equal(Accessibility.Public, p10.DeclaredAccessibility); 27051Assert.Equal(Accessibility.Public, p10get.DeclaredAccessibility); 27063Assert.Equal(Accessibility.Public, p11.DeclaredAccessibility); 27077Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 27645Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 27661Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 27719Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 27734Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 27807foreach (var tuple in new[] { (name: "P1", access: Accessibility.Public), 27987Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 28002Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 28014Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 28029Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 28041Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 28056Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 29597Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 29613Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 29712Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 29728Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 29742Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 29758Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 29772Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 29788Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30013Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 30047Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30125Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 30141Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30155Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 30171Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30185Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 30201Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30243Assert.Equal(Accessibility.Public, p5.DeclaredAccessibility); 30259Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30455Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 30471Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30485Assert.Equal(Accessibility.Public, p2.DeclaredAccessibility); 30501Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30515Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 30531Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30676Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility); 30692Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30736Assert.Equal(Accessibility.Public, p3.DeclaredAccessibility); 30752Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30766Assert.Equal(Accessibility.Public, p4.DeclaredAccessibility); 30782Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 30795Assert.Equal(Accessibility.Public, p5.DeclaredAccessibility); 30811Assert.Equal(Accessibility.Public, accessor.DeclaredAccessibility); 31748private void ValidateNestedTypes_01(string source1, Accessibility expected = Accessibility.Public, TargetFramework targetFramework = TargetFramework.Standard, bool execute = true, Verification verify = default) 31814Assert.Equal(Accessibility.Public, compilation1.GetMember("I1.T" + i).DeclaredAccessibility); 43748Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 43807Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 43808Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 43947Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 43948Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 44077Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 44078Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 45074Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 45075Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 45230Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 45231Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 45365Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 45366Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 45558Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 45559Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 45698Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility); 45699Assert.Equal(Accessibility.Public, f2.DeclaredAccessibility); 49536Assert.Equal(Accessibility.Public, member.DeclaredAccessibility); 49584Assert.Equal(Accessibility.Public, member.DeclaredAccessibility);
Symbols\IndexerTests.cs (1)
2715var publicIndexer = indexers.Single(indexer => indexer.DeclaredAccessibility == Accessibility.Public);
Symbols\Metadata\MetadataMemberTests.cs (2)
206Assert.Equal(Accessibility.Public, member1.DeclaredAccessibility); 314Assert.Equal(Accessibility.Public, member2.DeclaredAccessibility);
Symbols\Metadata\MetadataTypeTests.cs (4)
46Assert.Equal(Accessibility.Public, ns.DeclaredAccessibility); 140Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility); 188Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility); 238Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility);
Symbols\Metadata\PE\LoadingFields.cs (1)
60Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility);
Symbols\Metadata\PE\LoadingMethods.cs (1)
57Assert.Equal(Accessibility.Public, localM1.DeclaredAccessibility);
Symbols\Metadata\PE\TypeAccessibility.cs (2)
38Assert.Equal(Accessibility.Public, obj.DeclaredAccessibility); 68Assert.Equal(Accessibility.Public, contextForm.DeclaredAccessibility);
Symbols\MissingSpecialMember.cs (1)
500Assert.Equal(Accessibility.Public, wellKnown.DeclaredAccessibility);
Symbols\MockNamedTypeSymbol.cs (1)
184return Accessibility.Public;
Symbols\OverriddenOrHiddenMembersTests.cs (4)
3016AssertEx.All(properties, p => p.DeclaredAccessibility == Accessibility.Public); 3063AssertEx.All(properties, p => p.DeclaredAccessibility == Accessibility.Public); 3110AssertEx.All(properties, p => p.DeclaredAccessibility == Accessibility.Public); 3157AssertEx.All(properties, p => p.DeclaredAccessibility == Accessibility.Public);
Symbols\Retargeting\RetargetCustomModifiers.cs (1)
185Assert.Equal(Accessibility.Public, volatileFld.DeclaredAccessibility);
Symbols\Source\AccessTests.cs (1)
31Assert.Equal(Accessibility.Public, a.DeclaredAccessibility);
Symbols\Source\EventTests.cs (4)
84Assert.Equal(Accessibility.Public, @event.DeclaredAccessibility); 1870Assert.Equal(Accessibility.Public, event1.RemoveMethod.DeclaredAccessibility); 1875Assert.Equal(Accessibility.Public, event2.RemoveMethod.DeclaredAccessibility); 1880Assert.Equal(Accessibility.Public, event3.RemoveMethod.DeclaredAccessibility);
Symbols\Source\MethodTests.cs (10)
88check(@"internal class A { }", "A", 1, Accessibility.Public); 172Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 381Assert.Equal(Accessibility.Public, outP.DeclaredAccessibility); 961Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility); 1070Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility); 1182Assert.Equal(Accessibility.Public, m0.DeclaredAccessibility); 1206Assert.Equal(Accessibility.Public, type2.DeclaredAccessibility); 1219Assert.Equal(Accessibility.Public, m0.DeclaredAccessibility); 1262Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility); 1276Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility);
Symbols\Source\ModifierTests.cs (2)
54Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility); 116Assert.Equal(Accessibility.Public, m2.DeclaredAccessibility);
Symbols\Source\RecordTests.cs (5)
158Assert.Equal(Accessibility.Public, x.DeclaredAccessibility); 175Assert.Equal(Accessibility.Public, getAccessor.DeclaredAccessibility); 182Assert.Equal(Accessibility.Public, setAccessor.DeclaredAccessibility); 192Assert.Equal(Accessibility.Public, y.DeclaredAccessibility); 215Assert.Equal(Accessibility.Public, setAccessor.DeclaredAccessibility);
Symbols\TypeTests.cs (4)
299Assert.Equal(Accessibility.Public, type2.DeclaredAccessibility); 671Assert.Equal(Accessibility.Public, v.DeclaredAccessibility); 857Assert.Equal(Accessibility.Public, igoo.DeclaredAccessibility); 882Assert.Equal(Accessibility.Public, structS.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Parsing\ReadOnlyStructs.cs (5)
53Assert.Equal(Accessibility.Public, s2.DeclaredAccessibility); 59Assert.Equal(Accessibility.Public, s3.DeclaredAccessibility); 127Assert.Equal(Accessibility.Public, s2.DeclaredAccessibility); 133Assert.Equal(Accessibility.Public, s3.DeclaredAccessibility); 162Assert.Equal(Accessibility.Public, s2.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
AttributeValidation.cs (1)
38case Accessibility.Public:
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (1)
Metadata\WinMdMetadataTests.cs (1)
76Assert.Equal(Accessibility.Public, func.DeclaredAccessibility);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
585d = this.AsImplementation(d, Accessibility.Public); 1675case Accessibility.Public:
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (4)
318Accessibility.Public, 450Accessibility.Public, 604case SyntaxKind.PublicKeyword: return Accessibility.Public; 627return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
311? Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
113(SyntaxKind.PublicKeyword, _) => Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
49case Accessibility.Public:
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (29)
CodeGeneration\SymbolEditorTests.cs (1)
320var newSymbol = (INamedTypeSymbol)await editor.EditAllDeclarationsAsync(symbol, (e, d) => e.SetAccessibility(d, Accessibility.Public));
CodeGeneration\SyntaxGeneratorTests.cs (28)
789Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility: Accessibility.Public), 829Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("x"), accessibility: Accessibility.Public), 833Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("x"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Abstract), 1016Generator.ConstructorDeclaration("c", accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static), 1138Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility: Accessibility.Public), 1154Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Abstract), 1630Generator.InterfaceDeclaration("i", members: [Generator.MethodDeclaration("m", returnType: Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]), 1634Generator.InterfaceDeclaration("i", members: [Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]), 1638Generator.InterfaceDeclaration("i", members: [Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.ReadOnly)]), 1642Generator.InterfaceDeclaration("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)]), 1646Generator.InterfaceDeclaration("i", members: [Generator.IndexerDeclaration([Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))], Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)]), 1650Generator.InterfaceDeclaration("i", members: [Generator.CustomEventDeclaration("ep", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]), 1654Generator.InterfaceDeclaration("i", members: [Generator.EventDeclaration("ef", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Static)]), 1658Generator.InterfaceDeclaration("i", members: [Generator.FieldDeclaration("f", Generator.IdentifierName("t"), accessibility: Accessibility.Public, modifiers: DeclarationModifiers.Sealed)]), 1716Generator.DelegateDeclaration("d", accessibility: Accessibility.Public), 1720Generator.DelegateDeclaration("d", accessibility: Accessibility.Public), 3105var publicCtor = Generator.WithAccessibility(ctor, Accessibility.Public); 3114var ctor = Generator.ConstructorDeclaration("C", accessibility: Accessibility.Public); 3139var filePublicClass = Generator.WithAccessibility(fileClass, Accessibility.Public); 3374Assert.Equal(Accessibility.Public, Generator.GetAccessibility(Generator.WithAccessibility(getAccessor, Accessibility.Public))); 3392var newProp = Generator.ReplaceNode(prop, getAccessor, Generator.WithAccessibility(getAccessor, Accessibility.Public)); 3393Assert.Equal(Accessibility.Public, Generator.GetAccessibility(Generator.GetAccessor(newProp, DeclarationKind.GetAccessor))); 3395newProp = Generator.ReplaceNode(prop, setAccessor, Generator.WithAccessibility(setAccessor, Accessibility.Public)); 3396Assert.Equal(Accessibility.Public, Generator.GetAccessibility(Generator.GetAccessor(newProp, DeclarationKind.SetAccessor))); 3799Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declX)); 3805Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declY)); 3811Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declZ));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (20)
CodeGeneration\CodeGenerationTests.cs (12)
61Accessibility accessibility = Accessibility.Public, 103Accessibility accessibility = Accessibility.Public, 136Accessibility accessibility = Accessibility.Public, 181Accessibility accessibility = Accessibility.Public, 221Accessibility accessibility = Accessibility.Public, 268Accessibility accessibility = Accessibility.Public, 339Accessibility accessibility = Accessibility.Public, 372Accessibility accessibility = Accessibility.Public, 411Accessibility defaultAccessibility = Accessibility.Public, 412Accessibility setterAccessibility = Accessibility.Public, 504Accessibility accessibility = Accessibility.Public, 708attributes: default, Accessibility.Public,
CodeGeneration\CodeGenerationTests.CSharp.cs (4)
243[InlineData(Accessibility.Public)] 337accessibility: Accessibility.Public, 1464var getField = CreateField(Accessibility.Public, new Editing.DeclarationModifiers(), typeof(int), "f2"); 1490var getField = CreateField(Accessibility.Public, new Editing.DeclarationModifiers(), typeof(int), "f2");
CodeGeneration\CodeGenerationTests.VisualBasic.cs (4)
249accessibility: Accessibility.Public, 415Accessibility.Public, 624accessibility: Accessibility.Public, 1534var getField = CreateField(Accessibility.Public, new DeclarationModifiers(isStatic: true), typeof(int), "f2");
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
DkmUtilities.cs (1)
312case Accessibility.Public:
Microsoft.CodeAnalysis.Features (66)
Common\GlyphExtensions.cs (1)
218return Accessibility.Public;
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (2)
279overloadInfo.NonGenericOverload.DeclaredAccessibility == Accessibility.Public); 318var newContainsPublicGenericOverload = type.DeclaredAccessibility >= Accessibility.Public || ContainsPublicGenericOverload;
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
421=> symbol.DeclaredAccessibility == Accessibility.Public ||
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (4)
267Accessibility.Public, 356attributes: default, Accessibility.Public, modifiers: default, 372attributes: default, Accessibility.Public, DeclarationModifiers.Abstract, 399attributes: default, Accessibility.Public, modifiers: default,
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (3)
867Accessibility.Public, 914? Accessibility.Public 946attributes: default, Accessibility.Public, modifiers: default,
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (1)
155method.DeclaredAccessibility == Accessibility.Public &&
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (1)
144if (symbol is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, IsStatic: true } &&
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (2)
63where method.DeclaredAccessibility == Accessibility.Public 151method.DeclaredAccessibility == Accessibility.Public &&
EncapsulateField\AbstractEncapsulateFieldService.cs (1)
369computedAccessibility = Accessibility.Public;
ExtractInterface\AbstractExtractInterfaceService.cs (8)
382accessibility: Accessibility.Public, 392accessibility: Accessibility.Public, 405var hasGetMethod = property.GetMethod != null && property.GetMethod.DeclaredAccessibility == Accessibility.Public; 415accessibility: Accessibility.Public, 423setMethod: property.SetMethod == null ? null : (property.SetMethod.DeclaredAccessibility == Accessibility.Public ? property.SetMethod : null), 438m.DeclaredAccessibility != Accessibility.Public || 453((prop.GetMethod != null && prop.GetMethod.DeclaredAccessibility == Accessibility.Public) || 454(prop.SetMethod != null && prop.SetMethod.DeclaredAccessibility == Accessibility.Public));
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
166compareMethod.DeclaredAccessibility != Accessibility.Public && 196Accessibility.Public,
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);
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (1)
136accessibility: Accessibility.Public,
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (2)
162Accessibility.Public, 179Accessibility.Public,
GenerateType\AbstractGenerateTypeService.cs (1)
245return Accessibility.Public;
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
650case Accessibility.Public:
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (2)
224DetermineName(), null, parameters.ToImmutable(), Accessibility.Public, 240.Where(c => c.DeclaredAccessibility is Accessibility.Public or Accessibility.Protected && !c.IsObsolete())
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (4)
322if (rule.SymbolSpecification.AppliesTo(SymbolKind.Property, Accessibility.Public)) 326var accessibilityLevel = Accessibility.Public; 330if (defaultAccessibility == Accessibility.Public) 338Accessibility.Public,
MetadataAsSource\AbstractMetadataAsSourceService.WrappedNamedTypeSymbol.cs (1)
31where m.DeclaredAccessibility is Accessibility.Public or
PullMemberUp\MembersPuller.cs (6)
78return getterOrSetter?.DeclaredAccessibility == Accessibility.Public ? getterOrSetter : null; 87: CodeGenerationSymbolFactory.CreateMethodSymbol(getterOrSetter, accessibility: Accessibility.Public); 162accessibility: Accessibility.Public, 217editor.SetAccessibility(memberDeclaration, Accessibility.Public); 247accessibility: Accessibility.Public, 260editor.SetAccessibility(declaration, Accessibility.Public);
PullMemberUp\PullMembersUpOptionsBuilder.cs (1)
22var changeOriginalToPublic = memberAndMakeAbstract.member.DeclaredAccessibility != Accessibility.Public;
src\Analyzers\Core\Analyzers\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsDiagnosticAnalyzer.cs (1)
39.FirstOrDefault(m => m.DeclaredAccessibility == Accessibility.Public &&
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (1)
89.FirstOrDefault(m => m.DeclaredAccessibility == Accessibility.Public &&
src\Analyzers\Core\CodeFixes\AddAccessibilityModifiers\AddAccessibilityModifiersHelpers.cs (1)
56return Accessibility.Public;
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
49if (method.DeclaredAccessibility != Accessibility.Public)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
145case Accessibility.Public:
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (3)
82var propertyNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Property, Accessibility.Public, cancellationToken).ConfigureAwait(false); 596accessibility: Accessibility.Public, 660TypeToGenerateIn.IsAbstractClass() ? Accessibility.Protected : Accessibility.Public,
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
60case Accessibility.Public:
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.AbstractCodeAction.cs (3)
87return Accessibility.Public; 91if (classType.IsAbstractClass() && baseConstructor.DeclaredAccessibility == Accessibility.Public) 100return Accessibility.Public;
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
42accessibility: Accessibility.Public,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
271return Accessibility.Public;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
138return Accessibility.Public; 171return Accessibility.Public;
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
93var accessibility = Accessibility.Public;
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
292? Accessibility.Public
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (1)
225accessibility: Explicitly ? Accessibility.NotApplicable : Accessibility.Public,
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
628var glyphString = glyph.ToString().Replace(nameof(Accessibility.Public), string.Empty)
Microsoft.CodeAnalysis.VisualBasic (103)
Binding\Binder_Attributes.vb (4)
334If DigThroughArrayType(param.Type).DeclaredAccessibility <> Accessibility.Public Then 341If DigThroughArrayType(container).DeclaredAccessibility <> Accessibility.Public Then 360If methodSym.DeclaredAccessibility <> Accessibility.Public Then 506If sym.DeclaredAccessibility <> Accessibility.Public Then
Binding\Binder_Lambda.vb (1)
24Dim modifiers As SourceMemberFlags = DecodeModifiers(node.SubOrFunctionHeader.Modifiers, asyncIterator, ERRID.ERR_InvalidLambdaModifier, Accessibility.Public, If(diagnostics.DiagnosticBag, New DiagnosticBag())).FoundFlags And asyncIterator
Binding\Binder_Utils.vb (2)
220access = Accessibility.Public 1558AccessibilityPublic = CUShort(Accessibility.Public)
Binding\LookupResult.vb (2)
992Debug.Assert(possiblyMergedNamespace.DeclaredAccessibility = Accessibility.Public) 995If type.DeclaredAccessibility < Accessibility.Public AndAlso
Compilation\ClsComplianceChecker.vb (1)
817Case Accessibility.Public
Compilation\MethodCompiler.vb (1)
1950If m.DeclaredAccessibility <> Accessibility.Public Then
Declarations\DeclarationModifiersExtensions.vb (1)
13Case DeclarationModifiers.Public : Return Accessibility.Public
Emit\AttributeDataAdapter.vb (1)
137If member.DeclaredAccessibility = Accessibility.Public Then
Emit\NoPia\EmbeddedType.vb (1)
65Return UnderlyingNamedType.AdaptedNamedTypeSymbol.DeclaredAccessibility = Accessibility.Public
Emit\NoPia\EmbeddedTypesManager.vb (1)
385(containerKind = TypeKind.Structure AndAlso (field.AdaptedFieldSymbol.IsShared OrElse field.AdaptedFieldSymbol.DeclaredAccessibility <> Accessibility.Public)) Then
Emit\PEModuleBuilder.vb (1)
505If symbol.DeclaredAccessibility <> Accessibility.Public Then
Errors\ErrorMessageHelpers.vb (1)
27Case Accessibility.Public
Lowering\AsyncRewriter\AsyncRewriter.vb (2)
136Me.StateField = Me.F.StateMachineField(Me.F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public) 137Me._builderField = Me.F.StateMachineField(Me._builderType, Me.Method, GeneratedNames.MakeStateMachineBuilderFieldName(), Accessibility.Public)
Lowering\IteratorRewriter\IteratorRewriter.vb (3)
139Me.StateField = Me.F.StateMachineField(Me.F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeStateMachineStateFieldName(), Accessibility.Public) 142_currentField = F.StateMachineField(_elementType, Me.Method, GeneratedNames.MakeIteratorCurrentFieldName(), Accessibility.Public) 146F.StateMachineField(F.SpecialType(SpecialType.System_Int32), Me.Method, GeneratedNames.MakeIteratorInitialThreadIdName(), Accessibility.Public),
Lowering\LambdaRewriter\LambdaCapturedVariable.vb (1)
28MyBase.New(frame, captured, type, fieldName, accessibility:=Accessibility.Public)
Lowering\LambdaRewriter\LambdaFrame.vb (1)
70Me._singletonCache = New SynthesizedLambdaCacheFieldSymbol(Me, Me, Me, cacheVariableName, topLevelMethod, Accessibility.Public, isReadOnly:=True, isShared:=True)
Lowering\LambdaRewriter\LambdaRewriter.vb (1)
1236accessibility:=Accessibility.Public,
Semantics\AccessCheck.vb (8)
181Case Accessibility.NotApplicable, Accessibility.Public 224Case Accessibility.Public 658If exposedType.DeclaredAccessibility = Accessibility.Public Then 739If typeAccessOutsideAssembly = Accessibility.Public Then 745If memberAccessOutsideAssembly = Accessibility.Public Then 767s_mapAccessToAccessOutsideAssembly = New Accessibility(Accessibility.Public) {} 775s_mapAccessToAccessOutsideAssembly(Accessibility.Public) = Accessibility.Public
SymbolDisplay\SymbolDisplayVisitor.vb (1)
361Case Accessibility.Public
Symbols\AccessibilityExtensions.vb (1)
19Case Accessibility.Public
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_EqualsMethodSymbol.vb (1)
70Return Accessibility.Public
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_GetHashCodeMethodSymbol.vb (1)
39Return Accessibility.Public
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_IEquatable_EqualsMethodSymbol.vb (1)
76Return Accessibility.Public
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_PropertySymbol.vb (1)
121Return Accessibility.Public
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType_ToStringMethodSymbol.vb (1)
43Return Accessibility.Public
Symbols\AssemblySymbol.vb (1)
728Return result.DeclaredAccessibility = Accessibility.Public OrElse IsSymbolAccessible(result, Me)
Symbols\Attributes\AttributeData.vb (2)
424[property].DeclaredAccessibility = Accessibility.Public AndAlso [property].GetArity() = 0 AndAlso 425[property].HasSet AndAlso [property].SetMethod.DeclaredAccessibility = Accessibility.Public Then
Symbols\ConstraintsHelper.vb (1)
1185If constructor.DeclaredAccessibility <> Accessibility.Public Then
Symbols\ErrorMethodSymbol.vb (1)
50Return Accessibility.Public
Symbols\ErrorTypeSymbol.vb (1)
220Return Accessibility.Public
Symbols\MergedNamespaceSymbol.vb (3)
374If current = Accessibility.Public Then 375Return Accessibility.Public 499If Me.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType = Accessibility.Public Then
Symbols\Metadata\PE\MetadataDecoder.vb (1)
331candidate.DeclaredAccessibility <> Accessibility.Public Then
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
127access = Accessibility.Public
Symbols\Metadata\PE\PEMethodSymbol.vb (3)
392ElseIf IsShared AndAlso DeclaredAccessibility = Accessibility.Public AndAlso Not IsSub AndAlso Arity = 0 Then 512IsShared AndAlso DeclaredAccessibility = Accessibility.Public AndAlso 613access = Accessibility.Public
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
358access = Accessibility.Public
Symbols\Metadata\PE\PENamedTypeSymbolWithEmittedNamespaceName.vb (1)
36If (Arity = 0 OrElse MangleName) AndAlso (moduleSymbol.ContainingAssembly.KeepLookingForDeclaredSpecialTypes) AndAlso Me.DeclaredAccessibility = Accessibility.Public Then
Symbols\Metadata\PE\PENestedNamespaceSymbol.vb (1)
158Return Accessibility.Public
Symbols\MetadataOrSourceAssemblySymbol.vb (1)
55If result Is Nothing OrElse result.DeclaredAccessibility <> Accessibility.Public Then
Symbols\NamespaceSymbol.vb (6)
159Return Accessibility.Public 198Case Accessibility.Public 199Return Accessibility.Public 214If childResult = Accessibility.Public Then 215Return Accessibility.Public 232If accessibility = Accessibility.Public Then
Symbols\PEOrSourceOrMergedNamespaceSymbol.vb (2)
65If _lazyDeclaredAccessibilityOfMostAccessibleDescendantType = Accessibility.Public Then 71parent._lazyDeclaredAccessibilityOfMostAccessibleDescendantType = CByte(Accessibility.Public)
Symbols\Source\ImplementsHelper.vb (1)
645If member.DeclaredAccessibility = Accessibility.Public AndAlso
Symbols\Source\SourceAssemblySymbol.vb (1)
939Return Not obj.IsErrorType() AndAlso obj.DeclaredAccessibility = Accessibility.Public
Symbols\Source\SourceEventSymbol.vb (1)
714Accessibility.Public,
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
32[Public] = CUShort(Accessibility.Public)
Symbols\Source\SourceMemberFieldSymbol.vb (1)
435If(container.IsValueType, Accessibility.Public, Accessibility.Private),
Symbols\Source\SourceMethodSymbol.vb (3)
226Accessibility.Public, 428Accessibility.Public, 455Dim operatorModifiers = binder.DecodeModifiers(syntax.Modifiers, allowModifiers, ERRID.ERR_BadOperatorFlags1, Accessibility.Public, diagBag)
Symbols\Source\SourceNamedTypeSymbol.vb (4)
83Me.DeclaredAccessibility = Accessibility.Public Then 601If namedType.DeclaredAccessibility = Accessibility.Public AndAlso namedType.MangleName = Me.MangleName Then 703accessibility:=Accessibility.Public, 2363(member.DeclaredAccessibility = Accessibility.Public OrElse
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (10)
164If comClass.DeclaredAccessibility <> Accessibility.Public Then 170If container.DeclaredAccessibility <> Accessibility.Public Then 369If member.IsShared OrElse member.DeclaredAccessibility <> Accessibility.Public OrElse 406If getter.DeclaredAccessibility <> Accessibility.Public OrElse Not GetComVisibleState(getter) Then 416If setter.DeclaredAccessibility <> Accessibility.Public OrElse Not GetComVisibleState(setter) Then 744Return Accessibility.Public 1052Debug.Assert(clone.DeclaredAccessibility = Accessibility.Public) 1123Return Accessibility.Public 1679Debug.Assert(clone.DeclaredAccessibility = Accessibility.Public) 1730Return Accessibility.Public
Symbols\Source\SourcePropertySymbol.vb (1)
1086Accessibility.Public,
Symbols\Source\SynthesizedMainTypeEntryPoint.vb (1)
30Return Accessibility.Public
Symbols\Source\SynthesizedMyGroupCollectionPropertyBackingFieldSymbol.vb (1)
29MyBase.New(containingType, implicitlyDefinedBy, type, name, Accessibility.Public, isReadOnly:=False, isShared:=False)
Symbols\Symbol.vb (1)
94Case Accessibility.Public
Symbols\SynthesizedSymbols\SynthesizedConstructorBase.vb (1)
83Return Accessibility.Public
Symbols\SynthesizedSymbols\SynthesizedDelegateMethodSymbol.vb (1)
113Return Accessibility.Public
Symbols\SynthesizedSymbols\SynthesizedHotReloadExceptionSymbol.vb (1)
31New SynthesizedFieldSymbol(Me, implicitlyDefinedBy:=Me, intType, CodeFieldName, Accessibility.Public, isReadOnly:=True, isShared:=False))
Symbols\SynthesizedSymbols\SynthesizedIntrinsicOperatorSymbol.vb (1)
100Return Accessibility.Public
Symbols\SynthesizedSymbols\SynthesizedMethod.vb (1)
122Return Accessibility.Public
Symbols\SynthesizedSymbols\SynthesizedPropertyBase.vb (1)
64Return Accessibility.Public
Symbols\SynthesizedSymbols\SynthesizedSimpleMethodSymbol.vb (1)
60Return Accessibility.Public
Symbols\Tuples\TupleErrorFieldSymbol.vb (1)
44MyBase.New(container, container, type, name, Accessibility.Public)
Symbols\Tuples\TupleTypeSymbol.vb (1)
174result = Accessibility.[Public]
Symbols\WellKnownMembers.vb (1)
458Not (m.DeclaredAccessibility = Accessibility.Public OrElse (accessWithinOpt IsNot Nothing AndAlso Symbol.IsSymbolAccessible(m, accessWithinOpt))) Then
Syntax\SyntaxFacts.vb (1)
546Case Accessibility.Public
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiers.vb (1)
82Return accessibility = Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicAccessibilityFacts.vb (1)
195accessibility = Accessibility.Public
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (9)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConstructorGenerator.vb (1)
88AddAccessibilityModifiers(constructor.DeclaredAccessibility, tokens, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (1)
170AddAccessibilityModifiers([event].DeclaredAccessibility, tokens, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (1)
147AddAccessibilityModifiers(method.DeclaredAccessibility, result, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
168Case Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (2)
168AddAccessibilityModifiers(accessor.DeclaredAccessibility, modifiers, destination, options, Accessibility.Public) 189AddAccessibilityModifiers([property].DeclaredAccessibility, tokens, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (2)
22If destination = CodeGenerationDestination.StructType AndAlso accessibility = Accessibility.Public Then 32Case Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
380Case Accessibility.Public
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
136accessibility:=Accessibility.Public,
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (6)
Emit\EmitMetadata.vb (2)
485Assert.Equal(Accessibility.Public, classA.DeclaredAccessibility) 498Assert.Equal(Accessibility.Public, classD.DeclaredAccessibility)
Emit\NoPiaEmbedTypes.vb (4)
1107Assert.Equal(Accessibility.Public, value__.DeclaredAccessibility) 1119Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility) 1147Assert.Equal(Accessibility.Public, f3.DeclaredAccessibility) 1397Assert.Equal(Accessibility.Public, p1.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Features (9)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
142attributes:=Nothing, accessibility:=Accessibility.Public, modifiers:=Nothing, 149accessibility:=Accessibility.Public, modifiers:=Nothing, 391attributes:=Nothing, accessibility:=Accessibility.Public, modifiers:=Nothing, 397attributes:=Nothing, accessibility:=Accessibility.Public, modifiers:=Nothing,
Completion\CompletionProviders\OverrideCompletionProvider.vb (1)
104seenAccessibility = Accessibility.Public
GenerateType\VisualBasicGenerateTypeService.vb (1)
693accessibility:=Accessibility.Public,
InitializeParameter\VisualBasicInitializeMemberFromParameterCodeRefactoringProvider.vb (2)
50Return If(containingType.TypeKind = TypeKind.Class Or containingType.TypeKind = TypeKind.Module, Accessibility.Private, Accessibility.Public) 55Return Accessibility.Public
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiers.vb (1)
82Return accessibility = Accessibility.Public
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (9)
Binding\LookupTests.vb (7)
981Assert.Equal(Accessibility.Public, isolatedStorage.DeclaredAccessibilityOfMostAccessibleDescendantType) 983Assert.Equal(Accessibility.Public, isolatedStorage.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 984Assert.Equal(Accessibility.Public, system.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 985Assert.Equal(Accessibility.Public, io.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1032Assert.Equal(Accessibility.Public, q.DeclaredAccessibilityOfMostAccessibleDescendantType) 1033Assert.Equal(Accessibility.Public, p.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType) 1034Assert.Equal(Accessibility.Public, q.RawLazyDeclaredAccessibilityOfMostAccessibleDescendantType)
Semantics\BinaryOperators.vb (1)
1268Assert.Equal(Accessibility.Public, symbol1.DeclaredAccessibility)
Semantics\UnaryOperators.vb (1)
779Assert.Equal(Accessibility.Public, symbol1.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (90)
SymbolsTests\AnonymousTypes\AnonymousTypesEmittedSymbolsTests.vb (8)
380CheckMethod(m, constr, ".ctor", Accessibility.Public, isSub:=True, paramCount:=3) 416CheckMethod(m, toStr, "ToString", Accessibility.Public, 478CheckMethod(m, method, "Equals", Accessibility.Public, 513CheckMethod(m, method, "GetHashCode", Accessibility.Public, 553CheckMethod(m, method, "Equals", Accessibility.Public, 656Assert.Equal(Accessibility.Public, prop.DeclaredAccessibility) 671Accessibility.Public, 677Accessibility.Public,
SymbolsTests\AssemblyAndNamespaceTests.vb (2)
130Assert.Equal(Accessibility.Public, sym3.DeclaredAccessibility) 131Assert.Equal(Accessibility.Public, sym4.DeclaredAccessibility)
SymbolsTests\CompilationCreationTests.vb (2)
1867Assert.Equal(Accessibility.[Public], foo2.DeclaredAccessibility) 1904Assert.Equal(Accessibility.[Public], type3.DeclaredAccessibility)
SymbolsTests\Metadata\MetadataMemberTests.vb (2)
215Assert.Equal(Accessibility.Public, member1.DeclaredAccessibility) 331Assert.Equal(Accessibility.Public, member2.DeclaredAccessibility)
SymbolsTests\Metadata\MetadataTypeTests.vb (4)
45Assert.Equal(Accessibility.Public, ns.DeclaredAccessibility) 175Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility) 230Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility) 283Assert.Equal(Accessibility.Public, type1.DeclaredAccessibility)
SymbolsTests\Metadata\PE\LoadingFields.vb (1)
51Assert.Equal(Accessibility.Public, f1.DeclaredAccessibility)
SymbolsTests\Metadata\PE\LoadingMethods.vb (1)
54Assert.Equal(Accessibility.Public, (M1.DeclaredAccessibility))
SymbolsTests\Metadata\PE\TypeAccessibility.vb (2)
35Assert.Equal(Accessibility.Public, obj.DeclaredAccessibility) 59Assert.Equal(Accessibility.Public, ContextForm.DeclaredAccessibility)
SymbolsTests\Metadata\WinMdTypeTests.vb (1)
46Assert.Equal(value.DeclaredAccessibility, Accessibility.Public)
SymbolsTests\Retargeting\RetargetCustomModifiers.vb (1)
129Assert.Equal(Accessibility.[Public], volatileFld.DeclaredAccessibility)
SymbolsTests\Source\EnumTests.vb (1)
1376Assert.Equal(field.DeclaredAccessibility, Accessibility.Public)
SymbolsTests\Source\FieldTests.vb (3)
110Assert.Equal(Accessibility.Public, fieldP.DeclaredAccessibility) 118Assert.Equal(Accessibility.Public, fieldQ.DeclaredAccessibility) 139Assert.Equal(Accessibility.Public, fieldT.DeclaredAccessibility)
SymbolsTests\Source\MethodTests.vb (29)
68Assert.Equal(Accessibility.Public, ctor.DeclaredAccessibility) 87Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility) 195Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility) 244Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility) 390Assert.Equal(Accessibility.Public, m1.DeclaredAccessibility) 980Assert.Equal(Accessibility.Public, mem1.DeclaredAccessibility) 986Assert.Equal(Accessibility.Public, mem2.DeclaredAccessibility) 1076Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1078Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1086Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1088Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1090Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1092Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1094Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1096Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1104Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) ' private is better but Dev10 is public 1106Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1108Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1110Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1112Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1114Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1116Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1124Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1126Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1133Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1135Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1140Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) ' private is better but Dev10 is public 1142Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility) 1144Assert.Equal(Accessibility.Public, mem.DeclaredAccessibility)
SymbolsTests\Source\NamespaceGlobalTests.vb (1)
490Assert.Equal(Accessibility.Public, symbolC1(0).DeclaredAccessibility)
SymbolsTests\Source\OperatorsTests.vb (3)
189Assert.Equal(Accessibility.Public, op.DeclaredAccessibility) 387Assert.Equal(Accessibility.Public, op.DeclaredAccessibility) 546Assert.Equal(Accessibility.Public, op.DeclaredAccessibility)
SymbolsTests\Source\PropertyTests.vb (16)
699VerifyProperty(type, "P", Accessibility.Public, isFromSource, hasGet:=True, hasSet:=True, hasField:=False) 700VerifyProperty(type, "Q", Accessibility.Public, isFromSource, hasGet:=True, hasSet:=False, hasField:=False) 701VerifyProperty(type, "R", Accessibility.Public, isFromSource, hasGet:=False, hasSet:=True, hasField:=False) 704VerifyProperty(type, "P", Accessibility.Public, isFromSource, hasGet:=True, hasSet:=True, hasField:=False) 705VerifyProperty(type, "Q", Accessibility.Public, isFromSource, hasGet:=True, hasSet:=False, hasField:=False) 706VerifyProperty(type, "R", Accessibility.Public, isFromSource, hasGet:=False, hasSet:=True, hasField:=False) 709VerifyProperty(type, "P", Accessibility.Public, isFromSource, hasGet:=True, hasSet:=True, hasField:=True) 710VerifyProperty(type, "Q", Accessibility.Public, isFromSource, hasGet:=True, hasSet:=False, hasField:=False) 711VerifyProperty(type, "R", Accessibility.Public, isFromSource, hasGet:=False, hasSet:=True, hasField:=False) 4513CheckPropertyAccessibility(p1, Accessibility.Public, Accessibility.Public, Accessibility.Public) 4523CheckPropertyAccessibility(p6, Accessibility.Public, Accessibility.Public, Accessibility.NotApplicable) 4526CheckPropertyAccessibility(p7, Accessibility.Public, privateOrNotApplicable, Accessibility.Public)
SymbolsTests\Source\TypeTests.vb (8)
112Assert.Equal(Accessibility.Public, classB.DeclaredAccessibility) 242Assert.Equal(Accessibility.Public, outerClass.DeclaredAccessibility) 278Assert.Equal(Accessibility.Public, i4Enum.DeclaredAccessibility) 555Assert.Equal(Accessibility.Public, enumE.DeclaredAccessibility) 618Assert.Equal(Accessibility.Public, igoo.DeclaredAccessibility) 628Assert.Equal(Accessibility.Public, structS.DeclaredAccessibility) 743Assert.Equal(Accessibility.Public, mem2.DeclaredAccessibility) 753Assert.Equal(Accessibility.Public, mem3.DeclaredAccessibility)
SymbolsTests\SymbolErrorTests.vb (2)
20999Assert.Equal(Accessibility.Public, sym.DeclaredAccessibility) 22495Assert.Equal(Accessibility.Public, errTypeSym.DeclaredAccessibility)
SymbolsTests\WellKnownTypeValidationTests.vb (3)
40Assert.Equal(Accessibility.Public, special.DeclaredAccessibility) 164Assert.Equal(Accessibility.Public, wellKnown.DeclaredAccessibility) 417Assert.Equal(Accessibility.Public, wellKnown.DeclaredAccessibility)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
MockSymbols.vb (2)
193Return Accessibility.Public 436Return Accessibility.Public
Microsoft.CodeAnalysis.VisualBasic.Workspaces (15)
CodeGeneration\VisualBasicSyntaxGenerator.vb (1)
1044declaration = WithAccessibility(declaration, Accessibility.Public)
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (4)
262Accessibility.Public, 410Case SyntaxKind.PublicKeyword : Return Accessibility.Public 437Return Accessibility.Public 440Return Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicAccessibilityFacts.vb (1)
195accessibility = Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConstructorGenerator.vb (1)
88AddAccessibilityModifiers(constructor.DeclaredAccessibility, tokens, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (1)
170AddAccessibilityModifiers([event].DeclaredAccessibility, tokens, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (1)
147AddAccessibilityModifiers(method.DeclaredAccessibility, result, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
168Case Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (2)
168AddAccessibilityModifiers(accessor.DeclaredAccessibility, modifiers, destination, options, Accessibility.Public) 189AddAccessibilityModifiers([property].DeclaredAccessibility, tokens, destination, options, Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (2)
22If destination = CodeGenerationDestination.StructType AndAlso accessibility = Accessibility.Public Then 32Case Accessibility.Public
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (1)
380Case Accessibility.Public
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (23)
CodeGeneration\SyntaxGeneratorTests.vb (23)
836Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility:=Accessibility.Public), 878Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.None), 883Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("x"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Abstract), 1337Generator.EventDeclaration("ev", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Static), 1377Generator.ConstructorDeclaration("c", accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Static), 1408Generator.ClassDeclaration("c", accessibility:=Accessibility.Public), 1461Generator.StructDeclaration("s", accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Partial), 1541Generator.InterfaceDeclaration("i", members:={Generator.MethodDeclaration("m", returnType:=Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}), 1549Generator.InterfaceDeclaration("i", members:={Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.Sealed)}), 1557Generator.InterfaceDeclaration("i", members:={Generator.PropertyDeclaration("p", Generator.IdentifierName("t"), accessibility:=Accessibility.Public, modifiers:=DeclarationModifiers.ReadOnly)}), 1565Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.Sealed)}), 1573Generator.InterfaceDeclaration("i", members:={Generator.IndexerDeclaration({Generator.ParameterDeclaration("y", Generator.IdentifierName("x"))}, Generator.IdentifierName("t"), Accessibility.Public, DeclarationModifiers.ReadOnly)}), 1647Generator.DelegateDeclaration("d", accessibility:=Accessibility.Public), 2664Assert.Equal(Accessibility.Public, Generator.GetAccessibility(m)) 3078Assert.Equal(Accessibility.Public, _g.GetAccessibility(_g.WithAccessibility(getAccessor, Accessibility.Public))) 3091Dim newProp = _g.ReplaceNode(prop, getAccessor, _g.WithAccessibility(getAccessor, Accessibility.Public)) 3092Assert.Equal(Accessibility.Public, _g.GetAccessibility(_g.GetAccessor(newProp, DeclarationKind.GetAccessor))) 3094newProp = _g.ReplaceNode(prop, setAccessor, _g.WithAccessibility(setAccessor, Accessibility.Public)) 3095Assert.Equal(Accessibility.Public, _g.GetAccessibility(_g.GetAccessor(newProp, DeclarationKind.SetAccessor))) 3490Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declX)) 3496Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declY)) 3502Assert.Equal(Accessibility.Public, Generator.GetAccessibility(declZ))
Microsoft.CodeAnalysis.Workspaces (29)
FindSymbols\SymbolFinder_Helpers.cs (1)
21return accessibility is Accessibility.Public or
FindSymbols\SymbolFinder_Hierarchy.cs (1)
117if (symbol is { DeclaredAccessibility: Accessibility.Public, ContainingType.TypeKind: TypeKind.Class or TypeKind.Struct })
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
315Accessibility.Public,
Shared\Extensions\ITypeSymbolExtensions.cs (1)
168where member.DeclaredAccessibility == Accessibility.Public &&
Shared\Extensions\SyntaxGeneratorExtensions.cs (1)
33accessibility: Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AccessibilityUtilities.cs (1)
36return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (2)
198return type.GetMembers().WhereAsArray(m => m.DeclaredAccessibility == Accessibility.Public && 221return accessor != null && IsImplementable(accessor) && accessor.DeclaredAccessibility != Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions.cs (2)
655.Where(x => x.DeclaredAccessibility == Accessibility.Public) 695.Where(x => x.DeclaredAccessibility == Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ISymbolExtensions_Accessibility.cs (2)
221case Accessibility.Public: 275case Accessibility.Public:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\ITypeSymbolExtensions.MinimalAccessibilityVisitor.cs (2)
25=> Accessibility.Public; 71return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser_SymbolSpec.cs (3)
226Accessibility.Public, 252builder.Add(Accessibility.Public); 495case Accessibility.Public:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyleRules.cs (1)
84if (symbol.DeclaredAccessibility != Accessibility.Public)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\SymbolSpecification.cs (2)
86Accessibility.Public, 165return Accessibility.Public;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SignatureComparer.cs (1)
68(method2 == null || method2.DeclaredAccessibility != Accessibility.Public);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (2)
234accessibility: Accessibility.Public, 476accessibility: Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions.cs (1)
297accessibility: Accessibility.Public,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateEqualsMethod.cs (2)
53accessibility: Accessibility.Public, 445method.DeclaredAccessibility == Accessibility.Public &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_CreateGetHashCodeMethod.cs (1)
207method.DeclaredAccessibility == Accessibility.Public &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (2)
133.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnType: var returnType, Parameters.Length: 0 } && 149.FirstOrDefault(m => m is IMethodSymbol { DeclaredAccessibility: Accessibility.Public, ReturnsVoid: true, Parameters.Length: 0 }) is IMethodSymbol disposeMethodFromPattern)
Microsoft.CodeAnalysis.Workspaces.UnitTests (13)
Editing\SyntaxEditorTests.cs (5)
52editor.ReplaceNode(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 103editor.InsertAfter(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 130editor.InsertBefore(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 178editor.InsertAfter(fieldX, editor.Generator.FieldDeclaration("Y", editor.Generator.TypeExpression(SpecialType.System_String), Accessibility.Public)); 179editor.InsertBefore(fieldX, editor.Generator.FieldDeclaration("Z", editor.Generator.TypeExpression(SpecialType.System_Object), Accessibility.Public));
EditorConfigParsing\NamingStyleParserTests.cs (8)
72accessibility => Assert.Equal(Accessibility.Public, accessibility), 108accessibility => Assert.Equal(Accessibility.Public, accessibility), 146accessibility => Assert.Equal(Accessibility.Public, accessibility), 194accessibility => Assert.Equal(Accessibility.Public, accessibility), 230accessibility => Assert.Equal(Accessibility.Public, accessibility), 266accessibility => Assert.Equal(Accessibility.Public, accessibility), 304accessibility => Assert.Equal(Accessibility.Public, accessibility), 340accessibility => Assert.Equal(Accessibility.Public, accessibility),
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (1)
303if (member.DeclaredAccessibility != Accessibility.Public)
ParserUtilities.cs (1)
82property.Type.SpecialType == returnType && property.DeclaredAccessibility == Accessibility.Public &&
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
91prop.GetMethod!.DeclaredAccessibility == Accessibility.Public;
Microsoft.Gen.Logging (10)
Parsing\Parser.LogProperties.cs (6)
250if ((property.DeclaredAccessibility != Accessibility.Public || property.IsStatic) 251|| (property.GetMethod == null || property.GetMethod.DeclaredAccessibility != Accessibility.Public)) 292if ((property.DeclaredAccessibility != Accessibility.Public || property.IsStatic) 293|| (property.GetMethod == null || property.GetMethod.DeclaredAccessibility != Accessibility.Public)) 306if ((property.DeclaredAccessibility != Accessibility.Public || property.IsStatic) 307|| (property.GetMethod == null || property.GetMethod.DeclaredAccessibility != Accessibility.Public)
Parsing\Parser.Records.cs (1)
57if (m.DeclaredAccessibility != Accessibility.Public ||
Parsing\TypeSymbolExtensions.cs (3)
24if (ts.DeclaredAccessibility == Accessibility.Public) 47if (ts.DeclaredAccessibility == Accessibility.Public) 82if (current.GetMembers("ToString").Where(m => m.Kind == SymbolKind.Method && m.DeclaredAccessibility == Accessibility.Public).Cast<IMethodSymbol>().Any(m => m.Parameters.Length == 0))
Microsoft.Interop.LibraryImportGenerator (19)
Analyzers\CustomMarshallerAttributeFixer.cs (19)
226accessibility: Accessibility.Public, 238accessibility: Accessibility.Public, 249Accessibility.Public, 265accessibility: Accessibility.Public, 281accessibility: Accessibility.Public, 296accessibility: Accessibility.Public, 312accessibility: Accessibility.Public, 328accessibility: Accessibility.Public, 343accessibility: Accessibility.Public, 421accessibility: Accessibility.Public, 431accessibility: Accessibility.Public, 441accessibility: Accessibility.Public, 451accessibility: Accessibility.Public, 461Accessibility.Public, 472accessibility: Accessibility.Public, 482accessibility: Accessibility.Public, 496accessibility: Accessibility.Public, 510accessibility: Accessibility.Public, 519accessibility: Accessibility.Public,
Microsoft.Interop.SourceGeneration (1)
SafeHandleMarshallingInfoProvider.cs (1)
50hasDefaultConstructor = ctor.DeclaredAccessibility == Accessibility.Public;
Microsoft.ML.InternalCodeAnalyzer (1)
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
59if (context.Symbol.DeclaredAccessibility != Accessibility.Public)
Microsoft.VisualStudio.LanguageServices (6)
CommonControls\MemberSelectionViewModel.cs (1)
96=> SelectMembers(Members.WhereAsArray(v => v.Symbol.DeclaredAccessibility == Accessibility.Public));
GenerateType\GenerateTypeDialogViewModel.cs (2)
196PopulateAccessList("public", Accessibility.Public, LanguageNames.CSharp); 197PopulateAccessList("Public", Accessibility.Public, LanguageNames.VisualBasic);
Progression\GraphBuilder.cs (1)
437case Accessibility.Public:
Progression\GraphProvider.cs (1)
260if (nodes.Any(n => CheckAccessibility(n, Accessibility.Public) ||
Progression\IconHelper.cs (1)
35case Accessibility.Public:
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (2)
1006return symbol.DeclaredAccessibility is Accessibility.Public 1034Accessibility.Public => EnvDTE.vsCMAccess.vsCMAccessPublic,
ObjectBrowser\DescriptionBuilder.cs (1)
136case Accessibility.Public:
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
GlyphExtensionsTests.cs (2)
62declaredAccessibility: Accessibility.Public); 65declaredAccessibility: Accessibility.Public,
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
CodeModel\VisualBasicCodeModelService.vb (4)
1405Return symbol.DeclaredAccessibility = Accessibility.Public OrElse 1446Case Accessibility.Public 3610Return Accessibility.Public 3620Return Accessibility.Public
CodeModel\VisualBasicCodeModelService_Prototype.vb (1)
154Case Accessibility.Public
ObjectBrowser\DescriptionBuilder.vb (1)
291Case Accessibility.Public
System.Text.Json.SourceGeneration (6)
Helpers\RoslynExtensions.cs (1)
112constructorInfo = namedType.GetExplicitlyDeclaredInstanceConstructors().FirstOrDefault(ctor => ctor.DeclaredAccessibility is Accessibility.Public && ctor.Parameters.Length == 0);
JsonSourceGenerator.Parser.cs (5)
1363if (getMethod.DeclaredAccessibility is Accessibility.Public) 1383if (setMethod.DeclaredAccessibility is Accessibility.Public) 1410if (fieldInfo.DeclaredAccessibility is Accessibility.Public) 1730IMethodSymbol[] publicCtors = namedType.GetExplicitlyDeclaredInstanceConstructors().Where(ctor => ctor.DeclaredAccessibility is Accessibility.Public).ToArray(); 1756foreach (IMethodSymbol constructor in namedType.GetExplicitlyDeclaredInstanceConstructors().Where(ctor => ctor.DeclaredAccessibility is not Accessibility.Public))