365 references to NotApplicable
ConfigurationSchemaGenerator (1)
ILLink.RoslynAnalyzer (1)
Microsoft.Analyzers.Extra (1)
Microsoft.Analyzers.Local (1)
Microsoft.CodeAnalysis.CodeStyle (9)
Microsoft.CodeAnalysis.CodeStyle.Fixes (18)
Microsoft.CodeAnalysis.CSharp (36)
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (7)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (7)
243[InlineData("void Outer() { void [|m|]() {} }", "void Outer() { void M() {} }", MethodKind.LocalFunction, Accessibility.NotApplicable)]
247[InlineData("void Outer() { void Inner(int [|m|]) {} }", "void Outer() { void Inner(int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
248[InlineData("void Outer() { System.Action<int> action = [|m|] => {} }", "void Outer() { System.Action<int> action = M => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
249[InlineData("void Outer() { System.Action<int> action = ([|m|]) => {} }", "void Outer() { System.Action<int> action = (M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
250[InlineData("void Outer() { System.Action<int> action = (int [|m|]) => {} }", "void Outer() { System.Action<int> action = (int M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
251[InlineData("void Outer() { System.Action<int> action = delegate (int [|m|]) {} }", "void Outer() { System.Action<int> action = delegate (int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
252[InlineData("void Outer() { int [|m|]; }", "void Outer() { int M; }", SymbolKind.Local, Accessibility.NotApplicable)]
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (10)
Diagnostics\NamingStyles\EditorConfigNamingStyleParserTests.cs (7)
53Accessibility.NotApplicable,
123new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal },
271new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal },
310new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal },
371[InlineData("local", new[] { Accessibility.NotApplicable })]
372[InlineData("*", new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal })]
373[InlineData(null, new[] { Accessibility.NotApplicable, Accessibility.Public, Accessibility.Internal, Accessibility.Private, Accessibility.Protected, Accessibility.ProtectedAndInternal, Accessibility.ProtectedOrInternal })]
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (10)
Emit\EmitMetadataTests.cs (10)
867var privateOrNotApplicable = isFromSource ? Accessibility.Private : Accessibility.NotApplicable;
870CheckPropertyAccessibility(p2, Accessibility.Internal, Accessibility.Internal, Accessibility.NotApplicable);
871CheckPropertyAccessibility(p3, Accessibility.ProtectedOrInternal, Accessibility.ProtectedOrInternal, Accessibility.NotApplicable);
872CheckPropertyAccessibility(p4, Accessibility.Protected, Accessibility.Protected, Accessibility.NotApplicable);
883CheckPropertyAccessibility(p5, Accessibility.Private, Accessibility.NotApplicable, Accessibility.Private);
884CheckPropertyAccessibility(p6, Accessibility.Private, Accessibility.Private, Accessibility.NotApplicable);
1094CheckPropertyAccessibility(propertyP, Accessibility.Public, Accessibility.Public, Accessibility.NotApplicable);
1115CheckPropertyAccessibility(propertyP, Accessibility.Public, Accessibility.Public, Accessibility.NotApplicable);
1121CheckPropertyAccessibility(propertyQ, Accessibility.Public, Accessibility.NotApplicable, Accessibility.Internal);
1178Assert.Equal(Accessibility.NotApplicable, accessorAccessibility);
Microsoft.CodeAnalysis.CSharp.Features (14)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (7)
243[InlineData("void Outer() { void [|m|]() {} }", "void Outer() { void M() {} }", MethodKind.LocalFunction, Accessibility.NotApplicable)]
247[InlineData("void Outer() { void Inner(int [|m|]) {} }", "void Outer() { void Inner(int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
248[InlineData("void Outer() { System.Action<int> action = [|m|] => {} }", "void Outer() { System.Action<int> action = M => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
249[InlineData("void Outer() { System.Action<int> action = ([|m|]) => {} }", "void Outer() { System.Action<int> action = (M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
250[InlineData("void Outer() { System.Action<int> action = (int [|m|]) => {} }", "void Outer() { System.Action<int> action = (int M) => {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
251[InlineData("void Outer() { System.Action<int> action = delegate (int [|m|]) {} }", "void Outer() { System.Action<int> action = delegate (int M) {} }", SymbolKind.Parameter, Accessibility.NotApplicable)]
252[InlineData("void Outer() { int [|m|]; }", "void Outer() { int M; }", SymbolKind.Local, Accessibility.NotApplicable)]
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (16)
CodeGeneration\CSharpSyntaxGenerator.cs (12)
264public override SyntaxNode OperatorDeclaration(OperatorKind kind, IEnumerable<SyntaxNode>? parameters = null, SyntaxNode? returnType = null, Accessibility accessibility = Accessibility.NotApplicable, DeclarationModifiers modifiers = default, IEnumerable<SyntaxNode>? statements = null)
270private protected override SyntaxNode OperatorDeclaration(string operatorName, bool isImplicitConversion, IEnumerable<SyntaxNode>? parameters = null, SyntaxNode? returnType = null, Accessibility accessibility = Accessibility.NotApplicable, DeclarationModifiers modifiers = default, IEnumerable<SyntaxNode>? statements = null)
598d = this.AsImplementation(d, Accessibility.NotApplicable);
852Accessibility.NotApplicable,
885internal override SyntaxNode EnumDeclaration(string name, SyntaxNode? underlyingType, Accessibility accessibility = Accessibility.NotApplicable, DeclarationModifiers modifiers = default, IEnumerable<SyntaxNode>? members = null)
933Accessibility accessibility = Accessibility.NotApplicable,
1405accessibility != Accessibility.NotApplicable)
1414if (modifiers.IsFile && accessibility != Accessibility.NotApplicable)
1422if (modifiers.IsStatic && declaration.IsKind(SyntaxKind.ConstructorDeclaration) && accessibility != Accessibility.NotApplicable)
1628if (accessibility != Accessibility.NotApplicable)
1634accessibility = Accessibility.NotApplicable;
1776}, Accessibility.NotApplicable);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (20)
CodeGeneration\SyntaxGeneratorTests.cs (20)
793Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility: Accessibility.NotApplicable, modifiers: DeclarationModifiers.Static | DeclarationModifiers.ReadOnly),
797Generator.FieldDeclaration("fld", Generator.TypeExpression(SpecialType.System_Int32), accessibility: Accessibility.NotApplicable, modifiers: DeclarationModifiers.Required),
1870Generator.PropertyDeclaration("p", Generator.IdentifierName("x"), accessibility: Accessibility.NotApplicable, modifiers: DeclarationModifiers.Abstract),
2950Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.ParameterDeclaration("p")));
2954Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.EnumMember("v")));
2957Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceDeclaration("n")));
2958Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceImportDeclaration("u")));
2959Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")));
2960Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.Attribute("a")));
2961Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(TypeParameter("tp")));
2974Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ParameterDeclaration("p"), Accessibility.Private)));
2978Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumMember("v"), Accessibility.Private)));
2981Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private)));
2982Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceImportDeclaration("u"), Accessibility.Private)));
2983Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Accessibility.Private)));
2984Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.Attribute("a"), Accessibility.Private)));
2985Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(TypeParameter("tp"), Accessibility.Private)));
3362Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(getAccessor));
3367Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(setAccessor));
3409Generator.GetAccessorDeclaration(Accessibility.NotApplicable, [Generator.ReturnStatement()])),
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
CodeGeneration\CodeGenerationTests.VisualBasic.cs (5)
424ImmutableArray<AttributeData>.Empty, Accessibility.NotApplicable, ImmutableArray<SyntaxNode>.Empty),
448addMethod: CodeGenerationSymbolFactory.CreateAccessorSymbol(ImmutableArray<AttributeData>.Empty, Accessibility.NotApplicable, ImmutableArray<SyntaxNode>.Empty),
477ImmutableArray<AttributeData>.Empty, Accessibility.NotApplicable, addStatements),
479ImmutableArray<AttributeData>.Empty, Accessibility.NotApplicable, removeStatements),
481ImmutableArray<AttributeData>.Empty, Accessibility.NotApplicable, raiseStatements),
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.Features (29)
Microsoft.CodeAnalysis.VisualBasic (31)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (2)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
Microsoft.CodeAnalysis.VisualBasic.Features (4)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (22)
SymbolsTests\Source\PropertyTests.vb (10)
4512Dim privateOrNotApplicable = If(isFromSource, Accessibility.Private, Accessibility.NotApplicable)
4514CheckPropertyAccessibility(p2, Accessibility.Friend, Accessibility.Friend, Accessibility.NotApplicable)
4515CheckPropertyAccessibility(p3, Accessibility.ProtectedOrFriend, Accessibility.ProtectedOrFriend, Accessibility.NotApplicable)
4516CheckPropertyAccessibility(p4, Accessibility.Protected, Accessibility.Protected, Accessibility.NotApplicable)
4522CheckPropertyAccessibility(p5, Accessibility.Private, Accessibility.NotApplicable, Accessibility.Private)
4523CheckPropertyAccessibility(p6, Accessibility.Public, Accessibility.Public, Accessibility.NotApplicable)
4747Accessibility.NotApplicable)
4751Accessibility.NotApplicable,
8126Assert.Equal(accessorAccessibility, Accessibility.NotApplicable)
8227If accessorAccessibility = Accessibility.NotApplicable Then
Microsoft.CodeAnalysis.VisualBasic.Workspaces (14)
CodeGeneration\VisualBasicSyntaxGenerator.vb (8)
720Optional accessibility As Accessibility = Accessibility.NotApplicable,
727Private Protected Overrides Function OperatorDeclaration(operatorName As String, isImplicitConversion As Boolean, Optional parameters As IEnumerable(Of SyntaxNode) = Nothing, Optional returnType As SyntaxNode = Nothing, Optional accessibility As Accessibility = Accessibility.NotApplicable, Optional modifiers As DeclarationModifiers = Nothing, Optional statements As IEnumerable(Of SyntaxNode) = Nothing) As SyntaxNode
852Public Overrides Function GetAccessorDeclaration(Optional accessibility As Accessibility = Accessibility.NotApplicable, Optional statements As IEnumerable(Of SyntaxNode) = Nothing) As SyntaxNode
1362Optional accessibility As Accessibility = Accessibility.NotApplicable,
2514accessibility <> Accessibility.NotApplicable Then
2543If declaration.Kind = SyntaxKind.FieldDeclaration AndAlso accessibility = Accessibility.NotApplicable AndAlso newTokens.Count = 0 Then
3211Public Overrides Function EventDeclaration(name As String, type As SyntaxNode, Optional accessibility As Accessibility = Accessibility.NotApplicable, Optional modifiers As DeclarationModifiers = Nothing) As SyntaxNode
3225Optional accessibility As Accessibility = Accessibility.NotApplicable,
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (20)
CodeGeneration\SyntaxGeneratorTests.vb (20)
1181Generator.GetAccessorDeclaration(Accessibility.NotApplicable, {Generator.ReturnStatement()})),
1191Generator.GetAccessorDeclaration(Accessibility.NotApplicable, {Generator.ReturnStatement()}),
1192Generator.SetAccessorDeclaration(Accessibility.NotApplicable, {Generator.ReturnStatement()})),
1501members:={Generator.ConstructorDeclaration(accessibility:=Accessibility.NotApplicable, modifiers:=DeclarationModifiers.None)}),
2648Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.ParameterDeclaration("p")))
2652Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.EnumMember("v")))
2655Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceDeclaration("n")))
2656Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.NamespaceImportDeclaration("u")))
2657Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc")))
2658Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.Attribute("a")))
2659Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(SyntaxFactory.TypeParameter("tp")))
2676Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.ParameterDeclaration("p"), Accessibility.Private)))
2680Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.EnumMember("v"), Accessibility.Private)))
2683Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceDeclaration("n"), Accessibility.Private)))
2684Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.NamespaceImportDeclaration("u"), Accessibility.Private)))
2685Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.LocalDeclarationStatement(Generator.IdentifierName("t"), "loc"), Accessibility.Private)))
2686Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(Generator.Attribute("a"), Accessibility.Private)))
2687Assert.Equal(Accessibility.NotApplicable, Generator.GetAccessibility(Generator.WithAccessibility(SyntaxFactory.TypeParameter("tp"), Accessibility.Private)))
3066Assert.Equal(Accessibility.NotApplicable, _g.GetAccessibility(getAccessor))
3071Assert.Equal(Accessibility.NotApplicable, _g.GetAccessibility(setAccessor))
Microsoft.CodeAnalysis.Workspaces (28)
Editing\SyntaxGenerator.cs (19)
124Accessibility accessibility = Accessibility.NotApplicable,
165Accessibility accessibility = Accessibility.NotApplicable,
259Accessibility accessibility = Accessibility.NotApplicable,
271Accessibility accessibility = Accessibility.NotApplicable,
355Accessibility accessibility = Accessibility.NotApplicable,
378getAccessor = GetAccessorDeclaration(getMethodAccessibility < propertyAccessibility ? getMethodAccessibility : Accessibility.NotApplicable, getAccessorStatements);
385setMethodAccessibility < propertyAccessibility ? setMethodAccessibility : Accessibility.NotApplicable,
421Accessibility accessibility = Accessibility.NotApplicable,
425Accessibility accessibility = Accessibility.NotApplicable,
438Accessibility accessibility = Accessibility.NotApplicable,
484Accessibility accessibility = Accessibility.NotApplicable,
513Accessibility accessibility = Accessibility.NotApplicable,
546Accessibility accessibility = Accessibility.NotApplicable,
602Accessibility accessibility = Accessibility.NotApplicable,
628Accessibility accessibility = Accessibility.NotApplicable,
652Accessibility accessibility = Accessibility.NotApplicable,
672Accessibility accessibility = Accessibility.NotApplicable,
682Accessibility accessibility = Accessibility.NotApplicable,
699Accessibility accessibility = Accessibility.NotApplicable,
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
EditorConfigParsing\NamingStyleParserTests.cs (6)
107accessibility => Assert.Equal(Accessibility.NotApplicable, accessibility),
145accessibility => Assert.Equal(Accessibility.NotApplicable, accessibility),
229accessibility => Assert.Equal(Accessibility.NotApplicable, accessibility),
265accessibility => Assert.Equal(Accessibility.NotApplicable, accessibility),
303accessibility => Assert.Equal(Accessibility.NotApplicable, accessibility),
339accessibility => Assert.Equal(Accessibility.NotApplicable, accessibility),
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Gen.Logging (2)
Microsoft.Gen.Metrics (1)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (1)
Microsoft.VisualStudio.LanguageServices (4)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions.Generator (1)