platform/upstream/dotnet/runtime.git
4 years agoExpose SuppressGCTransitionAttribute (dotnet/corefx#41997)
Aaron Robinson [Tue, 22 Oct 2019 20:41:56 +0000 (13:41 -0700)]
Expose SuppressGCTransitionAttribute (dotnet/corefx#41997)

Commit migrated from https://github.com/dotnet/corefx/commit/17d22ab65efa048b2971d2d1c93cb8bfa54635b4

4 years agoAnnotate System.Text.Encoding.CodePages for nullable reference types (dotnet/corefx...
Stephen Toub [Tue, 22 Oct 2019 20:29:31 +0000 (16:29 -0400)]
Annotate System.Text.Encoding.CodePages for nullable reference types (dotnet/corefx#41991)

* Annotate System.Text.Encoding.CodePages for nullable reference types

* Fix .NET Core 2.0 build

I'm not sure why we still build for this as a target, but there a bunch of nullability failures in the build because Debug.Assert isn't annotated in .NET Core 2.0's surface area, and thus places we're relying on Debug.Assert to suppress nullable warnings are failing.

Commit migrated from https://github.com/dotnet/corefx/commit/d850afb1435c27ee036a09c564bfd84607fb0e94

4 years agoHandle non blittable LOGFONT structs (dotnet/corefx#41975)
Jeremy Kuhne [Tue, 22 Oct 2019 19:56:32 +0000 (12:56 -0700)]
Handle non blittable LOGFONT structs (dotnet/corefx#41975)

* Handle non blittable LOGFONT structs

Adding support for blittable structs broke non-blittable structs passed to `Font.FromLogFont`. Try to blit and fall through to the marshaller for non blittable types.

Fixes: https://github.com/dotnet/winforms/issues/2136

* Clarify comment block

Commit migrated from https://github.com/dotnet/corefx/commit/0e524eba15fd96755c45ffe93b23007a13c89f5f

4 years agoRevert license renaming (dotnet/corefx#42002)
Viktor Hofer [Tue, 22 Oct 2019 19:06:27 +0000 (21:06 +0200)]
Revert license renaming (dotnet/corefx#42002)

Commit migrated from https://github.com/dotnet/corefx/commit/0b514bd24fee534b10afa31a29d8cdcc6d7a920f

4 years agoSystem.IO.FileSystem.MoveFile(...) will now delete source file after copying it to...
Anton Landor [Tue, 22 Oct 2019 19:04:08 +0000 (21:04 +0200)]
System.IO.FileSystem.MoveFile(...) will now delete source file after copying it to its destination when moving files over file systems. (dotnet/corefx#41767)

Commit migrated from https://github.com/dotnet/corefx/commit/fd752586114139c6f42a44b86c9afddd1a128df4

4 years agoRename LICENSE to LICENSE.TXT (dotnet/corefx#42000)
Viktor Hofer [Tue, 22 Oct 2019 18:59:07 +0000 (20:59 +0200)]
Rename LICENSE to LICENSE.TXT (dotnet/corefx#42000)

Commit migrated from https://github.com/dotnet/corefx/commit/23f5ecd6a1231d286257d9cc2efda549efed949b

4 years agoUnit tests to verify value returned by DirectoryInfo.Parent.ToString, both in CoreFX...
Carlos Sanchez Lopez [Tue, 22 Oct 2019 18:44:29 +0000 (11:44 -0700)]
Unit tests to verify value returned by DirectoryInfo.Parent.ToString, both in CoreFX and in Framework. (dotnet/corefx#41452)

Commit migrated from https://github.com/dotnet/corefx/commit/f7081cf3bac10352f4a3ac57aa4b5c0963d33e77

4 years agoAnnotate System.Runtime.Serialization.Primitives for nullable reference types (dotnet...
Stephen Toub [Tue, 22 Oct 2019 17:48:43 +0000 (13:48 -0400)]
Annotate System.Runtime.Serialization.Primitives for nullable reference types (dotnet/corefx#41992)

Commit migrated from https://github.com/dotnet/corefx/commit/bc7a8d93838d23573069fe792aa326d001ec300f

4 years agoUpdate TsaBugAreaPath to fix SDL Validation (dotnet/corefx#41993)
Santiago Fernandez Madero [Tue, 22 Oct 2019 17:27:41 +0000 (10:27 -0700)]
Update TsaBugAreaPath to fix SDL Validation (dotnet/corefx#41993)

Commit migrated from https://github.com/dotnet/corefx/commit/2513d13acfb7fff55c8d4f956bcc3d64cf33f810

4 years agoMerge pull request dotnet/corefx#41903 from steveharter/DictionaryOfT
Steve Harter [Tue, 22 Oct 2019 15:31:09 +0000 (10:31 -0500)]
Merge pull request dotnet/corefx#41903 from steveharter/DictionaryOfT

Support IDictionary<string,TValue> without IDictionaryEnumerator

Commit migrated from https://github.com/dotnet/corefx/commit/d3c298496e9dbdc35008efcaa6c863286f211170

4 years agoFix a rare GetAwaiter().GetResult() on a ValueTask in System.Net.Http (dotnet/corefx...
Stephen Toub [Tue, 22 Oct 2019 14:23:15 +0000 (10:23 -0400)]
Fix a rare GetAwaiter().GetResult() on a ValueTask in System.Net.Http (dotnet/corefx#41958)

* Fix a rare GetAwaiter().GetResult() on a ValueTask in System.Net.Http

If someone's custom HttpContent-derived type is implementing their async SerializeToStreamAsync with synchronous Write calls on the destination stream, and if that WriteAsync method returns an IValueTaskSource-based ValueTask that's not yet completed, this could throw an exception.   This is unlikely to actually negative impact anyone right now, but it's worth fixing.  This is one of the patterns an analyzer around ValueTasks will help find and fix.

* Update src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpBaseStream.cs

Commit migrated from https://github.com/dotnet/corefx/commit/f37f05d4a7d916f14980456e9ddb95d2708efa24

4 years agoCleanup unused locals in more places (dotnet/corefx#41964)
Kevin Jones [Tue, 22 Oct 2019 14:16:21 +0000 (10:16 -0400)]
Cleanup unused locals in more places (dotnet/corefx#41964)

* Removed unused locals from AsnReader.

The return value of the method is not needed however the out values
are.

* Remove key local from ECDiffieHellmanCng.

The return value is not needed however the key still needs to be
generated.

* Remove key local from ECDsaCng.

The return value is not needed however the key still needs to be
generated.

* Remove unused local.

The return value is not needed from the method however the out
parameters are.

* Discard result from `CryptAcquireContext`.

The result is discarded rather than entirely omitted to clearly express
the intent that the return value is not used.

Commit migrated from https://github.com/dotnet/corefx/commit/3d4511a79cbdbe85832c2af2ec18e165b696adc9

4 years agoDisable ComponentModel MemberDescriptor parallel (dotnet/corefx#41985)
Viktor Hofer [Tue, 22 Oct 2019 12:55:16 +0000 (14:55 +0200)]
Disable ComponentModel MemberDescriptor parallel (dotnet/corefx#41985)

Commit migrated from https://github.com/dotnet/corefx/commit/007f4456374c582ebc7a7a678072935a2560eee5

4 years agoUse Sse2 instrinsics to make NeedsEscaping check faster for large JSON strings (dotne...
Ahson Khan [Tue, 22 Oct 2019 07:59:19 +0000 (00:59 -0700)]
Use Sse2 instrinsics to make NeedsEscaping check faster for large JSON strings (dotnet/corefx#41845)

* Use Sse2 instrinsics to make NeedsEscaping check faster for large
strings.

* Update the utf-8 bytes needsescaping and add tests.

* Remove unnecessary bitwise OR and add more tests

* Add more tests around surrogates, invalid strings, and characters >
short.MaxValue.

Commit migrated from https://github.com/dotnet/corefx/commit/7cae92b39d2fed2e4e88e900f2e7d787ed9f6cfa

4 years agoAdditional merge issues and non-generic support for that
Steve Harter [Mon, 21 Oct 2019 23:57:52 +0000 (18:57 -0500)]
Additional merge issues and non-generic support for that

Commit migrated from https://github.com/dotnet/corefx/commit/3a5409bc2f56fccb1d39c4ae37bfd6a15f06e73f

4 years agoMerge branch 'master' of https://github.com/steveharter/dotnet_corefx into DictionaryOfT
Steve Harter [Mon, 21 Oct 2019 22:55:44 +0000 (17:55 -0500)]
Merge branch 'master' of https://github.com/steveharter/dotnet_corefx into DictionaryOfT

Commit migrated from https://github.com/dotnet/corefx/commit/d52aae926802668d0296fa346bcbe50b1b3a3cab

4 years agoGuard against attempting to creating out-of-range spans in macOS FileSystemWatcher...
Stephen Toub [Mon, 21 Oct 2019 22:13:35 +0000 (18:13 -0400)]
Guard against attempting to creating out-of-range spans in macOS FileSystemWatcher (dotnet/corefx#41957)

* Guard against attempting to creating out-of-range spans in macOS FilesystemWatcher

Fixes https://github.com/dotnet/corefx/issues/40054

* Address PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/4277ccfa457d0dfad3fad00f8adbd27781b3bc57

4 years agoCache polymorphic properties (dotnet/corefx#41753)
Petr Onderka [Mon, 21 Oct 2019 20:37:17 +0000 (22:37 +0200)]
Cache polymorphic properties (dotnet/corefx#41753)

* Cache polymorphic properties

* Move RuntimePropertyCache to JsonClassInfo

* Added test of RuntimePropertyCache using properties with different attributes

* Fixed typo

Co-Authored-By: Ahson Khan <ahkha@microsoft.com>
* Use allocating overload of GetOrAdd on .Net Standard 2.0

Commit migrated from https://github.com/dotnet/corefx/commit/46299619e290936c495264162ede68354ced5b18

4 years agoRefactor DllImports in System.Reflection.Metadata (dotnet/corefx#40579)
madmir [Mon, 21 Oct 2019 20:25:04 +0000 (22:25 +0200)]
Refactor DllImports in System.Reflection.Metadata (dotnet/corefx#40579)

Commit migrated from https://github.com/dotnet/corefx/commit/90706ad4925bb66f83b3fcade61ddda4c7a0f4e4

4 years agoDon't root FileSystemWatcher unnecessarily (dotnet/corefx#41872)
Stephen Toub [Mon, 21 Oct 2019 17:46:01 +0000 (13:46 -0400)]
Don't root FileSystemWatcher unnecessarily (dotnet/corefx#41872)

We already try to do this on Unix, though it seems we don't currently have tests for it, but we don't on Windows.

Commit migrated from https://github.com/dotnet/corefx/commit/776aae562a1e65e80db00d83669b59802cf153cb

4 years agoAdd readonly to members of System.Drawing.Primitives (dotnet/corefx#40407)
Fons Sonnemans [Mon, 21 Oct 2019 16:10:37 +0000 (18:10 +0200)]
Add readonly to members of System.Drawing.Primitives (dotnet/corefx#40407)

Commit migrated from https://github.com/dotnet/corefx/commit/4746f754a5a46c465d083c8999335d62e607f25d

4 years agoFix a build error on ARM (dotnet/corefx#41937)
Dong-Heon Jung [Mon, 21 Oct 2019 16:09:44 +0000 (01:09 +0900)]
Fix a build error on ARM (dotnet/corefx#41937)

- Add type casting in CryptoNative_X509VerifyCertErrorString

Commit migrated from https://github.com/dotnet/corefx/commit/f359e8c48ea9000c1cc588365daabe396e35afc2

4 years agoRemove dead code null check from DirectoryEntry (dotnet/corefx#41843)
Roman Marusyk [Mon, 21 Oct 2019 15:10:02 +0000 (17:10 +0200)]
Remove dead code null check from DirectoryEntry (dotnet/corefx#41843)

* Fix possible NRE in DirectoryEntry from System.DirectoryServices

* Update DirectoryEntry.cs

Commit migrated from https://github.com/dotnet/corefx/commit/c037aa0c71b4cd3d506aab843997ca06ce390c3a

4 years agoUpdate breaking change rules for default interface methods (dotnet/corefx#41949)
Michal Strehovský [Mon, 21 Oct 2019 14:58:21 +0000 (16:58 +0200)]
Update breaking change rules for default interface methods (dotnet/corefx#41949)

* Update breaking change rules for default interface methods

* Apply suggestions from code review

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/7c7a167b20bb33140c05c03edb4ef98affa2a5c3

4 years agoBackup important wiki information (dotnet/corefx#41774)
Carlos Sanchez Lopez [Mon, 21 Oct 2019 13:52:38 +0000 (06:52 -0700)]
Backup important wiki information (dotnet/corefx#41774)

* Backup important wiki information

* Restore original title in unix-instructions.md

* FreeBSD instructions only for 3.0

* Remove conferences.md

* update unix-instructions.md title

* Move FreeBSD link to the end of unix-instructions.md

Commit migrated from https://github.com/dotnet/corefx/commit/9f5e3025ee2cfbd96e8854f6d0fd92add9592788

4 years agoFix XSLT tests to deterministically pick newer xsltc.exe (dotnet/corefx#41919)
Dan Moseley [Mon, 21 Oct 2019 13:50:01 +0000 (06:50 -0700)]
Fix XSLT tests to deterministically pick newer xsltc.exe (dotnet/corefx#41919)

* Fix XSLT tests

* Typo

* Typo

* Nits

Commit migrated from https://github.com/dotnet/corefx/commit/340db06faadb1256c02d3eab8e36b6f3c2972bb0

4 years agoUpdate netfx queue to Windows 10 19H1 (dotnet/corefx#41942)
Viktor Hofer [Mon, 21 Oct 2019 13:13:09 +0000 (15:13 +0200)]
Update netfx queue to Windows 10 19H1 (dotnet/corefx#41942)

Commit migrated from https://github.com/dotnet/corefx/commit/8bc0584c5d84eb83bf5901a7f3de83549e5518e1

4 years agoDisabling TaskCanceledQuickly timing out test (dotnet/corefx#41941)
Viktor Hofer [Mon, 21 Oct 2019 13:06:57 +0000 (15:06 +0200)]
Disabling TaskCanceledQuickly timing out test (dotnet/corefx#41941)

Commit migrated from https://github.com/dotnet/corefx/commit/69fc7edb110a69345253060bb611deb3d4bec417

4 years agoStreamPipeWriter: don't flush when the writer is completed with an exception. (dotnet...
Tom Deseyn [Mon, 21 Oct 2019 03:50:38 +0000 (05:50 +0200)]
StreamPipeWriter: don't flush when the writer is completed with an exception. (dotnet/corefx#40874)

This provides a way to discard buffered data without pushing it to the inner Stream.

Commit migrated from https://github.com/dotnet/corefx/commit/03453d9aae8e5d18e571699c5d2229b1ab5f4b9d

4 years agoAdd tests to improving TimeSpan precision (dotnet/corefx#41499)
Boris Parfenenkov [Mon, 21 Oct 2019 02:50:08 +0000 (07:50 +0500)]
Add tests to improving TimeSpan precision (dotnet/corefx#41499)

Fix dotnet/corefx#41380

Commit migrated from https://github.com/dotnet/corefx/commit/db17568ad06ed96b08b5c31fef3e1a2554f6216e

4 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#41926)
dotnet-maestro[bot] [Sun, 20 Oct 2019 14:46:00 +0000 (14:46 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#41926)

* Update dependencies from https://github.com/dotnet/coreclr build 20191019.1

- Microsoft.NET.Sdk.IL - 5.0.0-alpha1.19519.1
- Microsoft.NETCore.ILAsm - 5.0.0-alpha1.19519.1
- Microsoft.NETCore.Runtime.CoreCLR - 5.0.0-alpha1.19519.1

* Update argument names for CoreLib change

Commit migrated from https://github.com/dotnet/corefx/commit/8d87e5cae96c5fb25ac21442bb56c337029d77a4

4 years agoA few more test scenarios for casting of nullables and open generic arrays. (dotnet...
Vladimir Sadov [Sun, 20 Oct 2019 01:01:33 +0000 (18:01 -0700)]
A few more test scenarios for casting of nullables and open generic arrays. (dotnet/corefx#41918)

* A few more test scenarios for casting of nullables and open generic arrays.

Commit migrated from https://github.com/dotnet/corefx/commit/03dd803990dfb8f05db8d0ec1bc34268386c1d5b

4 years agoImprove the performance of ImmutableList.Contains (dotnet/corefx#40540)
Nathan Mascitelli [Sat, 19 Oct 2019 20:44:24 +0000 (16:44 -0400)]
Improve the performance of ImmutableList.Contains (dotnet/corefx#40540)

* Improve ImmutableList.IndexOf performance

* Implement a spicific Contains method

IndexOf has a lot of overhead because it's looking for an index when
all Contains wants to do is find a matching element.

* Fix tests

* Revert change to IndexOf

Commit migrated from https://github.com/dotnet/corefx/commit/a866d9643f23ddd2f47762e02ccdd2e387a8e5c8

4 years agoFix invalid IL generated in Xml serializers (dotnet/corefx#39765)
Filip Navara [Sat, 19 Oct 2019 17:06:03 +0000 (19:06 +0200)]
Fix invalid IL generated in Xml serializers (dotnet/corefx#39765)

Commit migrated from https://github.com/dotnet/corefx/commit/5e4bf872154c17a1407997a38cc013fb12d5d1af

4 years agoAnnotate System.Resources.ResourceWriter for nullable ref types (dotnet/corefx#41880)
Dan Moseley [Sat, 19 Oct 2019 17:01:09 +0000 (10:01 -0700)]
Annotate System.Resources.ResourceWriter for nullable ref types (dotnet/corefx#41880)

* Annotate System.Resources.ResourceWriter for nullable ref types

* ref

* Mark common as nullable enable explicitly

* _resourceList

Commit migrated from https://github.com/dotnet/corefx/commit/1ed115a32d2eb0cfd329f36b01e0a8fadc3f484e

4 years agoUse Loopback for PreAuthenticate request test (dotnet/corefx#41891)
Viktor Hofer [Sat, 19 Oct 2019 16:41:09 +0000 (18:41 +0200)]
Use Loopback for PreAuthenticate request test (dotnet/corefx#41891)

* Use Loopback for PreAuthenticate request test

* Remove outgoing web request

Commit migrated from https://github.com/dotnet/corefx/commit/e23871fc42a09ce01f0977f8101b9eba29451d5b

4 years agoPrepare license and other files for the repo consolidation (dotnet/corefx#41912)
Viktor Hofer [Sat, 19 Oct 2019 12:09:46 +0000 (14:09 +0200)]
Prepare license and other files for the repo consolidation (dotnet/corefx#41912)

* Update .azure-ci.yml

* Rename LICENSE.TXT to LICENSE and others

Commit migrated from https://github.com/dotnet/corefx/commit/0cee444c677d5c52a71ab2d82c2488b8dc585d6a

4 years agoAdding single statement if formatting rule to coding-style (dotnet/corefx#41906)
Jose Perez Rodriguez [Sat, 19 Oct 2019 11:30:51 +0000 (04:30 -0700)]
Adding single statement if formatting rule to coding-style (dotnet/corefx#41906)

* Adding single statement if formatting rule to coding-style

cc: @stephentoub @carlossanlop

This came up in a recent PR and I just wanted to make it more clear in our Coding guidelines.

* Apply suggestions from code review

Co-Authored-By: Sam Harwell <sam.harwell@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/dab6a40e999373db3604c287c759e16fad0e3eb3

4 years agoAdd UTF8Encoding compat tests (dotnet/corefx#41910)
Levi Broderick [Sat, 19 Oct 2019 05:37:16 +0000 (22:37 -0700)]
Add UTF8Encoding compat tests (dotnet/corefx#41910)

Commit migrated from https://github.com/dotnet/corefx/commit/5590d3896f012c1c9b7774774456331a36ba1d57

4 years agoPopulate non-immutable collections directly on deserialize (dotnet/corefx#41482)
Layomi Akinrinade [Sat, 19 Oct 2019 00:31:06 +0000 (20:31 -0400)]
Populate non-immutable collections directly on deserialize (dotnet/corefx#41482)

* Populate non-immutable collections directly on deserialize

(rather than storing in temporary collections and using converters to
create and populate instances)

* Fix deserilizing nested dictionaries

* Don't get add method for types we can populate without reflection; fix failing tests

* Misc perf changes

* Additional changes

* More changes

* Address review feedback

* Address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/2c06259cf2400704e550a74bf7b044159c2fcce5

4 years agoDiscard unused locals cleanup (dotnet/corefx#41876)
Kevin Jones [Fri, 18 Oct 2019 21:36:26 +0000 (17:36 -0400)]
Discard unused locals cleanup (dotnet/corefx#41876)

* Discard result from GetC14NDigest.

GetC14NDigest is being used to update the `hashAlg` from the
`GetDigestedOutput`, as well as update the `_digestedSignedInfo` and
cache flag. The return value is not needed. Discard it to make that
clearer.

* Discard the result from `CertControlStore`.

The comment above the change explains the reason for discarding
the result.

* Ignore result from CryptAcquireContext.

The comment below justifies the reason for ignoring the local.

* Code review feedback.

Commit migrated from https://github.com/dotnet/corefx/commit/ef8756c03ff3808e2b065e6cf5c07aa169ac868f

4 years agoSupport IDictionary<string,TValue> without IDictionaryEnumerator
Steve Harter [Fri, 18 Oct 2019 15:27:43 +0000 (10:27 -0500)]
Support IDictionary<string,TValue> without IDictionaryEnumerator

Commit migrated from https://github.com/dotnet/corefx/commit/8124b88d3851c49a2cc09ce5de879b6622cd202e

4 years agoDisable MemoryCacheTest.Contains test (dotnet/corefx#41890)
Viktor Hofer [Fri, 18 Oct 2019 18:58:41 +0000 (20:58 +0200)]
Disable MemoryCacheTest.Contains test (dotnet/corefx#41890)

Commit migrated from https://github.com/dotnet/corefx/commit/b8048a1e2bd7ee776b4cb6df684db3a0b35886c1

4 years agoAnnotate System.ObjectModel for nullable (dotnet/corefx#41808)
buyaa-n [Fri, 18 Oct 2019 16:40:35 +0000 (09:40 -0700)]
Annotate System.ObjectModel for nullable (dotnet/corefx#41808)

Annotate System.ObjectModel for nullable

Commit migrated from https://github.com/dotnet/corefx/commit/0ca34f1595299b605f97149927c938a4e086b7f3

4 years agoStore Description value of ConfigurationProperty 2 (dotnet/corefx#41873)
Roman Marusyk [Fri, 18 Oct 2019 07:40:17 +0000 (09:40 +0200)]
Store Description value of ConfigurationProperty 2 (dotnet/corefx#41873)

* Store Description value of ConfigurationProperty

* Skip test on the .NET Framework

Commit migrated from https://github.com/dotnet/corefx/commit/2b92fc0930b941cd0d9146971745cd717689434c

4 years agoFollowup to add more extension data tests. (dotnet/corefx#41877)
Ahson Khan [Fri, 18 Oct 2019 02:20:43 +0000 (19:20 -0700)]
Followup to add more extension data tests. (dotnet/corefx#41877)

Commit migrated from https://github.com/dotnet/corefx/commit/5f5c965af1c14703d449da665a26a845eb76973a

4 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#41851)
dotnet-maestro[bot] [Thu, 17 Oct 2019 22:30:59 +0000 (22:30 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#41851)

* Update dependencies from https://github.com/dotnet/coreclr build 20191016.3

- Microsoft.NET.Sdk.IL - 5.0.0-alpha1.19516.3
- Microsoft.NETCore.ILAsm - 5.0.0-alpha1.19516.3
- Microsoft.NETCore.Runtime.CoreCLR - 5.0.0-alpha1.19516.3

* Add unit tests for DecoderNLS

Commit migrated from https://github.com/dotnet/corefx/commit/6eb32bf0faef55321f02b1502ddaeac6dc4a76f6

4 years agoRemove arcade SolutionBuildTargets hack (dotnet/corefx#41868)
Viktor Hofer [Thu, 17 Oct 2019 21:59:14 +0000 (23:59 +0200)]
Remove arcade SolutionBuildTargets hack (dotnet/corefx#41868)

* Remove arcade SolutionBuildTargets hack

Commit migrated from https://github.com/dotnet/corefx/commit/9b558d32e7dc784bb16aec11c22d56a82892cae3

4 years agoDisabling DualModeConnectAsync test (dotnet/corefx#41874)
Viktor Hofer [Thu, 17 Oct 2019 21:56:24 +0000 (23:56 +0200)]
Disabling DualModeConnectAsync test (dotnet/corefx#41874)

Commit migrated from https://github.com/dotnet/corefx/commit/73c898d40df25bbf195e8287c6e037aa036043db

4 years agoAnnotate System.Runtime.CompilerServices.Unsafe for nullable reference types (dotnet...
Stephen Toub [Thu, 17 Oct 2019 20:18:03 +0000 (16:18 -0400)]
Annotate System.Runtime.CompilerServices.Unsafe for nullable reference types (dotnet/corefx#41855)

* Annotate System.Runtime.CompilerServices.Unsafe for nullable reference types

The actual implementation is in IL, and there'd be no benefit to adding annotations there, so I've only annotated the C# ref assembly.

* Address PR feedback

Commit migrated from https://github.com/dotnet/corefx/commit/a7b4117d96e0b58a69bf4b76ef56fa9e8c0880bb

4 years agoAnnotate System.Web.HttpUtility for nullable reference types (dotnet/corefx#41854)
Stephen Toub [Thu, 17 Oct 2019 20:17:41 +0000 (16:17 -0400)]
Annotate System.Web.HttpUtility for nullable reference types (dotnet/corefx#41854)

Commit migrated from https://github.com/dotnet/corefx/commit/a97191b79893556ea9e798e56bda7f80eeba0567

4 years agoDelete unused files (dotnet/corefx#41869)
Jan Kotas [Thu, 17 Oct 2019 19:59:58 +0000 (12:59 -0700)]
Delete unused files (dotnet/corefx#41869)

Commit migrated from https://github.com/dotnet/corefx/commit/9b261704c5195fd2dbbceedc07486bb952d2a2f8

4 years agoMove analyzers restore to a .depproj to follow arcade Tools.proj convention (dotnet...
Santiago Fernandez Madero [Thu, 17 Oct 2019 19:58:29 +0000 (12:58 -0700)]
Move analyzers restore to a .depproj to follow arcade Tools.proj convention (dotnet/corefx#41832)

* Move analyzers restore to a .depproj to follow arcade Tools.proj convention

* Fix build break

* PR Feedback

Commit migrated from https://github.com/dotnet/corefx/commit/0a3bfee6f2af0e1558b98cae1a5b81ffd084aa99

4 years agoAnnotate System.Runtime.Numerics for nullable reference types (dotnet/corefx#41861)
Stephen Toub [Thu, 17 Oct 2019 17:36:29 +0000 (13:36 -0400)]
Annotate System.Runtime.Numerics for nullable reference types (dotnet/corefx#41861)

Commit migrated from https://github.com/dotnet/corefx/commit/5f46e170dee7ad6b03c5da8c014d8e95a05b835b

4 years agoAnnotate System.Runtime.InteropServices.RuntimeInformation for nullable reference...
Stephen Toub [Thu, 17 Oct 2019 17:23:20 +0000 (13:23 -0400)]
Annotate System.Runtime.InteropServices.RuntimeInformation for nullable reference types (dotnet/corefx#41856)

Commit migrated from https://github.com/dotnet/corefx/commit/fd6714a359ff68127e25f1aecbfbdf4be09524a7

4 years agoAnnotate System.Runtime.CompilerServices.VisualC for nullable reference types (dotnet...
Stephen Toub [Thu, 17 Oct 2019 17:13:17 +0000 (13:13 -0400)]
Annotate System.Runtime.CompilerServices.VisualC for nullable reference types (dotnet/corefx#41858)

This assembly really doesn't matter for nullability, as it's only meant to be used with C++/CLI and only by infrastructure.  There's also no annotations necessary on any of the contained attributes, as they are either parameterless or take a parameter that shouldn't be null.  Even so, we may as well mark the assembly as being annotated, so that its status is appropriately reflected by tools.

Commit migrated from https://github.com/dotnet/corefx/commit/57e30310253d9c720722f4363fb75e7df93efa67

4 years agoAdd back TraceListener handling for Callstack/LogicalOperationStack (dotnet/corefx...
Stephen Toub [Thu, 17 Oct 2019 17:00:08 +0000 (13:00 -0400)]
Add back TraceListener handling for Callstack/LogicalOperationStack (dotnet/corefx#41844)

Commit migrated from https://github.com/dotnet/corefx/commit/2177ff131e267472bab53f124fac160d7af952bb

4 years agoRemove UAP target (dotnet/corefx#41759)
Viktor Hofer [Thu, 17 Oct 2019 13:04:39 +0000 (15:04 +0200)]
Remove UAP target (dotnet/corefx#41759)

* Remove Uap target

* Remove RemoteInvokeForUap wrapper calls entirely

* Harvest S.D.SqlClient on UWP

* Disable UWP PInvoke analyzer

* Enable WindowsRuntime* tests on netcoreapp

Commit migrated from https://github.com/dotnet/corefx/commit/3b6ec2ba944fb72f921f95b99b6ebf2e7bb3dc5a

4 years agoRevert "Store Description value of ConfigurationProperty" (dotnet/corefx#41848)
Viktor Hofer [Thu, 17 Oct 2019 11:31:16 +0000 (13:31 +0200)]
Revert "Store Description value of ConfigurationProperty" (dotnet/corefx#41848)

This reverts commit dotnet/corefx@b9186cfa3566ee24e5f16e45c542a3078e128dc6.

Commit migrated from https://github.com/dotnet/corefx/commit/f9233ab726031451edce2b95c02f51fc09960132

4 years agoStore Description value of ConfigurationProperty
Roma Marusyk [Wed, 16 Oct 2019 23:47:53 +0000 (02:47 +0300)]
Store Description value of ConfigurationProperty

Commit migrated from https://github.com/dotnet/corefx/commit/b9186cfa3566ee24e5f16e45c542a3078e128dc6

4 years agoHTTP2: Support receiving dynamic table headers (dotnet/corefx#41295)
Cory Nelson [Wed, 16 Oct 2019 22:28:50 +0000 (15:28 -0700)]
HTTP2: Support receiving dynamic table headers (dotnet/corefx#41295)

Support HTTP2 dynamic table header decode. Improve some exception messaging in HPACK decoder. Resolves dotnet/corefx#41208

Commit migrated from https://github.com/dotnet/corefx/commit/7487aec03dc27b910ad4ea096544b850afc74876

4 years agoPass down /warnaserror switch for package testing (dotnet/corefx#41807)
Santiago Fernandez Madero [Wed, 16 Oct 2019 22:28:26 +0000 (15:28 -0700)]
Pass down /warnaserror switch for package testing (dotnet/corefx#41807)

* Pass down /warnaserror switch for package testing

* Fix baseline version for System.Composition.* packages now that we bumped their package versions

Commit migrated from https://github.com/dotnet/corefx/commit/a0e2e123e690b09c09c9d25c3100475b39edf230

4 years agoImprove error when socket ValueTask consumed incorrectly (dotnet/corefx#41831)
Stephen Toub [Wed, 16 Oct 2019 21:28:34 +0000 (17:28 -0400)]
Improve error when socket ValueTask consumed incorrectly (dotnet/corefx#41831)

* Improve error when socket ValueTask consumed incorrectly

* Update src/System.Net.Sockets/src/Resources/Strings.resx

Co-Authored-By: David Shulman <david.shulman@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/a60703d66f0a75a6bb05d584b7677d9b04edf46a

4 years agoAdd Utf8String ref asms, react to API changes
Levi Broderick [Wed, 16 Oct 2019 15:40:42 +0000 (08:40 -0700)]
Add Utf8String ref asms, react to API changes

Commit migrated from https://github.com/dotnet/corefx/commit/ba76ea2cf8ee916a28a26d657440b94829737d13

4 years agoMake ShellExecuteOnSTAThread's thread a background thread (dotnet/corefx#41827)
Stephen Toub [Wed, 16 Oct 2019 16:12:30 +0000 (12:12 -0400)]
Make ShellExecuteOnSTAThread's thread a background thread (dotnet/corefx#41827)

Commit migrated from https://github.com/dotnet/corefx/commit/fe148c1d954d105ab47d78717724f1504494aeb1

4 years agoUpdate nullability.md
Stephen Toub [Wed, 16 Oct 2019 13:57:13 +0000 (09:57 -0400)]
Update nullability.md

Commit migrated from https://github.com/dotnet/corefx/commit/aa1f450e6c6cfe1ded705d5d52c69c20c280daa1

4 years agouse background thread to wait for address changes on OSX (dotnet/corefx#41768)
Tomas Weinfurt [Wed, 16 Oct 2019 05:10:51 +0000 (22:10 -0700)]
use background thread to wait for address changes on OSX (dotnet/corefx#41768)

* use background thread to wait for address changes on OSX

* remove RemoteExecutor

* update comment

Commit migrated from https://github.com/dotnet/corefx/commit/08bf1fec4bbb44bab804f068878812aacb06b4d0

4 years agoAdd stable versions for Microsoft.Bcl.* packages (dotnet/corefx#41800)
Santiago Fernandez Madero [Wed, 16 Oct 2019 04:40:28 +0000 (21:40 -0700)]
Add stable versions for Microsoft.Bcl.* packages (dotnet/corefx#41800)

Commit migrated from https://github.com/dotnet/corefx/commit/0bd57b9199e486031c25891aa0290bcb41350a8c

4 years agoDisable deterministically failing outerloop CNG tests (dotnet/corefx#41812)
Stephen Toub [Wed, 16 Oct 2019 04:17:36 +0000 (00:17 -0400)]
Disable deterministically failing outerloop CNG tests (dotnet/corefx#41812)

Commit migrated from https://github.com/dotnet/corefx/commit/40f2e587a576b708c276c7a3dc2aa37dc54b5244

4 years agoDisable finalization of bogus SafeWaitHandles (dotnet/corefx#41801)
Filip Navara [Wed, 16 Oct 2019 01:51:21 +0000 (03:51 +0200)]
Disable finalization of bogus SafeWaitHandles (dotnet/corefx#41801)

Fixes https://github.com/dotnet/corefx/issues/41635#issuecomment-542409299.

Commit migrated from https://github.com/dotnet/corefx/commit/b50bd0a1d3f0326fc717706cb5c5950ab41cf437

4 years agoSocket: don't perform RST close on Dispose when user called Shutdown (dotnet/corefx...
Tom Deseyn [Wed, 16 Oct 2019 01:28:17 +0000 (03:28 +0200)]
Socket: don't perform RST close on Dispose when user called Shutdown (dotnet/corefx#41250)

* Socket: don't perform RST close on Dispose when user called Shutdown

* Add test

* PR feedback

* Remove confusing 'canAbort' local

* Improve comments

Commit migrated from https://github.com/dotnet/corefx/commit/4826532b12be39f4b6634d73a13ddb6a2e346697

4 years agoFixing NullReferenceException in XmlSchemaAnyAttribute.Namespace (dotnet/corefx#41731)
Martin Frýdl [Tue, 15 Oct 2019 17:45:35 +0000 (19:45 +0200)]
Fixing NullReferenceException in XmlSchemaAnyAttribute.Namespace (dotnet/corefx#41731)

* Fixing NullReferenceException when XmlSchemaAnyAttribute.Namespace is not set (dotnet/corefx#41704)

* Fixing tests according to review

Commit migrated from https://github.com/dotnet/corefx/commit/75d19b61b20197f3e6348f5e444e9e3af0f0750a

4 years agoFix whitespace causing warning-as-error
Stephen Toub [Tue, 15 Oct 2019 17:29:00 +0000 (13:29 -0400)]
Fix whitespace causing warning-as-error

Commit migrated from https://github.com/dotnet/corefx/commit/f1ca289f156664e8e5e26c12a350e424ae15def1

4 years agoReplace tfm based constants with SDK ones (dotnet/corefx#41601)
Eriawan Kusumawardhono [Tue, 15 Oct 2019 17:11:40 +0000 (00:11 +0700)]
Replace tfm based constants with SDK ones (dotnet/corefx#41601)

* replace DefineConstants with SDK ones

Commit migrated from https://github.com/dotnet/corefx/commit/2133679ff62222ba2734232ab8fa4c65765e82a2

4 years agoRewrite Uri.EscapeString (dotnet/corefx#41772)
Stephen Toub [Tue, 15 Oct 2019 16:27:31 +0000 (12:27 -0400)]
Rewrite Uri.EscapeString (dotnet/corefx#41772)

* Rewrite Uri.EscapeString

Several public methods (Uri.EscapeDataString, Uri.EscapeUriString) and a bunch of internal call sites rely on the internal EscapeString helper.  This helper has several issues with it:
- It uses unsafe code.
- It unnecessarily requires and copies through a char[] to get to a string when a string is the required result.
- It has a lot of complexity around the handling of unicode.

This PR rewrites it to utilize Span, Rune, and other newer features in a way that enables it to be both safe and efficient.  Most inputs ends up being faster, and for very long inputs, it's much, much faster.  The use of ValueStringBuilder also results in less memory allocation, in some cases significantly.

The use of Rune also fixes two arguable bugs in the existing implementation around invalid Unicode sequences, which is why a couple tests were tweaked:
- Some but not all invalid unicode patterns result in replacement characters being used: a few invalid sequences (e.g. just a high surrogate) result in an exception.  We should be standardized on using replacement characters for all such invalid sequences.
- Some patterns with invalid unicode patterns actually result in unnecessary encoding, e.g. `Uri.EscapeDataString("\uD800\uD800a")` results in `a` being encoded.

* Address PR feedback

* Add comment about RFC 3986

Commit migrated from https://github.com/dotnet/corefx/commit/75b4e8b12815949813d83b771d5d6ed9279f924c

4 years agoReduce RemoteInvoke usage in tests (dotnet/corefx#41741)
Stephen Toub [Tue, 15 Oct 2019 16:09:06 +0000 (12:09 -0400)]
Reduce RemoteInvoke usage in tests (dotnet/corefx#41741)

Many of our RemoteInvokes are there purely because of needing to change the current thread culture but on UAP that actually impacting the whole process.  Until that's addressed, we can at least avoid the RemoteInvoke on all platforms other than UAP. There are also some RemoteInvokes that can be avoided by just serializing all of the (small number of) tests in a test assembly. And there's some additional cleanup to be done as well around not explicitly returning an exit code unless required.

This helps measurably with test performance.  Consider the System.ComponentModel.Annotations test suite.  On my machine, prior to these changes, it took ~25 seconds; after these changes, it takes ~0.3. It helps even more when running against a checked runtime, where all of our test costs are magnified.  With a checked runtime, prior to these changes, it takes ~196 seconds; after these changes, it takes ~2.5 seconds.  This should help measurably with CI time in coreclr.

Commit migrated from https://github.com/dotnet/corefx/commit/cd18bafbabf7fe47601f6f790d157409034a2477

4 years agoSocket: consider handle exposed when user gets Socket.SafeHandle. (dotnet/corefx...
Tom Deseyn [Tue, 15 Oct 2019 13:36:26 +0000 (15:36 +0200)]
Socket: consider handle exposed when user gets Socket.SafeHandle. (dotnet/corefx#41760)

* Socket: consider handle exposed when user gets Socket.SafeHandle.

* PR feedback

* Add Socket.InternalSafeHandle that returns _handle without exposing it.

* Update formatting

Commit migrated from https://github.com/dotnet/corefx/commit/e1847debab33fbb0861253f2bdf7ae51f819833e

4 years agoFix cast in CacheMemoryMonitor (dotnet/corefx#41776)
Stephen Toub [Tue, 15 Oct 2019 13:21:25 +0000 (09:21 -0400)]
Fix cast in CacheMemoryMonitor (dotnet/corefx#41776)

Avoid overflow.

Commit migrated from https://github.com/dotnet/corefx/commit/6b2cb3a16a717b47c72c088d073a8f598bfc9335

4 years agoSqlClient fix managed MARS timeout cancellation (dotnet/corefx#38266)
Wraith2 [Tue, 15 Oct 2019 05:54:08 +0000 (06:54 +0100)]
SqlClient fix managed MARS timeout cancellation (dotnet/corefx#38266)

* Add check for completion callback in Mars connection to prevent invalid callback conditions propagating.

* address feedback

Commit migrated from https://github.com/dotnet/corefx/commit/3d16a2bd46d452ceb341887dc9c9dde26545110b

4 years agoBreak the ACL classes into files (dotnet/corefx#41454)
Jeremy Kuhne [Tue, 15 Oct 2019 04:01:25 +0000 (21:01 -0700)]
Break the ACL classes into files (dotnet/corefx#41454)

* Break the ACL classes into files

* Fix NetFX build

Commit migrated from https://github.com/dotnet/corefx/commit/226f57b4f2bf91822604aa73338070c601d7a0fe

4 years ago Nullable annotation for System.IO.Pipelines (dotnet/corefx#41407)
buyaa-n [Mon, 14 Oct 2019 16:52:26 +0000 (09:52 -0700)]
  Nullable annotation for System.IO.Pipelines (dotnet/corefx#41407)

* Nullable annotation for System.IO.Pipelines

Commit migrated from https://github.com/dotnet/corefx/commit/48363ac826ccf66fbe31a5dcb1dc2aab9a7dd768

4 years agoHttpStress: Add scripts for loading the corefx testhost in the environment (dotnet...
Eirik Tsarpalis [Mon, 14 Oct 2019 12:59:16 +0000 (13:59 +0100)]
HttpStress: Add scripts for loading the corefx testhost in the environment (dotnet/corefx#41721)

HttpStress: add testhost environment loader scripts

Commit migrated from https://github.com/dotnet/corefx/commit/faefe04a1cd88053cb8d63028494dfe7ea1a97ec

4 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#41745)
dotnet-maestro[bot] [Mon, 14 Oct 2019 09:57:29 +0000 (09:57 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#41745)

* Update dependencies from https://github.com/dotnet/coreclr build 20191011.1

- Microsoft.NET.Sdk.IL - 5.0.0-alpha1.19511.1
- Microsoft.NETCore.ILAsm - 5.0.0-alpha1.19511.1
- Microsoft.NETCore.Runtime.CoreCLR - 5.0.0-alpha1.19511.1

* Removing ApiCompatBaseline and MatchingRefApiCompatBaseline from System.Runtime.Intrinsics.Experimental

* Regenerating the System.Runtime.Intrinsics.Experimental ref assembly

* Update dependencies from https://github.com/dotnet/coreclr build 20191012.2

- Microsoft.NET.Sdk.IL - 5.0.0-alpha1.19512.2
- Microsoft.NETCore.ILAsm - 5.0.0-alpha1.19512.2
- Microsoft.NETCore.Runtime.CoreCLR - 5.0.0-alpha1.19512.2

Commit migrated from https://github.com/dotnet/corefx/commit/6526461271368311b8fde639cea13764c1f97c7f

4 years agoUpdate cmake required version
Viktor Hofer [Mon, 14 Oct 2019 08:56:36 +0000 (10:56 +0200)]
Update cmake required version

Commit migrated from https://github.com/dotnet/corefx/commit/81c91fab23b26592334ac6ff4bef34f102e3c3ce

4 years agoEnable TargetFrameworkName attribute (dotnet/corefx#40924)
Viktor Hofer [Sun, 13 Oct 2019 11:05:47 +0000 (13:05 +0200)]
Enable TargetFrameworkName attribute (dotnet/corefx#40924)

* Enable TargetFrameworkName attribute

Remove the opt-out of the TargetFrameworkName attribute generation and
fix the existing test to actually test the custom attribute being set
and read correctly by the AppContext class.

Commit migrated from https://github.com/dotnet/corefx/commit/437d9bc76489ff18bd9ce04f287e07591f6bc38c

4 years agoMake WebRequest.GetSystemWebProxy() return a working proxy (dotnet/corefx#41692)
Stephen Toub [Sat, 12 Oct 2019 12:15:05 +0000 (08:15 -0400)]
Make WebRequest.GetSystemWebProxy() return a working proxy (dotnet/corefx#41692)

* Make WebRequest.GetSystemWebProxy() return a working proxy

Today it returns a singleton on .NET Core that throws PlatformNotSupportedExceptions, and is only used for its reference identity by the WebRequest implementation.  This is problematic for existing code that's taking this proxy and passing it to, for example, ClientWebSocket's Proxy, as it will end up being an expensive nop.  In fact, there's currently no way when targeting netstandard2.0 to tell ClientWebSocket to use a default proxy.

With this fix, WebRequest.DefaultWebProxy (which just defaults to GetSystemWebProxy()) will now return HttpClient.DefaultProxy, which is actually a working proxy implementation.

* Stop throwing NotSupportedException from HttpClient.DefaultProxy.set_Credentials

The OS and how the environment is configured determines what concrete type is returned from HttpClient's DefaultProxy property.  And currently these different types behave differently from set_Credentials.  Two of them are throwing NotSupportedException, which is not expected from the IWebProxy interface.  We should just roundtrip the credentials set, even if they're not used.

Commit migrated from https://github.com/dotnet/corefx/commit/8d21b79b924d29088dbde46d42737a657d466b5e

4 years agoUpdate Area Owners for System.Data.SqlClient (dotnet/corefx#41742)
Cheena Malhotra [Sat, 12 Oct 2019 00:41:15 +0000 (17:41 -0700)]
Update Area Owners for System.Data.SqlClient (dotnet/corefx#41742)

Commit migrated from https://github.com/dotnet/corefx/commit/fc89c884e99ef3fd920dbe75fbbaf797b02a944f

4 years agoOnly pass the needed sub-struct in WriteUncompressedPublicKey. (dotnet/corefx#41712)
Jeremy Barton [Fri, 11 Oct 2019 21:31:40 +0000 (14:31 -0700)]
Only pass the needed sub-struct in WriteUncompressedPublicKey. (dotnet/corefx#41712)

Commit migrated from https://github.com/dotnet/corefx/commit/57ae5430e0e6cbf16b5c7b7def4fc95015b2b722

4 years agoAnnotate System.Net.WebHeaderCollection for nullable (dotnet/corefx#41665)
buyaa-n [Fri, 11 Oct 2019 20:13:07 +0000 (13:13 -0700)]
Annotate System.Net.WebHeaderCollection for nullable (dotnet/corefx#41665)

* Annotate System.Net.WebHeaderCollection for nullable

Commit migrated from https://github.com/dotnet/corefx/commit/37f55779b13962c369933ecd5be97beb032d4d78

4 years agoupdate DualModeConnect_BeginAccept_Helper (dotnet/corefx#41726)
Tomas Weinfurt [Fri, 11 Oct 2019 15:01:02 +0000 (08:01 -0700)]
update DualModeConnect_BeginAccept_Helper (dotnet/corefx#41726)

Commit migrated from https://github.com/dotnet/corefx/commit/a68ae7ac2a4184a8738569bea177ee8e9f28be3d

4 years agoUpdate api-review-process.md
Stephen Toub [Fri, 11 Oct 2019 14:49:59 +0000 (10:49 -0400)]
Update api-review-process.md

Commit migrated from https://github.com/dotnet/corefx/commit/ffe79200a072764e53ab3f4b7c9d73f6e70bf642

4 years agoFix branch distance calculation (dotnet/corefx#41716)
Tomáš Matoušek [Fri, 11 Oct 2019 05:05:28 +0000 (22:05 -0700)]
Fix branch distance calculation (dotnet/corefx#41716)

Commit migrated from https://github.com/dotnet/corefx/commit/901c370c2379ad0885bcc5a1921c4164104586aa

4 years agoMerge pull request dotnet/corefx#41718 from davidsh/renable_revoked_test
David Shulman [Thu, 10 Oct 2019 23:52:30 +0000 (16:52 -0700)]
Merge pull request dotnet/corefx#41718 from davidsh/renable_revoked_test

Re-enable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds

Commit migrated from https://github.com/dotnet/corefx/commit/a58c6bb24573854da23d76b69b6e040c4fa2b780

4 years agoAdd Dictionary<Enum, TValue> converter example with JSON syntax of object+property...
Steve Harter [Thu, 10 Oct 2019 19:39:59 +0000 (14:39 -0500)]
Add Dictionary<Enum, TValue> converter example with JSON syntax of object+property (dotnet/corefx#41690)

Commit migrated from https://github.com/dotnet/corefx/commit/5b43eb32b5048f35baea22bf4ef6f4736b33da5f

4 years agoSupport JsonConverterAttribute on enumerable properties (dotnet/corefx#41653)
Steve Harter [Thu, 10 Oct 2019 19:39:28 +0000 (14:39 -0500)]
Support JsonConverterAttribute on enumerable properties (dotnet/corefx#41653)

Commit migrated from https://github.com/dotnet/corefx/commit/4580a4deb486a155ed4ff12682bd1459c385b017

4 years agoRe-enable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds test
David Shulman [Thu, 10 Oct 2019 19:34:10 +0000 (12:34 -0700)]
Re-enable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds test

The third-party server we use for this test, revoked.badssl.com, now has a new
certificate that is good for another two years and is also revoked. So, we can
re-enable this test.

Fixes dotnet/corefx#41108

Commit migrated from https://github.com/dotnet/corefx/commit/0dd95fc3d4bd24db0fd860295c5873703d7738f5

4 years agoTCPListener doesn't create a new socket on Stop (dotnet/corefx#41547)
Alexander Nikolaev [Thu, 10 Oct 2019 11:59:12 +0000 (13:59 +0200)]
TCPListener doesn't create a new socket on Stop (dotnet/corefx#41547)

TCPListener.Stop disposes the socket and resets the reference. New socket is created only on the next Start call or Server property access.
Fixes dotnet/corefx#26170

Commit migrated from https://github.com/dotnet/corefx/commit/c5edb254b85819d4cd4fd6ce35ebb6acc53f450d

4 years agoChange some internal async Task methods to be async ValueTask (dotnet/corefx#40527)
Stephen Toub [Thu, 10 Oct 2019 10:04:01 +0000 (06:04 -0400)]
Change some internal async Task methods to be async ValueTask (dotnet/corefx#40527)

We have some internal and private `async Task` methods that are only ever `await`ed.  Today there's no benefit to making them `async ValueTask` methods, so we've kept them as `async Task`.  However, if we end up changing the implementation of `async ValueTask` to pool underlying objects, there becomes a potential benefit to using `async ValueTask` for these instead of `async Task`.  This PR changes those in a variety of libraries where we care more about performance and allocations.  There are likely a few more methods we'd want to convert based on profiling, but I believe this represents the bulk of them.

Commit migrated from https://github.com/dotnet/corefx/commit/97d9fb9d6c7e1d50f527e290ef8e18767dbc6bbf

4 years agoRemove unnecessary length restriction on Uri.Escape{Data/Uri}String (dotnet/corefx...
Stephen Toub [Thu, 10 Oct 2019 10:03:29 +0000 (06:03 -0400)]
Remove unnecessary length restriction on Uri.Escape{Data/Uri}String (dotnet/corefx#41686)

* Remove unnecessary length restriction on Uri.Escape{Data/Uri}String

* Address PR feedback

Co-Authored-By: David Shulman <david.shulman@microsoft.com>
Commit migrated from https://github.com/dotnet/corefx/commit/1d49632bc213416d27ed6c567fd8dd08e00170a1

4 years agoFix NRE when context value is null in method Save from Principal class (dotnet/corefx...
Roman Marusyk [Wed, 9 Oct 2019 23:37:13 +0000 (02:37 +0300)]
Fix NRE when context value is null in method Save from Principal class (dotnet/corefx#41656)

* Fix NRE when context value is null in method Save from Principal class

* Add unit test

Commit migrated from https://github.com/dotnet/corefx/commit/30280e07adc3c1f0776ef9531b47a769e2b45420