Skip to content

Change the FileSystem ctor to allow overriding/decorating individual interfaces #757

@Krm1t

Description

@Krm1t

Hello

We're using the library in one of out projects and i really like it as i don't have to implement wrappers for File, Directory and so on. Also a functioning mock out of the box is nice.

One thing i am missing however is the ability to decorate the interfaces that the FileSystem class uses/returns.
An example could be that i want to decorate IFile with something like an IFileLoggingDecorator or implement retry functionality via decorator or even caching when reading filecontents.
But because of the closed ctor in the FileSystem class i don't see any way to do this without creating wrappers (for the wrapper) which seems counterproductive.
It should be possible to allow this while still maintaining the default ctor to support backwards compatibility.

What are your thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues that address the core abstractions & the wrappersstate: ready to pickIssues that are ready for being worked onstate: releasedIssues that are releasedtype: enhancementIssues that propose new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions