217 references to StaticKeyword
EventSourceGenerator (1)
EventSourceGenerator.Parser.cs (1)
77if (ctorModifier.IsKind(SyntaxKind.StaticKeyword))
Microsoft.CodeAnalysis.CSharp (39)
_generated\0\Syntax.xml.Main.Generated.cs (1)
4831case SyntaxKind.StaticKeyword:
_generated\1\Syntax.xml.Internal.Generated.cs (2)
31808case SyntaxKind.StaticKeyword: 37235case SyntaxKind.StaticKeyword:
Binder\Binder_Lambda.cs (1)
116else if (modifier.IsKind(SyntaxKind.StaticKeyword))
Binder\Binder_Statements.cs (1)
602if (modifier.IsKind(SyntaxKind.StaticKeyword))
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
464return (baseMethodDeclarationSyntax.Modifiers.Any(SyntaxKind.StaticKeyword) ? WellKnownMemberNames.StaticConstructorName : WellKnownMemberNames.InstanceConstructorName);
Compilation\SyntaxTreeSemanticModel.cs (1)
1699if (((ConstructorDeclarationSyntax)declaration).Modifiers.Any(SyntaxKind.StaticKeyword))
Declarations\DeclarationTreeBuilder.cs (2)
792if (modifier.IsKind(SyntaxKind.StaticKeyword) && kind == DeclarationKind.Class) 1235set.Add(((Syntax.InternalSyntax.ConstructorDeclarationSyntax)member).Modifiers.Any((int)SyntaxKind.StaticKeyword)
Lowering\Instrumentation\DebugInfoInjector.cs (1)
68if (ctorDecl.Modifiers.Any(SyntaxKind.StaticKeyword))
Parser\LanguageParser.cs (20)
353case SyntaxKind.StaticKeyword: 972var staticToken = this.TryEatToken(SyntaxKind.StaticKeyword); 976if (staticToken is null && unsafeToken != null && this.CurrentToken.Kind == SyntaxKind.StaticKeyword) 979staticToken = SyntaxFactory.MissingToken(SyntaxKind.StaticKeyword); 1318case SyntaxKind.StaticKeyword: 2459case SyntaxKind.StaticKeyword: 8714if (tk != SyntaxKind.StaticKeyword) // For `static` we still need to make sure we have a typed identifier after it, because `using static type;` is a valid using directive. 8734if (tk == SyntaxKind.StaticKeyword) 9292case SyntaxKind.StaticKeyword: 10914case SyntaxKind.StaticKeyword: 10927case SyntaxKind.StaticKeyword: 11004case SyntaxKind.StaticKeyword: 11171case SyntaxKind.StaticKeyword: 12017case SyntaxKind.StaticKeyword: 12324while (this.PeekToken(tokenIndex).Kind == SyntaxKind.StaticKeyword || 13118if (this.CurrentToken.Kind == SyntaxKind.StaticKeyword) 13124this.PeekToken(1).Kind == SyntaxKind.StaticKeyword) 13817if (this.CurrentToken.Kind == SyntaxKind.StaticKeyword) 13819modifiers.Add(this.EatToken(SyntaxKind.StaticKeyword)); 13844case SyntaxKind.StaticKeyword:
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
942AddKeyword(SyntaxKind.StaticKeyword);
Symbols\Source\ModifierUtils.cs (2)
317return SyntaxFacts.GetText(SyntaxKind.StaticKeyword); 379case SyntaxKind.StaticKeyword:
Symbols\Source\SourceConstructorSymbol.cs (1)
26var methodKind = syntax.Modifiers.Any(SyntaxKind.StaticKeyword) ? MethodKind.StaticConstructor : MethodKind.Constructor;
Symbols\Source\SourceMemberContainerSymbol.cs (3)
3225!ContainsModifier(fieldDecl.Modifiers, SyntaxKind.StaticKeyword) && 3231!ContainsModifier(propertyDecl.Modifiers, SyntaxKind.StaticKeyword) && 3241!ContainsModifier(eventFieldDecl.Modifiers, SyntaxKind.StaticKeyword) &&
Syntax\SyntaxKindFacts.cs (2)
969return SyntaxKind.StaticKeyword; 1670case SyntaxKind.StaticKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (19)
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
58if (!methodDeclaration.Modifiers.Any(SyntaxKind.StaticKeyword) || 135if (!member.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
46if (anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
38if (localFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
75if (anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
96public static readonly SyntaxToken StaticKeyword = Token(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
164SyntaxKind.StaticKeyword,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
345case LocalFunctionStatementSyntax localFunction when localFunction.Modifiers.Any(SyntaxKind.StaticKeyword): 348case AnonymousFunctionExpressionSyntax anonymousFunction when anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword): 352return current.GetModifiers().Any(SyntaxKind.StaticKeyword); 355return property.Modifiers.Any(SyntaxKind.StaticKeyword) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
91case SyntaxKind.StaticKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
301if (usingDirective.StaticKeyword.IsKind(SyntaxKind.StaticKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
50return ignoreDeclarationModifiers || !((ConstructorDeclarationSyntax)declaration).Modifiers.Any(SyntaxKind.StaticKeyword); 129SyntaxKind.StaticKeyword => Modifiers.Static,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
23x.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword && 24y.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
71var directive1IsUsingStatic = using1.StaticKeyword.IsKind(SyntaxKind.StaticKeyword); 72var directive2IsUsingStatic = using2.StaticKeyword.IsKind(SyntaxKind.StaticKeyword);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (10)
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeTypeAbstract\CSharpMakeTypeAbstractCodeFixProvider.cs (1)
51!enclosingType.Modifiers.Any(SyntaxKind.AbstractKeyword) && !enclosingType.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
378=> BothHaveModifier(x, y, SyntaxKind.StaticKeyword, out comparisonResult);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (2)
41if (token is { RawKind: (int)SyntaxKind.StaticKeyword, Parent: UsingDirectiveSyntax }) 48token.GetPreviousToken() is { RawKind: (int)SyntaxKind.StaticKeyword, Parent: UsingDirectiveSyntax })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
24SyntaxKind.StaticKeyword, 1226method.Modifiers.Any(SyntaxKind.StaticKeyword) && 1227typeDecl.Modifiers.Any(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (3)
24SyntaxKind.StaticKeyword, 44SyntaxKind.StaticKeyword, 59SyntaxKind.StaticKeyword,
Microsoft.CodeAnalysis.CSharp.Features (69)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
640case SyntaxKind.StaticKeyword:
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
123while (tokenBeforeType.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.StaticKeyword)
Completion\KeywordRecommenders\AbstractKeywordRecommender.cs (1)
32SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\AsyncKeywordRecommender.cs (2)
17SyntaxKind.StaticKeyword, 30|| context.SyntaxTree.IsLambdaDeclarationContext(position, otherModifier: SyntaxKind.StaticKeyword, cancellationToken)
Completion\KeywordRecommenders\BaseKeywordRecommender.cs (1)
52if (constructor.Modifiers.Any(SyntaxKind.StaticKeyword))
Completion\KeywordRecommenders\ClassKeywordRecommender.cs (1)
24SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\ClosedKeywordRecommender.cs (1)
17.Where(s => s is not (SyntaxKind.ClosedKeyword or SyntaxKind.AbstractKeyword or SyntaxKind.SealedKeyword or SyntaxKind.StaticKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.RefKeyword))
Completion\KeywordRecommenders\EventKeywordRecommender.cs (1)
22SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\ExplicitKeywordRecommender.cs (4)
16SyntaxKind.StaticKeyword, 24SyntaxKind.StaticKeyword, 39modifiers.Contains(SyntaxKind.StaticKeyword); 48modifiers.Contains(SyntaxKind.StaticKeyword);
Completion\KeywordRecommenders\ExtensionKeywordRecommender.cs (1)
22context.ContainingTypeDeclaration?.Modifiers.Any(SyntaxKind.StaticKeyword) is true &&
Completion\KeywordRecommenders\ExternKeywordRecommender.cs (3)
24SyntaxKind.StaticKeyword, 35SyntaxKind.StaticKeyword, 41SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\ImplicitKeywordRecommender.cs (4)
16SyntaxKind.StaticKeyword, 24SyntaxKind.StaticKeyword, 39modifiers.Contains(SyntaxKind.StaticKeyword); 48modifiers.Contains(SyntaxKind.StaticKeyword);
Completion\KeywordRecommenders\NewKeywordRecommender.cs (2)
27SyntaxKind.StaticKeyword, 41SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\ReadOnlyKeywordRecommender.cs (1)
23SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\RecordKeywordRecommender.cs (1)
24SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\RefKeywordRecommender.cs (3)
34SyntaxKind.StaticKeyword, 53SyntaxKind.StaticKeyword, 71SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\RequiredKeywordRecommender.cs (1)
16private static readonly ISet<SyntaxKind> s_validModifiers = SyntaxKindSet.AllMemberModifiers.Where(s => s is not (SyntaxKind.RequiredKeyword or SyntaxKind.StaticKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.ConstKeyword)).ToSet();
Completion\KeywordRecommenders\SealedKeywordRecommender.cs (1)
33SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\StaticKeywordRecommender.cs (1)
13internal sealed class StaticKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.StaticKeyword)
Completion\KeywordRecommenders\ThisKeywordRecommender.cs (1)
33!constructor.Modifiers.Any(SyntaxKind.StaticKeyword);
Completion\KeywordRecommenders\UnsafeKeywordRecommender.cs (5)
24SyntaxKind.StaticKeyword, 40SyntaxKind.StaticKeyword, 53SyntaxKind.StaticKeyword, 60SyntaxKind.StaticKeyword, 78(context.IsInImportsDirective && context.TargetToken.Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword);
Completion\KeywordRecommenders\VirtualKeywordRecommender.cs (1)
33SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\VoidKeywordRecommender.cs (1)
22SyntaxKind.StaticKeyword,
Completion\KeywordRecommenders\VolatileKeywordRecommender.cs (1)
22SyntaxKind.StaticKeyword,
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (1)
325var firstConstructorIndex = currentTypeDeclaration.Members.IndexOf(m => m is ConstructorDeclarationSyntax c && !c.Modifiers.Any(SyntaxKind.StaticKeyword));
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (2)
81if (!methodDeclaration.Modifiers.Any(SyntaxKind.StaticKeyword)) 84if (!classDeclaration.Modifiers.Any(SyntaxKind.StaticKeyword))
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
70if (!memberDeclaration.IsKind(SyntaxKind.GlobalStatement) && !memberDeclaration.GetModifiers().Any(SyntaxKind.StaticKeyword))
EditAndContinue\BreakpointSpans.cs (1)
454if (constructorSyntax.Modifiers.Any(SyntaxKind.StaticKeyword))
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
734nodeModifiers.Value.Any(SyntaxKind.StaticKeyword) != fieldOrPropertyModifiers.Value.Any(SyntaxKind.StaticKeyword)) 2063return ctor.Modifiers.Any(SyntaxKind.StaticKeyword) ? FeaturesResources.static_constructor : FeaturesResources.constructor;
EditAndContinue\SyntaxUtilities.cs (1)
46=> constructorDeclaration.Modifiers.Any(SyntaxKind.StaticKeyword)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
396return !memberDecl.Modifiers.Any(SyntaxKind.StaticKeyword);
GenerateType\CSharpGenerateTypeService.cs (1)
134if (usingDirectiveSyntax != null && usingDirectiveSyntax.StaticKeyword.Kind() != SyntaxKind.StaticKeyword)
IntroduceVariable\CSharpIntroduceVariableService.cs (1)
143return localFunction != null && localFunction.Modifiers.Any(SyntaxKind.StaticKeyword);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (2)
303if (localFunction is { Body: not null } && localFunction.Modifiers.Any(SyntaxKind.StaticKeyword)) 372if (localFunction != null && !localFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeRefactoringProvider.cs (1)
37if (localFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
Organizing\Organizers\MemberDeclarationsOrganizer.Comparer.cs (2)
91var xIsStatic = x.GetModifiers().Any(SyntaxKind.StaticKeyword); 92var yIsStatic = y.GetModifiers().Any(SyntaxKind.StaticKeyword);
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (1)
43case SyntaxKind.StaticKeyword:
Snippets\CSharpClassSnippetProvider.cs (1)
31SyntaxKind.StaticKeyword,
Snippets\CSharpConstructorSnippetProvider.cs (2)
36SyntaxKind.StaticKeyword, 46precedingModifiers.Count == 1 && precedingModifiers.Single() == SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (2)
58if (!methodDeclaration.Modifiers.Any(SyntaxKind.StaticKeyword) || 135if (!member.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeAnonymousFunctionStatic\MakeAnonymousFunctionStaticDiagnosticAnalyzer.cs (1)
46if (anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\MakeLocalFunctionStatic\MakeLocalFunctionStaticDiagnosticAnalyzer.cs (1)
38if (localFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryLambdaExpression\CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (1)
75if (anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeTypeAbstract\CSharpMakeTypeAbstractCodeFixProvider.cs (1)
51!enclosingType.Modifiers.Any(SyntaxKind.AbstractKeyword) && !enclosingType.Modifiers.Any(SyntaxKind.StaticKeyword))
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (2)
184if (node is LocalFunctionStatementSyntax localFunction && localFunction.Modifiers.Any(SyntaxKind.StaticKeyword)) 187if (node is AnonymousFunctionExpressionSyntax anonymousFunction && anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword))
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CSharpStaticHolderTypes.Fixer.cs (1)
76if (constructor.Modifiers.Any(m => m.IsKind(SyntaxKind.StaticKeyword)))
Microsoft.CodeQuality.Analyzers\QualityGuidelines\CSharpUseLiteralsWhereAppropriate.Fixer.cs (1)
35return syntaxToken.IsKind(SyntaxKind.StaticKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (28)
Classification\ClassificationHelpers.cs (1)
339return parentNode.GetModifiers().Any(SyntaxKind.StaticKeyword);
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (1)
486=> constructor.Modifiers.Any(SyntaxKind.StaticKeyword)
Recommendations\CSharpRecommendationServiceRunner.cs (3)
524AnonymousFunctionExpressionSyntax anonymousFunction => anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword), 525LocalFunctionStatementSyntax localFunction => localFunction.Modifiers.Any(SyntaxKind.StaticKeyword), 582return new RecommendedSymbols(usingDirective.StaticKeyword.IsKind(SyntaxKind.StaticKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
96public static readonly SyntaxToken StaticKeyword = Token(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
164SyntaxKind.StaticKeyword,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
345case LocalFunctionStatementSyntax localFunction when localFunction.Modifiers.Any(SyntaxKind.StaticKeyword): 348case AnonymousFunctionExpressionSyntax anonymousFunction when anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword): 352return current.GetModifiers().Any(SyntaxKind.StaticKeyword); 355return property.Modifiers.Any(SyntaxKind.StaticKeyword) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
91case SyntaxKind.StaticKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
301if (usingDirective.StaticKeyword.IsKind(SyntaxKind.StaticKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
50return ignoreDeclarationModifiers || !((ConstructorDeclarationSyntax)declaration).Modifiers.Any(SyntaxKind.StaticKeyword); 129SyntaxKind.StaticKeyword => Modifiers.Static,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
23x.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword && 24y.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
71var directive1IsUsingStatic = using1.StaticKeyword.IsKind(SyntaxKind.StaticKeyword); 72var directive2IsUsingStatic = using2.StaticKeyword.IsKind(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
378=> BothHaveModifier(x, y, SyntaxKind.StaticKeyword, out comparisonResult);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (2)
41if (token is { RawKind: (int)SyntaxKind.StaticKeyword, Parent: UsingDirectiveSyntax }) 48token.GetPreviousToken() is { RawKind: (int)SyntaxKind.StaticKeyword, Parent: UsingDirectiveSyntax })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
24SyntaxKind.StaticKeyword, 1226method.Modifiers.Any(SyntaxKind.StaticKeyword) && 1227typeDecl.Modifiers.Any(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (3)
24SyntaxKind.StaticKeyword, 44SyntaxKind.StaticKeyword, 59SyntaxKind.StaticKeyword,
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\Intermediate\CommonModifiers.cs (1)
24GetText(CSharpSyntaxKind.StaticKeyword)];
Language\Legacy\CSharpCodeParser.cs (2)
2470var atStaticOrGlobal = At(CSharpSyntaxKind.StaticKeyword, CSharpSyntaxKind.GlobalKeyword); 2590else if (At(CSharpSyntaxKind.StaticKeyword))
Language\Legacy\NativeCSharpTokenizer.cs (1)
76CSharpSyntaxKind.StaticKeyword,
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
302else if (mod.IsKind(SyntaxKind.StaticKeyword))
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
31.Where(modifier => modifier.IsKind(SyntaxKind.StaticKeyword))
Microsoft.Gen.Logging.Unit.Tests (1)
ParserUtilitiesTests.cs (1)
23SyntaxFactory.Token(SyntaxKind.StaticKeyword),
Microsoft.Interop.ComInterfaceGenerator (2)
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (1)
113|| methodSyntax.Modifiers.Any(SyntaxKind.StaticKeyword)
VirtualMethodPointerStubGenerator.cs (1)
167.WithModifiers(TokenList(Token(SyntaxKind.InternalKeyword), Token(SyntaxKind.StaticKeyword)))
Microsoft.Interop.JavaScript.JSImportGenerator (10)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (1)
163|| !methodSyntax.Modifiers.Any(SyntaxKind.StaticKeyword)
JSExportGenerator.cs (4)
121.WithModifiers(TokenList(new[] { Token(SyntaxKind.InternalKeyword), Token(SyntaxKind.StaticKeyword), Token(SyntaxKind.UnsafeKeyword) })) 211.WithModifiers(TokenList(Token(SyntaxKind.StaticKeyword))) 217.WithModifiers(TokenList(new[] { Token(SyntaxKind.StaticKeyword) })) 257Token(SyntaxKind.StaticKeyword),
JSImportGenerator.cs (1)
102.AddModifiers(Token(SyntaxKind.StaticKeyword));
Marshaling\FuncJSGenerator.cs (2)
94.WithModifiers(TokenList(Token(SyntaxKind.StaticKeyword))) 109.WithModifiers(TokenList(Token(SyntaxKind.StaticKeyword)))
Marshaling\TaskJSGenerator.cs (2)
75.WithModifiers(TokenList(Token(SyntaxKind.StaticKeyword))) 98.WithModifiers(TokenList(Token(SyntaxKind.StaticKeyword)))
Microsoft.Interop.LibraryImportGenerator (2)
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (1)
324|| !methodSyntax.Modifiers.Any(SyntaxKind.StaticKeyword)
LibraryImportGenerator.cs (1)
410Token(SyntaxKind.StaticKeyword),
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (1)
328|| !methodSyntax.Modifiers.Any(SyntaxKind.StaticKeyword)
DownlevelLibraryImportGenerator.cs (1)
355Token(SyntaxKind.StaticKeyword),
Microsoft.Maui.Controls.BindingSourceGen (1)
BindingSourceGenerator.cs (1)
181 if (!lambda.Modifiers.Any(SyntaxKind.StaticKeyword))
Roslyn.Diagnostics.CSharp.Analyzers (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
96public static readonly SyntaxToken StaticKeyword = Token(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\CSharpCodeStyleOptions.cs (1)
164SyntaxKind.StaticKeyword,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (4)
345case LocalFunctionStatementSyntax localFunction when localFunction.Modifiers.Any(SyntaxKind.StaticKeyword): 348case AnonymousFunctionExpressionSyntax anonymousFunction when anonymousFunction.Modifiers.Any(SyntaxKind.StaticKeyword): 352return current.GetModifiers().Any(SyntaxKind.StaticKeyword); 355return property.Modifiers.Any(SyntaxKind.StaticKeyword) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
91case SyntaxKind.StaticKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
301if (usingDirective.StaticKeyword.IsKind(SyntaxKind.StaticKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
50return ignoreDeclarationModifiers || !((ConstructorDeclarationSyntax)declaration).Modifiers.Any(SyntaxKind.StaticKeyword); 129SyntaxKind.StaticKeyword => Modifiers.Static,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
23x.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword && 24y.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (2)
71var directive1IsUsingStatic = using1.StaticKeyword.IsKind(SyntaxKind.StaticKeyword); 72var directive2IsUsingStatic = using2.StaticKeyword.IsKind(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
378=> BothHaveModifier(x, y, SyntaxKind.StaticKeyword, out comparisonResult);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (2)
41if (token is { RawKind: (int)SyntaxKind.StaticKeyword, Parent: UsingDirectiveSyntax }) 48token.GetPreviousToken() is { RawKind: (int)SyntaxKind.StaticKeyword, Parent: UsingDirectiveSyntax })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
24SyntaxKind.StaticKeyword, 1226method.Modifiers.Any(SyntaxKind.StaticKeyword) && 1227typeDecl.Modifiers.Any(SyntaxKind.StaticKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (3)
24SyntaxKind.StaticKeyword, 44SyntaxKind.StaticKeyword, 59SyntaxKind.StaticKeyword,
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexCodeFixer.cs (2)
177SyntaxFactory.Token(SyntaxKind.StaticKeyword), 220where modifier.Kind() is SyntaxKind.PublicKeyword or SyntaxKind.PrivateKeyword or SyntaxKind.ProtectedKeyword or SyntaxKind.InternalKeyword or SyntaxKind.StaticKeyword