* Handle browser warnings
* Apply feedback, revert updates handled with different PRs
* Add misssing diagnotic id
* Address multitargeted warnings
* Apply feedback
* Small type/comment updates
* Apply more feedback
* Use project settings instead adding Directory.Build.props
* Annotate APIs injecting unsupported type through DI
* Fix window support related warnings found with generic type parameter
* Fix another browser warning found with generic type parameter bug fix
* All public APIs of ConsoleLoggerExtensions are unsupported, so marking entire type as unsupported on browser
* Try handle mono warnings
* Revert mono related changes, it was mistake
* Try handle browser warninga in mono
* Apply feedback and fix new warnings caused from corelib changes
* Review update
* Apply feedback
* Move platform specific section from HttpTelemetry
* Revering unwanted changes
* Remove redundant attributes
* Exclude cross platform build with browser target
* small updates
* Annotate entire type DiagnosticCounter unsupported
* Apply feedback, improve suppression comments
* Remove Unsupported browser from TypeDescriptor.CreateInstance, TypeDescriptionProvider.CreateInstance and related updates
* Annotate System.Net.WebSockets.WebSocketProtocol for nullable reference types
This also helped find that the annotation of WebSocketReceiveResult(..., string closeDescription) was wrong in the ref (it was correct in the src), so I fixed that.
* Address PR feedback and suppress netcoreapp2.1 warnings
* Auto-generate the reference assemblies
* Add back type forwards.
* Revert "Add back type forwards."
This reverts commit dotnet/corefx@3acf74aabb.
* Add back TypeForwardedTo in .Forward.cs files
* Add new type forward files to the csproj files
* Add back if-defs and move TestUtilities comment from ref to source
* Remove duplicate definitions, delete unnecessary manual files,
* Fix build breaks
* Add back missing AsyncMethodBuilderAttr to S.Runtime ref
* Fix typo between XmlDocument and XPath.XDocument
* Add type forward fild missed from previous commit
* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1
* Remove "this type was moved to comments" from the type forwards.
* Add back the Xml and Debugger* attributes to Xml.ReaderWriter
* Add back struct layout attributes
* Add back attributes missing (highlighted from api compat)
* Add missing toolbox item attribute in s.data.common.
* Add missing struct layout attributes and remove unnecessary additions
* Add back InterfaceTypeAttribute
Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
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
Following our new guidelines for ref assembly implementations and what GenApi now creates, this updates all of our ref .cs files to use "throw null;" for member bodies that can't just be empty (i.e. members that need to return a value either via the return type or via an out parameter). I made the change programatically using a simple Roslyn-based tool.
Commit migrated from https://github.com/dotnet/corefx/commit/a9fdc79ff8feb5ad46e9fcbe18fdffcd0bd74679
Adds to System.Net.WebSockets:
- WebSocketException deriving from Win32Exception
- WebSocketException.ctor()
- WebSocket.DefaultKeepAliveInterval
- WebSocket.CreateClientBuffer
- WebSocket.CreateClientWebSocket
- WebSocket.CreateServerBuffer
- WebSocket.IsApplicationTargeting45
- WebSocket.IsStateTerminal
- WebSocket.ReisterPrefixes
- WebSocket.ThrowOnInvalidState
- WebSocketContext.RequestUri
- WebSocketContext.Headers
- WebSocketContext.Origin
- WebSocketContext.SecWebSocketProtocols
- WebSocketContext.SecWebSocketKey
- WebSocketContext.CookieCollection
- WebsocketContext.User
- WebSocketContext.IsAuthenticated
- WebSocketContext.IsLocal
- WebSocketContext.IsSecureConnection
- WebSocketContext.WebSocket
(Several of these members just throw PlatformNotSupportedException. Others have a different implementation than on desktop but something that's reasonable for corefx given the rest of the implementation's differences, e.g. limits on buffer sizes.)
Adds to System.Net.WebSockets.Client:
- ClientWebSocketOptions.UseDefaultCredentials
- ClientWebSocketOptions.SetBuffer(int, int)
- ClientWebSocketOptions.SetBuffer(int, int, ArraySegment<byte>)
As part of this, I also:
- Updated ClientWebSocketOptions.KeepAliveInterval to default to 30 seconds, as it does on desktop, rather than defaulting to 0.
- Updated the managed websockets implementation to take the ClientWebSocketOptions buffer information into account, in particular the receive buffer size and the buffer itself (as long as offset and count don't represent a subset, which would have been a more intrusive change to support).
Commit migrated from https://github.com/dotnet/corefx/commit/c97a2c7ac8ff5a4473348adf2ba6ca6a141de116
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions. Assemblies with API differences
get a minor version bump. Assemblies with only bugfixes get a build version
bump.
In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.
[tfs-changeset: 1514419]
Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae