-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow overriding properties of (Mock)FileSystem (#782)
BREAKING CHANGES: - (Mock)FileSystem are now derived from a new public class FileSystemBase for symmetry with other types - The setter for MockFileSystem.FileSystemWatcher has been removed. It is now virtual and should be overriden if required. Fixes #757, #778 and #776
- Loading branch information
1 parent
5539592
commit 05486f7
Showing
5 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
namespace System.IO.Abstractions | ||
{ | ||
/// <inheritdoc /> | ||
[Serializable] | ||
public abstract class FileSystemBase : IFileSystem | ||
{ | ||
/// <inheritdoc /> | ||
public abstract IDirectory Directory { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IFile File { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IFileInfoFactory FileInfo { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IFileStreamFactory FileStream { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IPath Path { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IDirectoryInfoFactory DirectoryInfo { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IDriveInfoFactory DriveInfo { get; } | ||
|
||
/// <inheritdoc /> | ||
public abstract IFileSystemWatcherFactory FileSystemWatcher { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters