Skip to content

Commit 90febeb

Browse files
authored
Follow-up to cleaning up obsolete types in Razor (#28706)
* Follow-up to cleaning up obsolete types in Razor * Revert "Follow-up to cleaning up obsolete types in Razor" This reverts commit 0ccc3d6. * Address feedback from peer review
1 parent d909cfc commit 90febeb

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

src/Mvc/Mvc.Razor.RuntimeCompilation/src/FileProviderRazorProjectFileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public FileProviderRazorProjectFileSystem(RuntimeCompilationFileProvider filePro
3434

3535
public IFileProvider FileProvider => _fileProvider.FileProvider;
3636

37-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
37+
3838
public override RazorProjectItem GetItem(string path)
3939
{
4040
return GetItem(path, fileKind: null);
@@ -96,4 +96,4 @@ private static string JoinPath(string path1, string path2)
9696
return path1 + "/" + path2;
9797
}
9898
}
99-
}
99+
}

src/Mvc/Mvc.Razor.RuntimeCompilation/src/PageDirectiveFeature.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public override IEnumerable<RazorProjectItem> FindHierarchicalItems(string baseP
7777
return Enumerable.Empty<RazorProjectItem>();
7878
}
7979

80-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
80+
8181
public override RazorProjectItem GetItem(string path)
8282
{
8383
return GetItem(path, fileKind: null);

src/Mvc/Mvc.Razor.RuntimeCompilation/test/TestInfrastructure/VirtualRazorProjectFileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
1818
return directory?.EnumerateItems() ?? Enumerable.Empty<RazorProjectItem>();
1919
}
2020

21-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
21+
2222
public override RazorProjectItem GetItem(string path)
2323
{
2424
return GetItem(path, fileKind: null);
@@ -44,4 +44,4 @@ public void Add(RazorProjectItem projectItem)
4444
_root.AddFile(new FileNode(filePath, projectItem));
4545
}
4646
}
47-
}
47+
}

src/Razor/Microsoft.AspNetCore.Razor.Language/src/DefaultRazorProjectFileSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public DefaultRazorProjectFileSystem(string root)
1616
{
1717
throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(root));
1818
}
19-
19+
2020
Root = root.Replace('\\', '/').TrimEnd('/');
2121
}
2222

@@ -61,7 +61,7 @@ public override RazorProjectItem GetItem(string path, string fileKind)
6161
return new DefaultRazorProjectItem("/", filePath, relativePhysicalPath, fileKind, new FileInfo(absolutePath), cssScope: null);
6262
}
6363

64-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
64+
6565
public override RazorProjectItem GetItem(string path)
6666
{
6767
return GetItem(path, fileKind: null);

src/Razor/Microsoft.AspNetCore.Razor.Language/src/EmptyProjectFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
1515
return Enumerable.Empty<RazorProjectItem>();
1616
}
1717

18-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
18+
1919
public override RazorProjectItem GetItem(string path)
2020
{
2121
return GetItem(path, fileKind: null);

src/Razor/Microsoft.AspNetCore.Razor.Language/src/RazorProject.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public abstract class RazorProject
2828
/// </summary>
2929
/// <param name="path">The path.</param>
3030
/// <returns>The <see cref="RazorProjectItem"/>.</returns>
31-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
31+
3232
public abstract RazorProjectItem GetItem(string path);
3333

3434
/// <summary>
@@ -50,7 +50,7 @@ public abstract class RazorProject
5050
/// traverses to the project root.
5151
/// e.g.
5252
/// /Views/Home/View.cshtml -> [ /Views/Home/FileName.cshtml, /Views/FileName.cshtml, /FileName.cshtml ]
53-
///
53+
///
5454
/// Project items returned by this method have inferred FileKinds from their corresponding file paths.
5555
/// </remarks>
5656
public IEnumerable<RazorProjectItem> FindHierarchicalItems(string path, string fileName)
@@ -70,7 +70,7 @@ public IEnumerable<RazorProjectItem> FindHierarchicalItems(string path, string f
7070
/// traverses to the <paramref name="basePath"/>.
7171
/// e.g.
7272
/// (/Views, /Views/Home/View.cshtml) -> [ /Views/Home/FileName.cshtml, /Views/FileName.cshtml ]
73-
///
73+
///
7474
/// Project items returned by this method have inferred FileKinds from their corresponding file paths.
7575
/// </remarks>
7676
public virtual IEnumerable<RazorProjectItem> FindHierarchicalItems(string basePath, string path, string fileName)

src/Razor/Microsoft.AspNetCore.Razor.Language/src/VirtualRazorProjectFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
1919
return directory?.EnumerateItems() ?? Enumerable.Empty<RazorProjectItem>();
2020
}
2121

22-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
22+
2323
public override RazorProjectItem GetItem(string path)
2424
{
2525
return GetItem(path, fileKind: null);

src/Razor/Microsoft.AspNetCore.Razor.Language/test/TestRazorProject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
2626
throw new NotImplementedException();
2727
}
2828

29-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
29+
3030
public override RazorProjectItem GetItem(string path)
3131
{
3232
return GetItem(path, fileKind: null);

src/Razor/Microsoft.AspNetCore.Razor.Tools/src/CompositeRazorProjectFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
2727
}
2828
}
2929

30-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
30+
3131
public override RazorProjectItem GetItem(string path)
3232
{
3333
return GetItem(path, fileKind: null);

src/Razor/test/Microsoft.AspNetCore.Razor.Test.Common/Language/TestRazorProjectFileSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
2828
throw new NotImplementedException();
2929
}
3030

31-
[Obsolete("Use GetItem(string path, string fileKind) instead.")]
31+
3232
public override RazorProjectItem GetItem(string path)
3333
{
3434
return GetItem(path, fileKind: null);

0 commit comments

Comments
 (0)