-
Notifications
You must be signed in to change notification settings - Fork 82
Enhance EmbeddedFileProvider to support multiple assemblies and can be overridden by physical files. #131
Comments
Hi @davidfowl, I have completed implementation, unit test will be pushed soon. Do I need to let you have a look at it before making a pull request? Thanks, |
Wouldn't it make more sense to implement #49 (Implement CombinedFileSystemProvider) instead of this? I think this would keep the separation much cleaner, as well as the code for the |
I actually prefer With current implementation, all views for a website must come from the same assembly. And the website cannot use views from another assembly or it's own views. Also, it doesn't make sense to use that view assembly for a different website as this is a very tight couple. The most useful of
You are right. A provider shouldn't know anything about another provider. In my implementation, |
With the Regardless of that, I'd definitely remove the |
Yea I wasn't suggesting to change EmbeddedFileProvider to have an IFileProvider fallback, that's weird. CombinedFileProvider is what you want plus the ability to use multiple assemblies for embedded resources (potentially). |
Sounds reasonable. I have assumed that |
I think you should file an issue on the MVC repository and call out the specific use cases before adding a generic |
I've been using a custom IFileProvider for multiple assemblies and it worked fine until beta5. |
Putting this in 1.0.0 backlog. Please link to any MVC bug that you may open for specific use cases. |
I've been designing a composite file provider which takes a set of ordered file providers and returns the first file instance that exists. My use case here is I am developing a CMS based on ASP.NET and for my modules I am deploying resources such as views, scripts, images etc. as embedded resources. I want to enable scenarios whereby if we want to customise a particular resource, we can bring that resource into the file system. Essentially the composite file provider will work as such:
The implementation of Everything works a treat except I am confused about the best approach to the My current implementation is:
|
I would vote to close this issue as a duplicate of #49 (Implement CombinedFileSystemProvider), as the requested feature would be solved with that approach. Currently the same approach is discussed separately in two different issues, which is not beneficial for finding the best solution. |
@MartinJohns Agreed, https://github.com/aspnet/FileSystem/pull/142/files fixes this. |
As suggested by @davidfowl I'm opening an issue to make some enhancements to EmbeddedFileProvider
physical file viewsMVC's default or a specified provider.physical files rootdefault provider are configured via new EmbeddedFileProviderOptions class by DI.I have forked the project and will start working on it. Any suggestion please let me know.
Thanks a lot.
The text was updated successfully, but these errors were encountered: