119 references to PartialKeyword
EventSourceGenerator (1)
EventSourceGenerator.Parser.cs (1)
48if (modifier.IsKind(SyntaxKind.PartialKeyword))
Microsoft.AspNetCore.App.Analyzers (1)
WebApplicationBuilder\PublicPartialProgramClassAnalyzer.cs (1)
43&& 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 (19)
Parser\LanguageParser.cs (9)
886if (this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword) 1334case SyntaxKind.PartialKeyword: 1343case SyntaxKind.PartialKeyword: 1427(next.ContextualKind == SyntaxKind.PartialKeyword && 1567(this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword)) 1666Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword); 1702Debug.Assert(this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword); 3037this.CurrentToken.ContextualKind is not (SyntaxKind.PartialKeyword or SyntaxKind.AsyncKeyword or SyntaxKind.RequiredKeyword or SyntaxKind.FileKeyword or SyntaxKind.ClosedKeyword or SyntaxKind.SafeKeyword) && 6140if (this.CurrentToken.ContextualKind == SyntaxKind.PartialKeyword)
Symbols\Source\ModifierUtils.cs (4)
142var partialToken = modifierTokens.Value.FirstOrDefault(SyntaxKind.PartialKeyword); 341return SyntaxFacts.GetText(SyntaxKind.PartialKeyword); 395case SyntaxKind.PartialKeyword: 462var i = modifiers.IndexOf(SyntaxKind.PartialKeyword);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3234!ContainsModifier(propertyDecl.Modifiers, SyntaxKind.PartialKeyword) &&
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
43return explicitInterfaceType is null && !syntax.Modifiers.Any(SyntaxKind.PartialKeyword) && syntax.Arity == 0 742if (this.ReturnType?.IsErrorType() == true && GetSyntax().ReturnType is IdentifierNameSyntax { Identifier.RawContextualKind: (int)SyntaxKind.PartialKeyword })
Syntax\SyntaxKindFacts.cs (3)
1256case SyntaxKind.PartialKeyword: 1342return SyntaxKind.PartialKeyword; 1790case SyntaxKind.PartialKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\roslyn\src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (1)
86containingPropertyDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
76public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
105case SyntaxKind.PartialKeyword: 123if (token.HasMatchingText(SyntaxKind.PartialKeyword)) 125modifierKind = SyntaxKind.PartialKeyword;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
245modifiers.Any(SyntaxKind.PartialKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
72if (method.Modifiers.Any(SyntaxKind.PartialKeyword)) 135SyntaxKind.PartialKeyword => Modifiers.Partial,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
74public int PartialKeyword => (int)SyntaxKind.PartialKeyword;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
37if (typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword))
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
192var partialModifier = modifiers.FirstOrDefault(static m => m.IsKind(SyntaxKind.PartialKeyword));
src\roslyn\src\Analyzers\CSharp\CodeFixes\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorCodeFixProvider.cs (1)
52containingProperty.Modifiers.Any(SyntaxKind.PartialKeyword) &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
285token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 576token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 704token.GetPreviousToken().IsKind(SyntaxKind.PartialKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
74if (typeNode.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.CSharp.Features (20)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
670case SyntaxKind.PartialKeyword:
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
59identifierName.Identifier.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword))
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (5)
79return declarations.Any(d => d.Body == null && d.Modifiers.Any(SyntaxKind.PartialKeyword)); 92if (targetToken.Kind() is SyntaxKind.VoidKeyword or SyntaxKind.PartialKeyword || 93(targetToken.Kind() == SyntaxKind.IdentifierToken && targetToken.HasMatchingText(SyntaxKind.PartialKeyword))) 107var foundPartial = touchingToken.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword); 117foundPartial = foundPartial || token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword);
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
73=> syntax is BaseTypeDeclarationSyntax declarationSyntax && declarationSyntax.Modifiers.Any(SyntaxKind.PartialKeyword);
Completion\KeywordRecommenders\AsyncKeywordRecommender.cs (1)
23if (context.TargetToken.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword) ||
Completion\KeywordRecommenders\PartialKeywordRecommender.cs (2)
15internal sealed class PartialKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.PartialKeyword) 37if (!decl.Modifiers.Any(t => t.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)))
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
66declaration.Modifiers.Any(SyntaxKind.PartialKeyword);
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
983|| ((BaseTypeDeclarationSyntax)syntaxRefs.Single().GetSyntax()).Modifiers.Any(SyntaxKind.PartialKeyword);
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (1)
37[t => t.Kind() == SyntaxKind.PartialKeyword, t => GetOrdering(t)];
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
79targetPosition = targetToken.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword) ? targetToken.SpanStart : targetPosition;
src\roslyn\src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersHelper.cs (1)
31parsed[(int)SyntaxKind.PartialKeyword] = int.MaxValue;
src\roslyn\src\Analyzers\CSharp\Analyzers\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorDiagnosticAnalyzer.cs (1)
86containingPropertyDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword) &&
src\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
37if (typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword))
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
192var partialModifier = modifiers.FirstOrDefault(static m => m.IsKind(SyntaxKind.PartialKeyword));
src\roslyn\src\Analyzers\CSharp\CodeFixes\SimplifyPropertyAccessor\CSharpSimplifyPropertyAccessorCodeFixProvider.cs (1)
52containingProperty.Modifiers.Any(SyntaxKind.PartialKeyword) &&
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (11)
210if (typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword) && 229typeDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword), 251enumDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword), 279ctorDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 295delegateDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 309enumMember.Modifiers.Any(SyntaxKind.PartialKeyword), 323eventDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 337indexerDecl.Modifiers.Any(SyntaxKind.PartialKeyword), 352method.Modifiers.Any(SyntaxKind.PartialKeyword), 368property.Modifiers.Any(SyntaxKind.PartialKeyword), 391fieldDeclaration.Modifiers.Any(SyntaxKind.PartialKeyword),
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
76public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
105case SyntaxKind.PartialKeyword: 123if (token.HasMatchingText(SyntaxKind.PartialKeyword)) 125modifierKind = SyntaxKind.PartialKeyword;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
245modifiers.Any(SyntaxKind.PartialKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
72if (method.Modifiers.Any(SyntaxKind.PartialKeyword)) 135SyntaxKind.PartialKeyword => Modifiers.Partial,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
74public int PartialKeyword => (int)SyntaxKind.PartialKeyword;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
285token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 576token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 704token.GetPreviousToken().IsKind(SyntaxKind.PartialKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
74if (typeNode.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Intermediate\CommonModifiers.cs (1)
63GetText(CSharpSyntaxKind.PartialKeyword)];
Microsoft.Diagnostics.DataContractReader.DataGenerator (1)
Parser.cs (1)
77isPartial = cds.Modifiers.Any(m => m.IsKind(Microsoft.CodeAnalysis.CSharp.SyntaxKind.PartialKeyword));
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
298if (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 (3)
Analyzers\VtableIndexStubDiagnosticsAnalyzer.cs (1)
122if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword))
ComInterfaceGenerator.cs (1)
366new SyntaxTokenList(syntax.Modifiers.Where(static m => !m.IsKind(SyntaxKind.NewKeyword) && !m.IsKind(SyntaxKind.PartialKeyword) && !m.IsKind(SyntaxKind.VirtualKeyword))).StripAccessibilityModifiers(),
VtableIndexStubGenerator.cs (1)
347var methodSyntaxTemplate = new ContainingSyntax(new SyntaxTokenList(syntax.Modifiers.Where(static m => !m.IsKind(SyntaxKind.PartialKeyword) && !m.IsKind(SyntaxKind.VirtualKeyword))).StripAccessibilityModifiers(), SyntaxKind.MethodDeclaration, syntax.Identifier, syntax.TypeParameterList);
Microsoft.Interop.JavaScript.JSImportGenerator (1)
Analyzers\JSImportExportDiagnosticsAnalyzer.cs (1)
157bool isPartial = methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\LibraryImportDiagnosticsAnalyzer.cs (1)
325|| !methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportDiagnosticsAnalyzer.cs (1)
329|| !methodSyntax.Modifiers.Any(SyntaxKind.PartialKeyword))
Microsoft.Interop.SourceGeneration (2)
SyntaxExtensions.cs (2)
106int idxPartial = modifiers.IndexOf(SyntaxKind.PartialKeyword); 124if (!typeDecl.Modifiers.Any(SyntaxKind.PartialKeyword))
Roslyn.Diagnostics.CSharp.Analyzers (13)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
76public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (3)
105case SyntaxKind.PartialKeyword: 123if (token.HasMatchingText(SyntaxKind.PartialKeyword)) 125modifierKind = SyntaxKind.PartialKeyword;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
20((IdentifierNameSyntax)typeSyntax).Identifier.IsKind(SyntaxKind.PartialKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
245modifiers.Any(SyntaxKind.PartialKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
72if (method.Modifiers.Any(SyntaxKind.PartialKeyword)) 135SyntaxKind.PartialKeyword => Modifiers.Partial,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
74public int PartialKeyword => (int)SyntaxKind.PartialKeyword;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (3)
285token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 576token.IsKindOrHasMatchingText(SyntaxKind.PartialKeyword)) 704token.GetPreviousToken().IsKind(SyntaxKind.PartialKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (1)
74if (typeNode.Modifiers.Any(SyntaxKind.PartialKeyword))
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
203isPartialType |= modifier.IsKind(SyntaxKind.PartialKeyword);
System.Text.RegularExpressions.Generator (6)
RegexGenerator.Parser.cs (1)
130if (!memberSyntax.Modifiers.Any(SyntaxKind.PartialKeyword) || // TODO: Switch to using regexPropertySymbol.IsPartialDefinition when available
UpgradeToGeneratedRegexCodeFixer.cs (5)
178SyntaxFactory.Token(SyntaxKind.PartialKeyword))) 222SyntaxFactory.Token(SyntaxKind.PartialKeyword) 268.WithModifiers(SyntaxFactory.TokenList([.. propertyDeclaration.Modifiers, SyntaxFactory.Token(SyntaxKind.PartialKeyword)])) 367typeDeclaration.Modifiers.Any(m => m.IsKind(SyntaxKind.PartialKeyword)) ? 369typeDeclaration.AddModifiers(SyntaxFactory.Token(SyntaxKind.PartialKeyword)));