Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up to cleaning up obsolete types in Razor #28706

Merged
3 commits merged into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public FileProviderRazorProjectFileSystem(RuntimeCompilationFileProvider filePro

public IFileProvider FileProvider => _fileProvider.FileProvider;

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down Expand Up @@ -96,4 +96,4 @@ private static string JoinPath(string path1, string path2)
return path1 + "/" + path2;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public override IEnumerable<RazorProjectItem> FindHierarchicalItems(string baseP
return Enumerable.Empty<RazorProjectItem>();
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
return directory?.EnumerateItems() ?? Enumerable.Empty<RazorProjectItem>();
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand All @@ -44,4 +44,4 @@ public void Add(RazorProjectItem projectItem)
_root.AddFile(new FileNode(filePath, projectItem));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public DefaultRazorProjectFileSystem(string root)
{
throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(root));
}

Root = root.Replace('\\', '/').TrimEnd('/');
}

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

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
return Enumerable.Empty<RazorProjectItem>();
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public abstract class RazorProject
/// </summary>
/// <param name="path">The path.</param>
/// <returns>The <see cref="RazorProjectItem"/>.</returns>
[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public abstract RazorProjectItem GetItem(string path);

/// <summary>
Expand All @@ -50,7 +50,7 @@ public abstract class RazorProject
/// traverses to the project root.
/// e.g.
/// /Views/Home/View.cshtml -> [ /Views/Home/FileName.cshtml, /Views/FileName.cshtml, /FileName.cshtml ]
///
///
/// Project items returned by this method have inferred FileKinds from their corresponding file paths.
/// </remarks>
public IEnumerable<RazorProjectItem> FindHierarchicalItems(string path, string fileName)
Expand All @@ -70,7 +70,7 @@ public IEnumerable<RazorProjectItem> FindHierarchicalItems(string path, string f
/// traverses to the <paramref name="basePath"/>.
/// e.g.
/// (/Views, /Views/Home/View.cshtml) -> [ /Views/Home/FileName.cshtml, /Views/FileName.cshtml ]
///
///
/// Project items returned by this method have inferred FileKinds from their corresponding file paths.
/// </remarks>
public virtual IEnumerable<RazorProjectItem> FindHierarchicalItems(string basePath, string path, string fileName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
return directory?.EnumerateItems() ?? Enumerable.Empty<RazorProjectItem>();
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
throw new NotImplementedException();
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
}
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
throw new NotImplementedException();
}

[Obsolete("Use GetItem(string path, string fileKind) instead.")]

public override RazorProjectItem GetItem(string path)
{
return GetItem(path, fileKind: null);
Expand Down