GenHTTP icon indicating copy to clipboard operation
GenHTTP copied to clipboard

Allow to virtualize resource trees

Open Kaliumhexacyanoferrat opened this issue 3 years ago • 0 comments

As a developer, I would like to virtualize existing resource trees, so that I can extend them with my own content.

Example

var tree = ResourceTree.FromDirectory("/app")
                       .Virtualize()
                       .Add("config.js", Resource.FromFile("/cfg/config.js"));

var spa = SinglePageApplication.From(tree);

Acceptance criteria

  • The functionality is implemented in the IO module
  • The Virtualize() method can be called on any IBuilder<IResourceTree>
  • The Virtualize() method returns a configured VirtualTreeBuilder
  • If the original tree is disposable, disposing the virtual tree will dispose the inner tree as well
  • There are acceptance tests to test the behavior

Kaliumhexacyanoferrat avatar Dec 09 '21 07:12 Kaliumhexacyanoferrat