Skip to content

Commit 15ed8d6

Browse files
refactor: renamed add handle method on file handles class
1 parent a61e568 commit 15ed8d6

9 files changed

+9
-9
lines changed

src/TestableIO.System.IO.Abstractions.TestingHelpers/FileHandles.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class FileHandles
77
{
88
private readonly ConcurrentDictionary<string, ConcurrentDictionary<Guid, (FileAccess access, FileShare share)>> handles = new();
99

10-
public void TryAddHandle(string path, Guid guid, FileAccess access, FileShare share)
10+
public void AddHandle(string path, Guid guid, FileAccess access, FileShare share)
1111
{
1212
var pathHandles = handles.GetOrAdd(
1313
path,

src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public MockFileStream(
101101
mockFileDataAccessor.AddFile(path, fileData);
102102
}
103103

104-
mockFileDataAccessor.FileHandles.TryAddHandle(path, guid, access, share);
104+
mockFileDataAccessor.FileHandles.AddHandle(path, guid, access, share);
105105
this.access = access;
106106
this.share = share;
107107
}

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net10.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net472.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net6.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net8.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_net9.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.0.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

tests/TestableIO.System.IO.Abstractions.Api.Tests/Expected/TestableIO.System.IO.Abstractions.TestingHelpers_netstandard2.1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
public class FileHandles
44
{
55
public FileHandles() { }
6+
public void AddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
67
public void RemoveHandle(string path, System.Guid guid) { }
7-
public void TryAddHandle(string path, System.Guid guid, System.IO.FileAccess access, System.IO.FileShare share) { }
88
}
99
namespace System.IO.Abstractions.TestingHelpers
1010
{

0 commit comments

Comments
 (0)