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

Commit 01e97c8

Browse files
author
YishaiGalatzer
committed
Rename RuntimeFileInfo to RelativeFileInfo
1 parent 42e3706 commit 01e97c8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilerCache.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private static bool Match(Type t)
5656
&& !t.GetTypeInfo().ContainsGenericParameters;
5757
}
5858

59-
public CompilationResult GetOrAdd(RuntimeFileInfo fileInfo, Func<CompilationResult> compile)
59+
public CompilationResult GetOrAdd(RelativeFileInfo fileInfo, Func<CompilationResult> compile)
6060
{
6161
CompilerCacheEntry cacheEntry;
6262

@@ -91,7 +91,7 @@ public CompilationResult GetOrAdd(RuntimeFileInfo fileInfo, Func<CompilationResu
9191
}
9292
}
9393

94-
private CompilationResult OnCacheMiss(RuntimeFileInfo file, Func<CompilationResult> compile)
94+
private CompilationResult OnCacheMiss(RelativeFileInfo file, Func<CompilationResult> compile)
9595
{
9696
var result = compile();
9797

src/Microsoft.AspNet.Mvc.Razor/Compilation/CompilerCacheEntry.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public CompilerCacheEntry([NotNull] RazorFileInfo info, [NotNull] Type viewType)
1616
Hash = info.Hash;
1717
}
1818

19-
public CompilerCacheEntry([NotNull] RuntimeFileInfo info, [NotNull] Type viewType, string hash)
19+
public CompilerCacheEntry([NotNull] RelativeFileInfo info, [NotNull] Type viewType, string hash)
2020
{
2121
ViewType = viewType;
2222
RelativePath = info.RelativePath;

src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RuntimeFileInfo.cs renamed to src/Microsoft.AspNet.Mvc.Razor/Razor/PreCompileViews/RelativeFileInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Microsoft.AspNet.Mvc.Razor
77
{
8-
public class RuntimeFileInfo
8+
public class RelativeFileInfo
99
{
1010
public IFileInfo FileInfo { get; set; }
1111
public string RelativePath { get; set; }

src/Microsoft.AspNet.Mvc.Razor/Razor/RazorCompilationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public RazorCompilationService(IApplicationEnvironment environment,
3232
public CompilationResult Compile([NotNull] IFileInfo file)
3333
{
3434
var relativePath = RelativePath.GetRelativePath(_appRoot, file);
35-
var fileInfo = new RuntimeFileInfo()
35+
var fileInfo = new RelativeFileInfo()
3636
{
3737
FileInfo = file,
3838
RelativePath = relativePath,

test/Microsoft.AspNet.Mvc.Razor.Test/Compilation/CompilerCacheTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void GetOrAdd_ReturnsCompilationResultFromFactory()
2424
var type = GetType();
2525
var expected = UncachedCompilationResult.Successful(type, "hello world");
2626

27-
var runtimeFileInfo = new RuntimeFileInfo()
27+
var runtimeFileInfo = new RelativeFileInfo()
2828
{
2929
FileInfo = fileInfo.Object,
3030
RelativePath = "ab",
@@ -53,7 +53,7 @@ public void GetOrAdd_DoesNotCacheCompiledContent_OnCallsAfterInitial()
5353
var type = GetType();
5454
var uncachedResult = UncachedCompilationResult.Successful(type, "hello world");
5555

56-
var runtimeFileInfo = new RuntimeFileInfo()
56+
var runtimeFileInfo = new RelativeFileInfo()
5757
{
5858
FileInfo = fileInfo.Object,
5959
RelativePath = "test",

0 commit comments

Comments
 (0)