30 references to SettingToken
Microsoft.CodeAnalysis.CSharp (9)
Syntax.xml.Main.Generated.cs (1)
2245=> node.Update(VisitToken(node.HashToken), VisitToken(node.NullableKeyword), VisitToken(node.SettingToken), VisitToken(node.TargetToken), VisitToken(node.EndOfDirectiveToken), node.IsActive);
Syntax.xml.Syntax.Generated.cs (6)
16750if (hashToken != this.HashToken || nullableKeyword != this.NullableKeyword || settingToken != this.SettingToken || targetToken != this.TargetToken || endOfDirectiveToken != this.EndOfDirectiveToken) 16761public new NullableDirectiveTriviaSyntax WithHashToken(SyntaxToken hashToken) => Update(hashToken, this.NullableKeyword, this.SettingToken, this.TargetToken, this.EndOfDirectiveToken, this.IsActive); 16762public NullableDirectiveTriviaSyntax WithNullableKeyword(SyntaxToken nullableKeyword) => Update(this.HashToken, nullableKeyword, this.SettingToken, this.TargetToken, this.EndOfDirectiveToken, this.IsActive); 16764public NullableDirectiveTriviaSyntax WithTargetToken(SyntaxToken targetToken) => Update(this.HashToken, this.NullableKeyword, this.SettingToken, targetToken, this.EndOfDirectiveToken, this.IsActive); 16766public new NullableDirectiveTriviaSyntax WithEndOfDirectiveToken(SyntaxToken endOfDirectiveToken) => Update(this.HashToken, this.NullableKeyword, this.SettingToken, this.TargetToken, endOfDirectiveToken, this.IsActive); 16767public NullableDirectiveTriviaSyntax WithIsActive(bool isActive) => Update(this.HashToken, this.NullableKeyword, this.SettingToken, this.TargetToken, this.EndOfDirectiveToken, isActive);
Syntax\NullableContextStateMap.cs (2)
148if (nn.SettingToken.IsMissing || !nn.IsActive) 154var setting = (nn.SettingToken.Kind()) switch
Microsoft.CodeAnalysis.CSharp.CodeStyle (5)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (5)
142if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 146else if (directive.SettingToken.IsKind(SyntaxKind.DisableKeyword)) 156if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 160else if (directive.SettingToken.IsKind(SyntaxKind.DisableKeyword)) 164else if (directive.SettingToken.IsKind(SyntaxKind.RestoreKeyword))
Microsoft.CodeAnalysis.CSharp.Features (11)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (6)
138if (originalNode.SettingToken.IsKind(SyntaxKind.DisableKeyword)) 144if (originalNode.SettingToken.IsKind(SyntaxKind.RestoreKeyword)) 146return rewrittenNode.WithSettingToken(DisableKeyword.WithTriviaFrom(rewrittenNode.SettingToken)); 149if (originalNode.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 151return rewrittenNode.WithSettingToken(RestoreKeyword.WithTriviaFrom(rewrittenNode.SettingToken)); 176else if (leadingDirective.SettingToken.IsKind(SyntaxKind.RestoreKeyword) && leadingDirective.TargetToken.IsKind(SyntaxKind.None))
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (5)
142if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 146else if (directive.SettingToken.IsKind(SyntaxKind.DisableKeyword)) 156if (directive.SettingToken.IsKind(SyntaxKind.EnableKeyword)) 160else if (directive.SettingToken.IsKind(SyntaxKind.DisableKeyword)) 164else if (directive.SettingToken.IsKind(SyntaxKind.RestoreKeyword))
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (4)
Generated\Syntax.Test.xml.Generated.cs (2)
14276Assert.Equal(SyntaxKind.EnableKeyword, node.SettingToken.Kind()); 14280var newNode = node.WithHashToken(node.HashToken).WithNullableKeyword(node.NullableKeyword).WithSettingToken(node.SettingToken).WithTargetToken(node.TargetToken).WithEndOfDirectiveToken(node.EndOfDirectiveToken).WithIsActive(node.IsActive);
LexicalAndXml\PreprocessorTests.cs (2)
257var setting = nn.SettingToken; 4567SyntaxToken token = nodes.OfType<NullableDirectiveTriviaSyntax>().Single().SettingToken;
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\Worker_Preprocesser.cs (1)
358AddClassification(node.SettingToken, ClassificationTypeNames.PreprocessorKeyword);