Skip to content

Commit 863b704

Browse files
authored
fix: Add TypeForwardedTo attribute to forward other moved interfaces (#1340)
Following #1338 This PR adds TypeForwardedToAttribute to fix a problem where a transitive dependency on ver 21 can't find interfaces that were moved to a separate assembly in version 22. Using the attribute, allows third parties that are built with ver 21 to be redirected to Testably.Abstractions.FileSystem.Interface.dll when trying to resolve the interface in its old location: TestableIO.System.IO.Abstractions.dll This change adds backwards compatibility with ver 21. Users of ver 22 are not affected in any way.
1 parent 751f129 commit 863b704

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
using System.IO.Abstractions;
22
using System.Runtime.CompilerServices;
33

4-
[assembly: TypeForwardedTo(typeof(IFileSystem))]
4+
[assembly: TypeForwardedTo(typeof(FileSystemStream))]
5+
[assembly: TypeForwardedTo(typeof(IDirectory))]
6+
[assembly: TypeForwardedTo(typeof(IDirectoryInfo))]
7+
[assembly: TypeForwardedTo(typeof(IDirectoryInfoFactory))]
8+
[assembly: TypeForwardedTo(typeof(IDriveInfo))]
9+
[assembly: TypeForwardedTo(typeof(IDriveInfoFactory))]
10+
[assembly: TypeForwardedTo(typeof(IFile))]
11+
[assembly: TypeForwardedTo(typeof(IFileInfo))]
12+
[assembly: TypeForwardedTo(typeof(IFileInfoFactory))]
13+
[assembly: TypeForwardedTo(typeof(IFileStreamFactory))]
14+
[assembly: TypeForwardedTo(typeof(IFileSystem))]
15+
[assembly: TypeForwardedTo(typeof(IFileSystemAclSupport))]
16+
[assembly: TypeForwardedTo(typeof(IFileSystemEntity))]
17+
[assembly: TypeForwardedTo(typeof(IFileSystemInfo))]
18+
[assembly: TypeForwardedTo(typeof(IFileSystemWatcher))]
19+
[assembly: TypeForwardedTo(typeof(IFileSystemWatcherFactory))]
20+
[assembly: TypeForwardedTo(typeof(IFileVersionInfo))]
21+
[assembly: TypeForwardedTo(typeof(IFileVersionInfoFactory))]
22+
[assembly: TypeForwardedTo(typeof(IPath))]
23+
[assembly: TypeForwardedTo(typeof(IWaitForChangedResult))]

0 commit comments

Comments
 (0)