Ran /t:GenerateReferenceSource and undid irrelevant changes, though I kept a few files where the changes were trivial (e.g. whitespace) and it seemed better to just accept the change to stay in sync with GenerateReferenceSource.
In general I only added missing overrides on non-sealed classes, but when there were already overrides included on sealed classes, I added them back for consistency.
Commit migrated from https://github.com/dotnet/corefx/commit/10aa8277de2521fb1e6a5b42d053ad8cc947be81
* Enumerating strings should retain trailing separators
This is a regression introduced by the enumeration overhaul. We didn't have tests that covered trailing separators in the specified root directory when enumerating. They should be retained as is.
Commit migrated from https://github.com/dotnet/corefx/commit/e5b4059217c9958662d8f7bc6749c8a051f55cfb
* Populate the original path when creating directories
The DirectoryInfo class should be the same when calling Directory.Create() as
it would be creating DirectoryInfo directly then calling create on it.
* Use Combine instead of Join (for NetFX)
* Fix test
The different behavior with desktop is only with the Directory.Create
path.
Commit migrated from https://github.com/dotnet/corefx/commit/2c3bdc61c1bdae804ce862d12285934acbc85bd6
* Update IRetainable, OwnedMemory, and MemoryHandle APIs
* Split OwnedMemory into MemoryManager and IMemoryOwner
* Update ReadOnlySequence, ArrayMemoryPool, and BufferSegment
* Update System.Memory and System.IO.Pipeline tests
* Temporarily skipping the failing Pipelines tests until impl is corrected.
* Update the reference assembly to match implementation and cleanup
* Update API compat baseline for UAPAOT and add GenFacadesIgnoreMissingTypes
* Fix the System.Runtime ref
* Add back the Pin methods to the uapaot api compat baseline
* Clone the API compat baseline from uapaot and add it for uap as well.
* Update BuildTools, CoreClr, CoreFx, CoreSetup, ProjectNTfs, ProjectNTfsTestILC to preview3-02630-01, preview3-26330-08, preview3-26330-06, preview3-26330-04, beta-26330-00, beta-26330-00, respectively
* Fix pipelines tests and update the api compat baseline shim for uapaot
* Add empty Unpin override to pipe pool test.
* Fix the System.Net.Http Functional tests
Commit migrated from https://github.com/dotnet/corefx/commit/f592e887e2349ed52af6a83070c42adb9d26408c
Some file systems, like procfs, can return 0 for a file's length, even though it actually contains on-demand computed contents. This breaks File.ReadAllBytes{Async}, which currently assumes that a length of 0 means the file is empty. This commit fixes it by changing the assumption to mean that a length of 0 means we can't depend on the Length and instead need to read until EOF.
Commit migrated from https://github.com/dotnet/corefx/commit/77bf4078608a5229afd3132115638b59215f478b
* Use FileSystemName in FileSystemWatcher
- Uses newer spanified version in FileSystemName
- Doesn't allow extended match chars `<`, `>`, `"` as these are legal in Unix
* Plumb through the case sensitivity
* Update tests
* Tweak test for netfx
* Tweak the comment to be a bit more readable
Commit migrated from https://github.com/dotnet/corefx/commit/fcfb556ebf99ed551c02d0146c805e792b264cf2
* Support trimmed paths in FileInfo
Some paths are not creatable in Windows without special syntax. Notably paths with trailing spaces and periods. As GetFullPath() (and GetFullPathName()) trim these we would lose the correct file name as we passed the path around. With the enumeration changes we now populate FileInfo correctly- this change allows the other methods to work when wrapped around such a path.
* Tweak comments.
Remove NotSupported and SecurityException from Exists as these are no longer thrown.
Add a test fix I hadn't staged correctly.
Commit migrated from https://github.com/dotnet/corefx/commit/41a2120b233cc02c175f812e4e19e3f058396cb0
ReadAllTextAsync is convenience method that allocates a lot anyway, so the saving from StringBuilderCache is unlikely to show up. And this method is unlikely to be used for small strings where StringBuilderCache helps anyway.
Commit migrated from https://github.com/dotnet/corefx/commit/80918915b4df50047e763a3a6ee36aa20809e6da
This commit does several things:
- Exposes the new `ValueTask` extensibility model being added in coreclr. The ValueTask-related files will separately be mirrored over to corefx to enable the netstandard build of System.Threading.Tasks.Extensions.
- Adapts all `Stream`-derived types to return `ValueTask` instead of `Task` from `WriteAsync`.
- Changes the new `WebSocket` `SendAsync` method to return `ValueTask` instead of `Task`, and updates the `ManagedWebSocket` implementation accordingly. Most `SendAsync`s on `ManagedWebSocket` should now return a `ValueTask` that's either completed synchronously (no allocation) or using a pooled object. It now uses the underlying transport's new `WriteAsync` overload that returns `ValueTask`.
- Switches more uses of `ReadAsync` and `WriteAsync` over to the new overloads, including in Process, DeflateStream, BrotliStream, File, HttpClient, SslStream, WebClient, BufferedStream, CryptoStream,
- Removed some unnecessary array clearing from various routines using ArrayPool (after the clearing was added we changed our minds and decided clearing was only necessary in very specific circumstances)
- Implements a custom `IValueTaskSource` in Socket, such that async receives and sends become allocation-free (ammortized). `NetworkStream` then inherits this functionality, such that its new `ReadAsync` and `WriteAsync` are also allocation-free (in the unbounded channel implementations; we can subsequently add it in for bounded).
- Implements a custom `IValueTaskSource` in System.Threading.Channels, such that reading and writing are ammortized allocation-free up to one concurrent reader and writer.
- A few random things I noticed as I was going through, e.g. missing ConfigureAwait, some incorrect synchronization in tests, etc.
- Adds a ton of new tests, mainly in System.Threading.Tasks.Extensions, System.Threading.Channels, and System.Net.Sockets.
Commit migrated from https://github.com/dotnet/corefx/commit/6d1671b2cfcf130b7bc6c059bb0508073426532a