You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#351: Add IFileSystem property to base classes (#352)
* Add IFileSystem property to base classes
This allows people to get at the underlying IFileSystem implementation when developing extension methods.
For example, it may make sense to put your extension method on DirectoryBase, but you may require FileBase to actually implement it. This makes that possible.
In addition it fixes a bug in MockFileInfo.Replace where the returned FileInfo was for the concrete FileSystem not the mock one (bug caused by implicit casting).
I think this commit actually removes the need for supporting implicit casting at all.
* Remove laziness from FileSystem
I really can't see the point of any of this - none of these constructors do any real work.
* Rest of PR comments
* Fix for serialization test
/// <exception cref="ArgumentNullException">Thrown if <paramref name="mockFileDataAccessor"/> or <paramref name="directoryPath"/> is <see langref="null"/>.</exception>
0 commit comments