147 references to PartialKeyword
Microsoft.AspNetCore.App.Analyzers (1)
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
42&& modifiers.Any(SyntaxKind.PartialKeyword)
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
124if (modifier.IsKind(SyntaxKind.PartialKeyword))
HubServerProxyGenerator.Parser.cs (1)
114if (modifier.IsKind(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.CSharp (17)
Parser\LanguageParser.cs (9)
878if (this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword) 1326case SyntaxKind.PartialKeyword: 1335case SyntaxKind.PartialKeyword: 1415(next.ContextualKind == SyntaxKind.PartialKeyword && 1515(this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword)) 1614Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword); 1655Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword); 2920this.CurrentToken.ContextualKind is not (SyntaxKind.PartialKeyword or SyntaxKind.AsyncKeyword or SyntaxKind.RequiredKeyword or SyntaxKind.FileKeyword) && 5757if (this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword)
Symbols\Source\ModifierUtils.cs (3)
133var partialToken = modifierTokens.Value.FirstOrDefault(SyntaxKind.PartialKeyword); 308return SyntaxFacts.GetText(SyntaxKind.PartialKeyword); 358case SyntaxKind.PartialKeyword:
Symbols\Source\SourceMemberContainerSymbol.cs (1)
2815!ContainsModifier(propertyDecl.Modifiers, SyntaxKind.PartialKeyword) &&
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
42return explicitInterfaceType is null && !syntax.Modifiers.Any(SyntaxKind.PartialKeyword) && syntax.Arity == 0
Syntax\SyntaxKindFacts.cs (3)
1185case SyntaxKind.PartialKeyword: 1267return SyntaxKind.PartialKeyword; 1707case SyntaxKind.PartialKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (9)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
65public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
103case SyntaxKind.PartialKeyword: 115if (token.HasMatchingText(SyntaxKind.PartialKeyword)) 117modifierKind = SyntaxKind.PartialKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
236modifiers.Any(SyntaxKind.PartialKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
77if (method.Modifiers.Any(SyntaxKind.PartialKeyword)) 140SyntaxKind.PartialKeyword => DeclarationModifiers.Partial,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
37if (typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
284token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 575token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 696token.GetPreviousToken().IsKind(SyntaxKind.PartialKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
75if (typeNode.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
299if (method.Modifiers.Any(SyntaxKind.PartialKeyword) && method.Body is null)
Microsoft.CodeAnalysis.CSharp.Features (16)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
592case SyntaxKind.PartialKeyword:
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
60identifierName.Identifier.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword))
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (5)
85return declarations.Any(d => d.Body == null && d.Modifiers.Any(SyntaxKind.PartialKeyword)); 98if (targetToken.Kind() is SyntaxKind.VoidKeyword or SyntaxKind.PartialKeyword || 99(targetToken.Kind() == SyntaxKind.IdentifierToken && targetToken.HasMatchingText(SyntaxKind.PartialKeyword))) 113var foundPartial = touchingToken.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword); 123foundPartial = foundPartial || token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword);
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
76=> syntax is BaseTypeDeclarationSyntax declarationSyntax && declarationSyntax.Modifiers.Any(SyntaxKind.PartialKeyword);
Completion\KeywordRecommenders\AsyncKeywordRecommender.cs (1)
28if (context.TargetToken.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword) ||
Completion\KeywordRecommenders\PartialKeywordRecommender.cs (2)
25: base(SyntaxKind.PartialKeyword) 45if (!decl.Modifiers.Any(t => t.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)))
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
66declaration.Modifiers.Any(SyntaxKind.PartialKeyword);
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (1)
37[t => t.Kind() == SyntaxKind.PartialKeyword, t => GetOrdering(t)];
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
77targetPosition = targetToken.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword) ? targetToken.SpanStart : targetPosition;
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
37if (typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.cs (1)
4057.Where(static (node) => node.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (47)
Parsing\AsyncParsingTests.cs (2)
1498N(SyntaxKind.PartialKeyword); 2041N(SyntaxKind.PartialKeyword);
Parsing\DeclarationParsingTests.cs (2)
945Assert.Equal(SyntaxKind.PartialKeyword, cs.Modifiers[0].Kind()); 2765Assert.Equal(SyntaxKind.PartialKeyword, ms.Modifiers[0].Kind());
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (13)
567N(SyntaxKind.PartialKeyword); 743N(SyntaxKind.PartialKeyword); 769N(SyntaxKind.PartialKeyword); 832N(SyntaxKind.PartialKeyword); 1034N(SyntaxKind.PartialKeyword); 2960N(SyntaxKind.PartialKeyword); 3041N(SyntaxKind.PartialKeyword); 3158N(SyntaxKind.PartialKeyword); 3358N(SyntaxKind.PartialKeyword); 3616N(SyntaxKind.PartialKeyword); 3697N(SyntaxKind.PartialKeyword); 3814N(SyntaxKind.PartialKeyword); 4001N(SyntaxKind.PartialKeyword);
Parsing\FileModifierParsingTests.cs (5)
83N(SyntaxKind.PartialKeyword); 111N(SyntaxKind.PartialKeyword); 197N(SyntaxKind.PartialKeyword); 220N(SyntaxKind.PartialKeyword); 248N(SyntaxKind.PartialKeyword);
Parsing\NullableParsingTests.cs (1)
1338N(SyntaxKind.PartialKeyword);
Parsing\ParsingErrorRecoveryTests.cs (1)
6940Assert.Equal(SyntaxKind.PartialKeyword, subitem2.Modifiers[0].ContextualKind());
Parsing\RecordParsing.cs (6)
3546N(SyntaxKind.PartialKeyword); 3567N(SyntaxKind.PartialKeyword); 3588N(SyntaxKind.PartialKeyword); 3608N(SyntaxKind.PartialKeyword); 3642N(SyntaxKind.PartialKeyword); 3699N(SyntaxKind.PartialKeyword);
Parsing\ScriptParsingTests.cs (15)
693N(SyntaxKind.PartialKeyword); 722N(SyntaxKind.PartialKeyword); 751N(SyntaxKind.PartialKeyword); 918N(SyntaxKind.PartialKeyword); 1030N(SyntaxKind.PartialKeyword); 1058N(SyntaxKind.PartialKeyword); 1088N(SyntaxKind.PartialKeyword); 1572N(SyntaxKind.PartialKeyword); 1921N(SyntaxKind.PartialKeyword); 2085N(SyntaxKind.PartialKeyword); 2104N(SyntaxKind.PartialKeyword); 2135N(SyntaxKind.PartialKeyword); 2181N(SyntaxKind.PartialKeyword); 2200N(SyntaxKind.PartialKeyword); 2231N(SyntaxKind.PartialKeyword);
Parsing\StatementParsingTests.cs (1)
3334TestContextualKeywordAsLocalVariableType(SyntaxKind.PartialKeyword);
Parsing\TopLevelStatementsParsingTests.cs (1)
1016N(SyntaxKind.PartialKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (23)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (11)
214if (typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword) && 227typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword), 257enumDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword), 285ctorDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 301delegateDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 315enumMember.Modifiers.Any(SyntaxKind.PartialKeyword), 329eventDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 343indexerDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 358method.Modifiers.Any(SyntaxKind.PartialKeyword), 374property.Modifiers.Any(SyntaxKind.PartialKeyword), 397fieldDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
65public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
103case SyntaxKind.PartialKeyword: 115if (token.HasMatchingText(SyntaxKind.PartialKeyword)) 117modifierKind = SyntaxKind.PartialKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
236modifiers.Any(SyntaxKind.PartialKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
77if (method.Modifiers.Any(SyntaxKind.PartialKeyword)) 140SyntaxKind.PartialKeyword => DeclarationModifiers.Partial,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
284token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 575token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 696token.GetPreviousToken().IsKind(SyntaxKind.PartialKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
75if (typeNode.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.cs (1)
756yield return CS.SyntaxFactory.Token(CS.SyntaxKind.PartialKeyword);
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
286if (mod.IsKind(SyntaxKind.PartialKeyword))
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
54if (!type.Definitions.Any(def => def.Modifiers.Any(static token => token.IsKind(SyntaxKind.PartialKeyword))))
Microsoft.Gen.Logging.Unit.Tests (2)
ParserUtilitiesTests.cs (2)
24SyntaxFactory.Token(SyntaxKind.PartialKeyword)), 62SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.PartialKeyword)),
Microsoft.Interop.ComInterfaceGenerator (4)
ComInterfaceGenerator.cs (1)
479.WithModifiers(TokenList(Token(SyntaxKind.FileKeyword), Token(SyntaxKind.UnsafeKeyword), Token(SyntaxKind.PartialKeyword)));
VtableIndexStubGenerator.cs (3)
30TokenList(Token(SyntaxKind.InternalKeyword), Token(SyntaxKind.PartialKeyword)), 406if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword)) 431.WithModifiers(TokenList(Token(SyntaxKind.InternalKeyword), Token(SyntaxKind.PartialKeyword)))
Microsoft.Interop.JavaScript.JSImportGenerator (4)
JSExportGenerator.cs (2)
342|| methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword)) 350if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword))
JSImportGenerator.cs (2)
221|| !methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword)) 229if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
548|| !methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
418|| !methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.Interop.SourceGeneration (2)
SyntaxExtensions.cs (2)
106int idxPartial = modifiers.IndexOf(SyntaxKind.PartialKeyword); 124if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.VisualStudio.LanguageServices.CSharp (4)
CodeModel\CSharpCodeModelService.cs (1)
3596=> methodDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword);
CodeModel\ModifierFlagsExtensions.cs (2)
35{ ModifierFlags.Partial, SyntaxKind.PartialKeyword } 94case SyntaxKind.PartialKeyword:
LanguageService\CSharpHelpContextService.cs (1)
384case SyntaxKind.PartialKeyword:
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
182isPartialType |= modifier.IsKind(SyntaxKind.PartialKeyword);
System.Text.RegularExpressions.Generator (3)
RegexGenerator.Parser.cs (1)
130if (!memberSyntax.Modifiers.Any(SyntaxKind.PartialKeyword) || // TODO: Switch to using regexPropertySymbol.IsPartialDefinition when available
UpgradeToGeneratedRegexCodeFixer.cs (2)
130if (!typeDeclaration.Modifiers.Any(m => m.IsKind(SyntaxKind.PartialKeyword))) 133return typeDeclaration.AddModifiers(SyntaxFactory.Token(SyntaxKind.PartialKeyword));