TestingHelpers: Lazily create File|DirectorySecurity for better suppo…#273
Closed
fgreinacher wants to merge 2 commits intoTestableIO:masterfrom
fgreinacher:linux-compat
Closed
TestingHelpers: Lazily create File|DirectorySecurity for better suppo…#273fgreinacher wants to merge 2 commits intoTestableIO:masterfrom fgreinacher:linux-compat
fgreinacher wants to merge 2 commits intoTestableIO:masterfrom
fgreinacher:linux-compat
Conversation
…rt on non-Windows OSes Both FileSecurity and DirectorySecurity are not supported on non-Windows OSes and will throw PlatformNotSupportedException when called. MockDirectoryData & FileDirectoryData create instances of them when they are created. This makes them unusable on non-Windows OSes even if the actual *Security functionality is not used. This change delays their creation to the point where they are actually necessary. That makes them usable again as long as *Security functioanlity is not used.
Contributor
Author
|
@tathamoddie Would be great to have this reviewed. This issue prevents using the library on any non-Windows system. Thanks! |
Contributor
|
Hi @fgreinacher. How do we know this won't regress in future? Can you add any tests? |
Contributor
Author
|
Sure, I'll try to get the test running on Travis CI to ensure unix compatbility. |
|
Possibly related -- one can't install System.IO.Abstractions into a Xamarin.IOS project, again because of the Security types. The version of System.IO used by Xamarin.IOS does contain System.Security.AccessControl. |
Contributor
|
#289 fixed this with comments |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…rt on non-Windows OSes
Both FileSecurity and DirectorySecurity are not supported on non-Windows OSes and will throw PlatformNotSupportedException when called. MockDirectoryData & FileDirectoryData create instances of them when they are created. This makes them unusable on non-Windows OSes even if the actual *Security functionality is not used.
This change delays their creation to the point where they are actually necessary. That makes them usable again as long as *Security functioanlity is not used.
Fixes #272