81 references to FilePath
Microsoft.AspNetCore.Razor.Language.UnitTests (29)
DefaultRazorIntermediateNodeLoweringPhaseIntegrationTest.cs (1)
178var expectedSourceLocation = new SourceSpan(codeDocument.Source.FilePath, 1, 0, 1, 12);
DefaultRazorProjectEngineIntegrationTest.cs (3)
74Assert.Equal("testvalue", import.FilePath); 100i => Assert.Equal("testvalue1", i.FilePath), 101i => Assert.Equal("testvalue2", i.FilePath));
DefaultRazorTagHelperBinderPhaseTest.cs (11)
605visitor.Initialize(tagHelpers: [], sourceDocument.FilePath); 756visitor.Initialize(tagHelpers, sourceDocument.FilePath); 859visitor.Initialize(tagHelpers, sourceDocument.FilePath); 936visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 968visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 1003visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 1041visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 1076visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 1112visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 1142visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace); 1179visitor.Initialize(tagHelpers, sourceDocument.FilePath, currentNamespace);
RazorProjectEngineTest.cs (1)
137Assert.Equal(existingItem.FilePath, sourceDocument.FilePath);
RazorSourceDocumentTest.cs (13)
23Assert.Equal("file.cshtml", document.FilePath); 37Assert.Equal("file.cshtml", document.FilePath); 52Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); 67Assert.Equal("file.cshtml", document.FilePath); 81Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); 96Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); 111Assert.Equal("filePath.cshtml", document.FilePath); 126Assert.Equal("filePath.cshtml", document.FilePath); 142Assert.Equal(fileName, document.FilePath); 159Assert.Equal(fileName, document.FilePath); 175Assert.Equal("c:\\myapp\\filePath.cshtml", document.FilePath); 192Assert.Equal(filePath, document.FilePath); 208Assert.Equal(relativePhysicalPath, document.FilePath);
Microsoft.AspNetCore.Razor.Test.Common (7)
Language\IntegrationTests\IntegrationTestBase.cs (1)
264(CSharpSyntaxTree)CSharpSyntaxTree.ParseText(csharpDocument.Text, CSharpParseOptions, path: code.CodeDocument.Source.FilePath ?? string.Empty),
Language\IntegrationTests\RazorBaselineIntegrationTestBase.cs (3)
212Assert.All(linePragmas.Where(p => p.FilePath == codeDocument.Source.FilePath), p => Assert.True(p.IsEnhanced)); 279var lastSlash = codeDocument.Source.FilePath.LastIndexOfAny(['/', '\\']); 280var fileName = lastSlash == -1 ? null : codeDocument.Source.FilePath[(lastSlash + 1)..];
Language\IntegrationTests\RazorIntegrationTestBase.cs (1)
455expected = expected.Replace(windowsPath, generated.CodeDocument.Source.FilePath);
Language\Legacy\ParserTestBase.cs (1)
67var filePath = syntaxTree.Source.FilePath;
Language\SyntaxTreeVerifier.cs (1)
123_currentLocation = new SourceLocation(source.FilePath, 0, 0, 0);
Microsoft.AspNetCore.Razor.Test.Common.Tooling (2)
Language\IntegrationTests\RazorToolingIntegrationTestBase.cs (1)
329expected = expected.Replace(windowsPath, generated.CodeDocument.Source.FilePath);
Language\Legacy\ToolingParserTestBase.cs (1)
52var filePath = syntaxTree.Source.FilePath;
Microsoft.CodeAnalysis.Razor.Compiler (38)
Language\CodeGeneration\CodeRenderingContext.cs (2)
126if (SourceDocument.FilePath != null && 127!string.Equals(SourceDocument.FilePath, source.FilePath, StringComparison.OrdinalIgnoreCase))
Language\CodeGeneration\CodeWriterExtensions.cs (2)
87if (context.SourceDocument.FilePath != null && 88!string.Equals(context.SourceDocument.FilePath, span.Value.FilePath, StringComparison.OrdinalIgnoreCase))
Language\Components\ComponentDocumentClassifierPass.cs (1)
140if (codeDocument.Source.FilePath == null || codeDocument.Source.RelativePath == null)
Language\DefaultRazorCSharpLoweringPhase.cs (1)
111var filePath = sourceDocument.FilePath.AssumeNotNull();
Language\DefaultRazorIntermediateNodeLoweringPhase.cs (4)
933SourceDocument.FilePath, 946SourceDocument.FilePath, 962SourceDocument.FilePath, 1021sourceRangeStart.Value.FilePath ?? SourceDocument.FilePath,
Language\DefaultRazorTagHelperContextDiscoveryPhase.cs (1)
99_source?.FilePath is string sourceFilePath &&
Language\DefaultRazorTagHelperContextDiscoveryPhase_Pooling.cs (1)
40var filePath = codeDocument.Source.FilePath;
Language\DefaultTagHelperResolutionPhase.cs (2)
846var filePath = sourceDocument.FilePath; 880var filePath = sourceDocument.FilePath;
Language\Extensions\DesignTimeDirectiveTargetExtension.cs (1)
41context.SourceDocument?.FilePath,
Language\Legacy\SeekableTextReader.cs (1)
23public SeekableTextReader(RazorSourceDocument source) : this(source.Text, source.FilePath)
Language\NamespaceComputer.cs (1)
26var filePath = codeDocument.Source.FilePath;
Language\RazorCodeDocumentExtensions.cs (2)
18var filePath = codeDocument.Source.RelativePath ?? codeDocument.Source.FilePath; 44(codeDocument.FileKind.IsLegacy() && string.Equals(Path.GetFileName(codeDocument.Source.FilePath), MvcImportProjectFeature.ImportsFileName, StringComparison.OrdinalIgnoreCase));
Language\RazorProjectEngineExtensions.cs (2)
66var fileKindValue = fileKind ?? (source.FilePath is string filePath 127var fileKindValue = fileKind ?? (source.FilePath is string filePath
Language\RazorSourceDocument.cs (2)
46/// <returns>The <see cref="RelativePath"/> if set, or the <see cref="FilePath"/>.</returns> 49return RelativePath ?? FilePath;
Language\SpanComputer.cs (1)
115return new SourceSpan(source.FilePath, absoluteIndex: start, startLinePosition.Line, startLinePosition.Character, length, lineCount, endLinePosition.Character);
Language\Syntax\SyntaxNodeExtensions.cs (8)
55return new SourceLocation(source.FilePath, 0, 0, 0); 64source.FilePath, // GetLocation prefers RelativePath but we want FilePath. 72source.FilePath, // GetLocation prefers RelativePath but we want FilePath. 79return new SourceLocation(source.FilePath, node.Position, 0, 0); 90return new SourceLocation(source.FilePath, 0, 0, 0); 99source.FilePath, // GetLocation prefers RelativePath but we want FilePath. 107source.FilePath, // GetLocation prefers RelativePath but we want FilePath. 114return new SourceLocation(source.FilePath, token.Position, 0, 0);
Mvc.Version1_X\MvcViewDocumentClassifierPass.cs (1)
27var filePath = codeDocument.Source.RelativePath ?? codeDocument.Source.FilePath;
Mvc.Version2_X\MvcViewDocumentClassifierPass.cs (1)
27var filePath = codeDocument.Source.RelativePath ?? codeDocument.Source.FilePath;
Mvc.Version2_X\NamespaceDirective.cs (1)
72@namespace.Name = GetNamespace(codeDocument.Source.FilePath, directive);
Mvc.Version2_X\RazorPageDocumentClassifierPass.cs (1)
59var filePath = codeDocument.Source.RelativePath ?? codeDocument.Source.FilePath;
SourceGenerators\RazorSourceGenerator.cs (2)
357filePathToDocument.Add(codeDocument.Source.FilePath!, (hintName, codeDocument)); 358hintNameToFilePath.Add(hintName, codeDocument.Source.FilePath!);
Microsoft.CodeAnalysis.Razor.Workspaces (3)
Completion\RazorCompletionListProvider.cs (1)
116var filePath = codeDocument.Source.FilePath.AssumeNotNull();
FoldingRanges\FoldingRangeService.cs (1)
126_logger.LogWarning($"Got a folding range of ({range.StartLine}-{range.EndLine}) but Razor document {codeDocument.Source.FilePath} only has {sourceText.Lines.Count} lines.");
Hover\HoverFactory.cs (1)
95var filePath = codeDocument.Source.FilePath.AssumeNotNull();
Microsoft.CodeAnalysis.Remote.Razor (2)
DocumentMapping\RemoteSpanMappingService.cs (1)
112var filePath = codeDocument.Source.FilePath.AssumeNotNull();
ProjectSystem\Extensions.cs (1)
26var filePath = codeDocument.Source.FilePath;