-
Notifications
You must be signed in to change notification settings - Fork 266
fix: file stream sharing #1363
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
Open
HarrisonTCodes
wants to merge
19
commits into
TestableIO:main
Choose a base branch
from
HarrisonTCodes:fix/file-stream-sharing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+166
−35
Open
fix: file stream sharing #1363
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2739e85
fix: added correct handling of file share in file stream constructor/…
HarrisonTCodes ec701cf
fix: added stateful tracking of unshared file streams and prevented m…
HarrisonTCodes 2a70ae1
refactor: changed fileshare none streams state to use concurrent dict…
HarrisonTCodes 18716e4
refactor: used existing common exception for file-in-use error in fil…
HarrisonTCodes c660094
feat: added handling of failed addition of exclusive file stream to t…
HarrisonTCodes d648b5e
chore: explicit API acceptance test changes
HarrisonTCodes 9952eab
test: added exclusive mock file stream handling unit tests
HarrisonTCodes 4e724f5
feat: added path normalization to mock file stream
HarrisonTCodes c9e04a2
fix: improved path normalization in mock file stream for relative paths
HarrisonTCodes f241cc2
fix: added improved handling of file stream options in factory method
HarrisonTCodes eabc64e
refactor: de-duplicated normalize/fix path logic moving method to pat…
HarrisonTCodes 2db45c1
chore: explicit API acceptance test changes to cover path verifier ch…
HarrisonTCodes 611907b
feat: added more rigorous tracking of open file streams and shares/ac…
HarrisonTCodes cd2a151
feat: moved open file handles state to mock file system and ran API a…
HarrisonTCodes fd3062a
feat: added proper checking of access and share on file stream constr…
HarrisonTCodes 543acdb
test: added unit tests to cover simultaneous file stream opening with…
HarrisonTCodes 795891b
fix: used explicit GUID call instead of target-typed new for clarity …
HarrisonTCodes 42a7402
Merge branch 'main' into fix/file-stream-sharing
HarrisonTCodes c689d74
chore: explicit API acceptance test changes for dotnet version 10
HarrisonTCodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -183,4 +183,23 @@ public bool TryNormalizeDriveName(string name, out string result) | |
| result = name; | ||
| return true; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Resolves and normalizes a path. | ||
| /// </summary> | ||
| public string FixPath(string path) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also this method could be made |
||
| { | ||
| if (path == null) | ||
| { | ||
| throw new ArgumentNullException(nameof(path), StringResources.Manager.GetString("VALUE_CANNOT_BE_NULL")); | ||
| } | ||
|
|
||
| var pathSeparatorFixed = path.Replace( | ||
| _mockFileDataAccessor.Path.AltDirectorySeparatorChar, | ||
| _mockFileDataAccessor.Path.DirectorySeparatorChar | ||
| ); | ||
| var fullPath = _mockFileDataAccessor.Path.GetFullPath(pathSeparatorFixed); | ||
|
|
||
| return fullPath; | ||
| } | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why do we need a public property for this?
Could we leave it at least internal to avoid breaking changes if we e.g. decide to use a dedicated class later on?