* Remove SerializableAttribute from many CoreFX types that will not be serializable.
* Removes serialization tests for types that are no longer serializable and fixes serializing a couple of types. Includes marking some internal serializable types as public so that they'll be reflectible with .NET Native.
* Remove unneeded pragmas
* Update based on review comments
Commit migrated from https://github.com/dotnet/corefx/commit/6dd451f51451a7d0ceea6104b51bd17005e9a0e6
* Fix using Directory to move files
See dotnet/corefx#19710. NetFX behavior is that you can use Directory
to move files. This was broken trying to match other legacy
behavior in dotnet/corefx#17913. Tested on NetFX and CoreFX.
* Fix check for Unix
Unix impl doesn't tolerate a trailing separator. Public api
explicitly checks for this.
* More fixes and tests
Unix won't move the file with a trailing slash. Add more tests
for different combinations of trailing slashes. Validated against
NetFX.
* Attempt to get MoveDirectory further aligned
Trying to handle trailing separator on a source file cases
in the same way as Windows.
* Extend tests, move Unix condition
* Another tweak and more tests
* Fix comment
Commit migrated from https://github.com/dotnet/corefx/commit/ea514e2f4e61bd3128ea3753071af2681f17f063
The FileShareOpen test has been failing sporadically with sharing violations. It turns out the problem has to do with FileShare.Inheritable being included in the list of FileShare values to test. If another test in the same process concurrently spawns a process while a FileShare.Inheritable file is open, that file's handle will be inherited into the child process, which will in turn keep the file in use for longer than the test expects. When it then tries to re-open the file, it may encounter a sharing violation if the subsequent open is incompatible with the previous one's FileShare.
Commit migrated from https://github.com/dotnet/corefx/commit/041672ff3642753807a4502a4c407cb82bfa1009
In some of our test suites, we use a pattern where a base class contains the core test logic and then derived classes override various members in those base classes to customize the actual tests. xunit then runs the base methods for each of the derived types.
Since xunit by default parallelizes inter-class, meaning it won't parallelize tests on the same class but will on different classes, tests on the base class may run in parallel with themselves, though, when actually being run for different concrete derived types. This is problematic when the tests pick temporary file names based on the test itself, e.g. using the FileCleanupTestBase helper that derives a temporary file name from the current member name, line number, etc.
To avoid such conflicts, this changes adds a random identifier into each such temporary file name.
Commit migrated from https://github.com/dotnet/corefx/commit/8c16d26d42c3aa81b28e4aeb790a821bd67c03b8
Neither the link/unlink nor copy-all-data approaches work well on a case-insensitive file system when just changing the casing of the file name. This commit adds an upfront check that detects when the files are the same, and in such cases, just does a rename.
Commit migrated from https://github.com/dotnet/corefx/commit/f29050cf9cad6e62afc3cb4917e1e9056a1abe3c
We currently consider a file to be hidden if its name starts with a period. That applies to directories as well. But if the directory name in the FileSystemInfo ends with a '/', then the file name that comes back from GetFileName is empty, and it's actually the GetDirectoryName value we want to check for a period.
Commit migrated from https://github.com/dotnet/corefx/commit/de10647c8f3cb4190653bf243c515d3431689004
Now instead of Use*Key a project can instead define the assembly key
in the project (genreally the common dir.pops for a project) using
the AssemblyKey property. The accepted values are Open, ECMA, MSFT,
Test.
This change allows for a repo to set the default key they want to use
for projects. In corefx we have switched the default to use the Open
key instead of the old BuildTools default of MSFT key.
As part of this update we are explicitly setting the AssemblyKey in
all the library projects (although it is really only necessary for
projects that aren't the default).
Also with this change we are updating all the new libraries that have
not yet shipped stable (compared to our 1.1 release) and making them
use the Open key. Which means that for prerelease dependencies there
might be some binary breaking changes to consume.
The following libraries ahven't shipped so there key is being
changed from MSFT to Open:
Microsoft.XmlSerializer.Generator
System.CodeDom
System.Configuration.ConfigurationManager
System.Data.Odbc
System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protocols
System.IO.Ports
System.Json
System.Memory
System.Net.HttpListener
System.Net.Mail
System.Net.ServicePoint
System.Net.WebClient
System.Net.WebProxy
System.Private.Xml
System.Private.Xml.Linq
System.Security.Cryptography.Xml
System.Security.Permissions
System.Transactions.Local
System.Web.HttpUtility
Commit migrated from https://github.com/dotnet/corefx/commit/ac09a797d09502ebab61f7167bb856846602e1e6