-
-
Notifications
You must be signed in to change notification settings - Fork 10
refactor: only use reflection in FileSystemWatcherMock when simulating other OS
#871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the FileSystemWatcherMock class to optimize performance by conditionally using reflection only when simulating non-native operating systems, rather than always using reflection for path manipulation.
Key Changes
- Conditional reflection usage based on simulation mode to improve performance in native scenarios
- Updated constructor parameters to use the
Pathproperty instead of local variables
Source/Testably.Abstractions.Testing/FileSystem/FileSystemWatcherMock.cs
Show resolved
Hide resolved
Source/Testably.Abstractions.Testing/FileSystem/FileSystemWatcherMock.cs
Show resolved
Hide resolved
|
|
This is addressed in release v5.0.0. |



This PR refactors the
FileSystemWatcherMockclass to optimize performance by conditionally using reflection only when simulating non-native operating systems, rather than always using reflection for path manipulation.Key Changes
Pathproperty instead of local variables