Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit 05f5d59

Browse files
committed
Fix build break
1 parent 8bc4d7b commit 05f5d59

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/Microsoft.AspNetCore.Mvc.Razor/Internal/RazorViewCompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private Task<CompiledViewDescriptor> CreateCacheEntry(string normalizedPath)
180180
compilationTaskSource = new TaskCompletionSource<CompiledViewDescriptor>();
181181
foreach (var importItem in _templateEngine.GetImportItems(projectItem))
182182
{
183-
cacheEntryOptions.ExpirationTokens.Add(_fileProvider.Watch(importItem.Path));
183+
cacheEntryOptions.ExpirationTokens.Add(_fileProvider.Watch(importItem.FilePath));
184184
}
185185
cacheEntry = compilationTaskSource.Task;
186186
}

src/Microsoft.AspNetCore.Mvc.Razor/RazorViewEngine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ private IReadOnlyList<ViewLocationCacheItem> GetViewStartPages(
432432

433433
foreach (var viewStartProjectItem in _razorProject.FindHierarchicalItems(path, ViewStartFileName))
434434
{
435-
var result = _pageFactory.CreateFactory(viewStartProjectItem.Path);
435+
var result = _pageFactory.CreateFactory(viewStartProjectItem.FilePath);
436436
var viewDescriptor = result.ViewDescriptor;
437437
if (viewDescriptor?.ExpirationTokens != null)
438438
{
@@ -447,7 +447,7 @@ private IReadOnlyList<ViewLocationCacheItem> GetViewStartPages(
447447
// Populate the viewStartPages list so that _ViewStarts appear in the order the need to be
448448
// executed (closest last, furthest first). This is the reverse order in which
449449
// ViewHierarchyUtility.GetViewStartLocations returns _ViewStarts.
450-
viewStartPages.Insert(0, new ViewLocationCacheItem(result.RazorPageFactory, viewStartProjectItem.Path));
450+
viewStartPages.Insert(0, new ViewLocationCacheItem(result.RazorPageFactory, viewStartProjectItem.FilePath));
451451
}
452452
}
453453

src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/PageActionDescriptorChangeProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public PageActionDescriptorChangeProvider(
4747

4848
var importFileAtPagesRoot = rootDirectory + "/" + templateEngine.Options.ImportsFileName;
4949
_additionalFilesToTrack = templateEngine.GetImportItems(importFileAtPagesRoot)
50-
.Select(item => item.Path)
50+
.Select(item => item.FilePath)
5151
.ToArray();
5252

5353
_searchPattern = rootDirectory + "/**/*.cshtml";

src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/PageActionInvokerProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ internal List<Func<IRazorPage>> GetViewStartFactories(CompiledPageActionDescript
212212
ViewStartFileName);
213213
foreach (var item in viewStartItems)
214214
{
215-
var factoryResult = _razorPageFactoryProvider.CreateFactory(item.Path);
215+
var factoryResult = _razorPageFactoryProvider.CreateFactory(item.FilePath);
216216
if (factoryResult.Success)
217217
{
218218
viewStartFactories.Insert(0, factoryResult.RazorPageFactory);

src/Microsoft.AspNetCore.Mvc.RazorPages/Internal/RazorProjectPageRouteModelProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void OnProvidersExecuting(PageRouteModelProviderContext context)
4949

5050
var routeModel = new PageRouteModel(
5151
relativePath: item.CombinedPath,
52-
viewEnginePath: item.PathWithoutExtension);
52+
viewEnginePath: item.FilePathWithoutExtension);
5353
PageSelectorModel.PopulateDefaults(routeModel, routeTemplate);
5454

5555
context.RouteModels.Add(routeModel);

test/Microsoft.AspNetCore.Mvc.Razor.Test/Internal/FileProviderRazorProjectTest.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public void EnumerateFiles_ReturnsCshtmlFiles()
4848
var razorFiles = razorProject.EnumerateItems("/");
4949

5050
// Assert
51-
Assert.Collection(razorFiles.OrderBy(f => f.Path),
52-
file => Assert.Equal("/File1.cshtml", file.Path),
53-
file => Assert.Equal("/File3.cshtml", file.Path));
51+
Assert.Collection(razorFiles.OrderBy(f => f.FilePath),
52+
file => Assert.Equal("/File1.cshtml", file.FilePath),
53+
file => Assert.Equal("/File3.cshtml", file.FilePath));
5454
}
5555

5656
[Fact]
@@ -89,11 +89,11 @@ public void EnumerateFiles_IteratesOverAllCshtmlUnderRoot()
8989
var razorFiles = razorProject.EnumerateItems("/");
9090

9191
// Assert
92-
Assert.Collection(razorFiles.OrderBy(f => f.Path),
93-
file => Assert.Equal("/File1.cshtml", file.Path),
94-
file => Assert.Equal("/Level1-Dir1/File2.cshtml", file.Path),
95-
file => Assert.Equal("/Level1-Dir1/File3.cshtml", file.Path),
96-
file => Assert.Equal("/Level1-Dir2/File5.cshtml", file.Path));
92+
Assert.Collection(razorFiles.OrderBy(f => f.FilePath),
93+
file => Assert.Equal("/File1.cshtml", file.FilePath),
94+
file => Assert.Equal("/Level1-Dir1/File2.cshtml", file.FilePath),
95+
file => Assert.Equal("/Level1-Dir1/File3.cshtml", file.FilePath),
96+
file => Assert.Equal("/Level1-Dir2/File5.cshtml", file.FilePath));
9797
}
9898

9999
[Fact]
@@ -132,9 +132,9 @@ public void EnumerateFiles_IteratesOverAllCshtmlUnderPath()
132132
var razorFiles = razorProject.EnumerateItems("/Level1-Dir1");
133133

134134
// Assert
135-
Assert.Collection(razorFiles.OrderBy(f => f.Path),
136-
file => Assert.Equal("/File2.cshtml", file.Path),
137-
file => Assert.Equal("/File3.cshtml", file.Path));
135+
Assert.Collection(razorFiles.OrderBy(f => f.FilePath),
136+
file => Assert.Equal("/File2.cshtml", file.FilePath),
137+
file => Assert.Equal("/File3.cshtml", file.FilePath));
138138
}
139139
}
140140
}

test/Microsoft.AspNetCore.Mvc.RazorPages.Test/Infrastructure/PageDirectiveFeatureTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public TestRazorProjectItem(string content)
170170

171171
public override bool Exists => throw new NotImplementedException();
172172

173-
public override string Path => "Test.cshtml";
173+
public override string FilePath => "Test.cshtml";
174174

175175
public override string PhysicalPath => null;
176176

test/WebSites/RazorPageExecutionInstrumentationWebSite/TestRazorCompilationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public override RazorProjectItem GetItem(string path)
2424
private class TestRazorProjectItem : FileProviderRazorProjectItem
2525
{
2626
public TestRazorProjectItem(FileProviderRazorProjectItem projectItem)
27-
: base(projectItem.FileInfo, projectItem.BasePath, projectItem.Path)
27+
: base(projectItem.FileInfo, projectItem.BasePath, projectItem.FilePath)
2828
{
2929
}
3030

0 commit comments

Comments
 (0)