22 references to File
Microsoft.CodeAnalysis.CSharp (10)
Compilation\CSharpCompilation.cs (1)
1274
return ReferenceDirectiveMap.TryGetValue((directive.SyntaxTree.FilePath, directive.
File
.ValueText), out reference) ? reference : null;
Declarations\DeclarationTreeBuilder.cs (3)
307
d => !d.
File
.ContainsDiagnostics && !string.IsNullOrEmpty(d.
File
.ValueText));
316
directives.Add(new ReferenceDirective(directiveNode.
File
.ValueText, new SourceLocation(directiveNode)));
Syntax.xml.Main.Generated.cs (1)
2233
=> node.Update(VisitToken(node.HashToken), VisitToken(node.ReferenceKeyword), VisitToken(node.
File
), VisitToken(node.EndOfDirectiveToken), node.IsActive);
Syntax.xml.Syntax.Generated.cs (5)
16529
if (hashToken != this.HashToken || referenceKeyword != this.ReferenceKeyword || file != this.
File
|| endOfDirectiveToken != this.EndOfDirectiveToken)
16540
public new ReferenceDirectiveTriviaSyntax WithHashToken(SyntaxToken hashToken) => Update(hashToken, this.ReferenceKeyword, this.
File
, this.EndOfDirectiveToken, this.IsActive);
16541
public ReferenceDirectiveTriviaSyntax WithReferenceKeyword(SyntaxToken referenceKeyword) => Update(this.HashToken, referenceKeyword, this.
File
, this.EndOfDirectiveToken, this.IsActive);
16544
public new ReferenceDirectiveTriviaSyntax WithEndOfDirectiveToken(SyntaxToken endOfDirectiveToken) => Update(this.HashToken, this.ReferenceKeyword, this.
File
, endOfDirectiveToken, this.IsActive);
16545
public ReferenceDirectiveTriviaSyntax WithIsActive(bool isActive) => Update(this.HashToken, this.ReferenceKeyword, this.
File
, this.EndOfDirectiveToken, isActive);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Generated\Syntax.Test.xml.Generated.cs (2)
14221
Assert.Equal(SyntaxKind.StringLiteralToken, node.
File
.Kind());
14224
var newNode = node.WithHashToken(node.HashToken).WithReferenceKeyword(node.ReferenceKeyword).WithFile(node.
File
).WithEndOfDirectiveToken(node.EndOfDirectiveToken).WithIsActive(node.IsActive);
LexicalAndXml\PreprocessorTests.cs (1)
218
Assert.Equal(exp.Text, ((ReferenceDirectiveTriviaSyntax)dt).
File
.ValueText);
Syntax\StructuredTriviaTests.cs (8)
111
Assert.Equal("ref0", directives[0].
File
.Value);
112
Assert.Equal("ref1", directives[1].
File
.Value);
113
Assert.Equal("ref2", directives[2].
File
.Value);
125
Assert.Equal("ref0", directives[0].
File
.Value);
149
Assert.True(directives[0].
File
.IsMissing);
150
Assert.False(directives[1].
File
.IsMissing);
151
Assert.Equal("", directives[1].
File
.Value);
152
Assert.Equal("a", directives[2].
File
.Value);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Classification\Worker_Preprocesser.cs (1)
319
AddClassification(node.
File
, ClassificationTypeNames.StringLiteral);