Fix build break

This commit is contained in:
Ajay Bhargav Baaskaran 2017-07-06 19:43:42 -07:00
parent 8bc4d7bb2d
commit 05f5d59e44
8 changed files with 19 additions and 19 deletions

View File

@ -180,7 +180,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
compilationTaskSource = new TaskCompletionSource<CompiledViewDescriptor>();
foreach (var importItem in _templateEngine.GetImportItems(projectItem))
{
cacheEntryOptions.ExpirationTokens.Add(_fileProvider.Watch(importItem.Path));
cacheEntryOptions.ExpirationTokens.Add(_fileProvider.Watch(importItem.FilePath));
}
cacheEntry = compilationTaskSource.Task;
}

View File

@ -432,7 +432,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
foreach (var viewStartProjectItem in _razorProject.FindHierarchicalItems(path, ViewStartFileName))
{
var result = _pageFactory.CreateFactory(viewStartProjectItem.Path);
var result = _pageFactory.CreateFactory(viewStartProjectItem.FilePath);
var viewDescriptor = result.ViewDescriptor;
if (viewDescriptor?.ExpirationTokens != null)
{
@ -447,7 +447,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor
// Populate the viewStartPages list so that _ViewStarts appear in the order the need to be
// executed (closest last, furthest first). This is the reverse order in which
// ViewHierarchyUtility.GetViewStartLocations returns _ViewStarts.
viewStartPages.Insert(0, new ViewLocationCacheItem(result.RazorPageFactory, viewStartProjectItem.Path));
viewStartPages.Insert(0, new ViewLocationCacheItem(result.RazorPageFactory, viewStartProjectItem.FilePath));
}
}

View File

@ -47,7 +47,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
var importFileAtPagesRoot = rootDirectory + "/" + templateEngine.Options.ImportsFileName;
_additionalFilesToTrack = templateEngine.GetImportItems(importFileAtPagesRoot)
.Select(item => item.Path)
.Select(item => item.FilePath)
.ToArray();
_searchPattern = rootDirectory + "/**/*.cshtml";

View File

@ -212,7 +212,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
ViewStartFileName);
foreach (var item in viewStartItems)
{
var factoryResult = _razorPageFactoryProvider.CreateFactory(item.Path);
var factoryResult = _razorPageFactoryProvider.CreateFactory(item.FilePath);
if (factoryResult.Success)
{
viewStartFactories.Insert(0, factoryResult.RazorPageFactory);

View File

@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Mvc.RazorPages.Internal
var routeModel = new PageRouteModel(
relativePath: item.CombinedPath,
viewEnginePath: item.PathWithoutExtension);
viewEnginePath: item.FilePathWithoutExtension);
PageSelectorModel.PopulateDefaults(routeModel, routeTemplate);
context.RouteModels.Add(routeModel);

View File

@ -48,9 +48,9 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
var razorFiles = razorProject.EnumerateItems("/");
// Assert
Assert.Collection(razorFiles.OrderBy(f => f.Path),
file => Assert.Equal("/File1.cshtml", file.Path),
file => Assert.Equal("/File3.cshtml", file.Path));
Assert.Collection(razorFiles.OrderBy(f => f.FilePath),
file => Assert.Equal("/File1.cshtml", file.FilePath),
file => Assert.Equal("/File3.cshtml", file.FilePath));
}
[Fact]
@ -89,11 +89,11 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
var razorFiles = razorProject.EnumerateItems("/");
// Assert
Assert.Collection(razorFiles.OrderBy(f => f.Path),
file => Assert.Equal("/File1.cshtml", file.Path),
file => Assert.Equal("/Level1-Dir1/File2.cshtml", file.Path),
file => Assert.Equal("/Level1-Dir1/File3.cshtml", file.Path),
file => Assert.Equal("/Level1-Dir2/File5.cshtml", file.Path));
Assert.Collection(razorFiles.OrderBy(f => f.FilePath),
file => Assert.Equal("/File1.cshtml", file.FilePath),
file => Assert.Equal("/Level1-Dir1/File2.cshtml", file.FilePath),
file => Assert.Equal("/Level1-Dir1/File3.cshtml", file.FilePath),
file => Assert.Equal("/Level1-Dir2/File5.cshtml", file.FilePath));
}
[Fact]
@ -132,9 +132,9 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal
var razorFiles = razorProject.EnumerateItems("/Level1-Dir1");
// Assert
Assert.Collection(razorFiles.OrderBy(f => f.Path),
file => Assert.Equal("/File2.cshtml", file.Path),
file => Assert.Equal("/File3.cshtml", file.Path));
Assert.Collection(razorFiles.OrderBy(f => f.FilePath),
file => Assert.Equal("/File2.cshtml", file.FilePath),
file => Assert.Equal("/File3.cshtml", file.FilePath));
}
}
}

View File

@ -170,7 +170,7 @@ Nobody will use it");
public override bool Exists => throw new NotImplementedException();
public override string Path => "Test.cshtml";
public override string FilePath => "Test.cshtml";
public override string PhysicalPath => null;

View File

@ -24,7 +24,7 @@ namespace RazorPageExecutionInstrumentationWebSite
private class TestRazorProjectItem : FileProviderRazorProjectItem
{
public TestRazorProjectItem(FileProviderRazorProjectItem projectItem)
: base(projectItem.FileInfo, projectItem.BasePath, projectItem.Path)
: base(projectItem.FileInfo, projectItem.BasePath, projectItem.FilePath)
{
}