toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.5k stars 259 forks source link

Problem with custom IFileInfo implementation with FileSystemRazorProjectItem #470

Open slavisharper opened 2 years ago

slavisharper commented 2 years ago

Hi there, I have small proposal for the FileSystemRazorProjectItem.cs.

Currently it is using FileInfo and not IFileInfo interface as input parameter. I've created custom RazorLightProject class that has specific search terms for embedded resource files in multiple assemblies. The problem is that I'm using custom IFileInfo implementation and cannot create FileSystemRazorProjectItem.

For now I am using with TextSourceRazorProjectItem while testing this library, but I think that it will be better to be more abstract and use IFileInfo in the file class.