platform/upstream/dotnet/runtime.git
4 years agoConsolidate .netcoreapp.cs test files in System.Runtime (dotnet/corefx#42100)
Roman Marusyk [Mon, 28 Oct 2019 03:22:40 +0000 (04:22 +0100)]
Consolidate .netcoreapp.cs test files in System.Runtime (dotnet/corefx#42100)

* Consolidate .netcoreapp.cs files because System.Runtime project is no longer cross-compiled

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

4 years agoAnnotate System.Reflection.TypeExtensions for nullable references (dotnet/corefx...
Dan Moseley [Sun, 27 Oct 2019 20:47:34 +0000 (13:47 -0700)]
Annotate System.Reflection.TypeExtensions for nullable references (dotnet/corefx#42159)

* merge

* CR

* typo

* msbuild /t:GenerateReferenceSource

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

4 years agoUpdate illink.targets to keep PreserveDependencyAttribute (dotnet/corefx#42157)
Stephen Toub [Sun, 27 Oct 2019 20:46:54 +0000 (16:46 -0400)]
Update illink.targets to keep PreserveDependencyAttribute (dotnet/corefx#42157)

* Update illink.targets to keep PreserveDependencyAttribute

* Update illink.targets

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

4 years agoRemove ILLinkTrim.xml from System.Net.Security (dotnet/corefx#42156)
Stephen Toub [Sun, 27 Oct 2019 20:46:04 +0000 (16:46 -0400)]
Remove ILLinkTrim.xml from System.Net.Security (dotnet/corefx#42156)

* Fix NetEventSource in System.Net.Security to properly delegate to events

Two events were set up in correctly, resulting in them getting trimmed away.  The ILLinkTrim.xml was then putting a bandaid on the problem.

* Fix System.Net.Mail.Unit.Tests to not use System.Net.Security internals

The unit tests are currently set up to test internals, and to do so by compiling in the product source.  My thoughts on this aside, it's currently incomplete as it's compiling in some code but then depending on other code via reflection to a completely different assembly.  We shouldn't be combining such approaches.  Delete the reflection code from the unit tests, and update the tests .csproj to include the additional files necessary (we should later revisit this whole scheme).

That lets us delete the ILLinkTrim.xml for the production System.Net.Security assembly.

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

4 years agoRemove versionless netstandard target group (dotnet/corefx#41984)
Viktor Hofer [Sun, 27 Oct 2019 16:08:59 +0000 (17:08 +0100)]
Remove versionless netstandard target group (dotnet/corefx#41984)

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

4 years agoUpdate public-signing.md (dotnet/corefx#42129)
John Zabroski [Sat, 26 Oct 2019 21:35:20 +0000 (17:35 -0400)]
Update public-signing.md (dotnet/corefx#42129)

@jaredpar Updated this doc based on comments on Twitter discussion with you and @dsplaisted

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

4 years agoRemove ILLinkTrim.xml from System.Diagnostics.DiagnosticSource (dotnet/corefx#42124)
Stephen Toub [Sat, 26 Oct 2019 21:08:45 +0000 (17:08 -0400)]
Remove ILLinkTrim.xml from System.Diagnostics.DiagnosticSource (dotnet/corefx#42124)

- Use PreserveDependencyAttribute for ctors used via reflection by FetcherForProperty
- Remove reflection use entirely when looking up Activity events

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

4 years agoClean up use of PreserveDependencyAttribute in System.Text.Json (dotnet/corefx#42146)
Stephen Toub [Sat, 26 Oct 2019 20:03:21 +0000 (16:03 -0400)]
Clean up use of PreserveDependencyAttribute in System.Text.Json (dotnet/corefx#42146)

It's not necessary to specify the assembly name when the consumer is in the same assembly.

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

4 years agoRemove ILLinkTrim.xml from System.Net.Http (dotnet/corefx#42126)
Stephen Toub [Sat, 26 Oct 2019 20:02:39 +0000 (16:02 -0400)]
Remove ILLinkTrim.xml from System.Net.Http (dotnet/corefx#42126)

The file was there to keep anonymous types used by DiagnosticsHandler from having their getters removed.  But a) it was relying on the implementation detail name generated by Roslyn, and b) it was keeping alive other state from other anonymous types in the assembly.  I changed it to use concrete types instead.  This also happens to result in less code, because we don't need the generated Equals/GetHashCode methods generated for anonymous types.

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

4 years agoFix build break
Jan Kotas [Sat, 26 Oct 2019 15:02:42 +0000 (08:02 -0700)]
Fix build break

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

4 years agoDelete a few more instances of StringBuilderCache (dotnet/corefx#42139)
Jan Kotas [Sat, 26 Oct 2019 14:57:37 +0000 (07:57 -0700)]
Delete a few more instances of StringBuilderCache (dotnet/corefx#42139)

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

4 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#42121)
dotnet-maestro[bot] [Sat, 26 Oct 2019 06:17:44 +0000 (06:17 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#42121)

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

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

* remove Stopwatch.*.cs from System.Runtime.Extensions build

* Disable tests against CoreCLR bug

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

4 years agoMerge pull request dotnet/corefx#42122 from yukiwongky/readonlycol
Yuki Wong [Fri, 25 Oct 2019 20:59:01 +0000 (13:59 -0700)]
Merge pull request dotnet/corefx#42122 from yukiwongky/readonlycol

Fix getting readonly column metadata

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

4 years agoRevert "Add support to produce WebAssembly runtime assets (dotnet/corefx#41777)"...
Santiago Fernandez Madero [Fri, 25 Oct 2019 20:41:15 +0000 (15:41 -0500)]
Revert "Add support to produce WebAssembly runtime assets (dotnet/corefx#41777)" (dotnet/corefx#42127)

This reverts commit dotnet/corefx@c57cba795a0e0a2905f6ce48009cde1d23cd7a19.

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

4 years agoAnnotate System.Reflection.DispatchProxy for nullable (dotnet/corefx#41904)
buyaa-n [Fri, 25 Oct 2019 19:23:06 +0000 (12:23 -0700)]
Annotate System.Reflection.DispatchProxy for nullable (dotnet/corefx#41904)

* Nullable annotation for System.IO.Compression

* Revert "Nullable annotation for System.IO.Compression"

* Annotate System.Reflection.DispatchProxy for nullable

* Applying feedback

* Applying feedback

* Banging some null assertions causing error on CI

* Banging some more to clean CI build

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

4 years agoAdd support to produce WebAssembly runtime assets (dotnet/corefx#41777)
Santiago Fernandez Madero [Fri, 25 Oct 2019 19:19:34 +0000 (14:19 -0500)]
Add support to produce WebAssembly runtime assets (dotnet/corefx#41777)

* Add support to produce WebAssembly runtime assets

* Add support to build in OSX and address PR feedback

* Change AND -> and in Directory.Build.props change region

* PR Feedback: run build in rolling CI builds as well

* Add TODO comment for WebAssembly OSGroup

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

4 years agoFix getting readonly column metadata
v-kaywon [Fri, 25 Oct 2019 19:08:24 +0000 (12:08 -0700)]
Fix getting readonly column metadata

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

4 years agoRemove ILLinkTrim.xml from System.Text.Json (dotnet/corefx#42118)
Stephen Toub [Fri, 25 Oct 2019 18:05:19 +0000 (14:05 -0400)]
Remove ILLinkTrim.xml from System.Text.Json (dotnet/corefx#42118)

* Remove ILLinkTrim.xml from System.Text.Json

Instead use PreserveDependencyAttribute.

* Address PR feedback

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

4 years agoAnnotate System.Linq.Parallel for nullable ref types (dotnet/corefx#41533)
buyaa-n [Fri, 25 Oct 2019 16:35:56 +0000 (09:35 -0700)]
Annotate System.Linq.Parallel for nullable ref types (dotnet/corefx#41533)

* Nullable annotation for System.Linq.Parallel

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

4 years agoUse NameOf in Conversion.vb (dotnet/corefx#42117)
Youssef Victor [Fri, 25 Oct 2019 15:55:35 +0000 (18:55 +0300)]
Use NameOf in Conversion.vb (dotnet/corefx#42117)

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

4 years agoUpdate the S.T.E.W configurations to explicitly target a versioned TFM (nc3.0). ...
Ahson Khan [Fri, 25 Oct 2019 03:05:48 +0000 (20:05 -0700)]
Update the S.T.E.W configurations to explicitly target a versioned TFM (nc3.0). (dotnet/corefx#42069)

* Update the S.T.E.W configurations to explicitly target a versioned TFM
(nc3.0).

* Use custom defined constant like S.T.Json - Building_Inbox_Library

* Update config.props to use package config and leave netcoreapp as a build config

* Add back netcoreapp specific config to the src csproj

* Revert "Use custom defined constant like S.T.Json - Building_Inbox_Library"

This reverts commit dotnet/corefx@8648cf6d7f5cbe54a6b1facdebc3f33c255572a1.

* Remove extra new line.

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

4 years agoUpdate SDL validation to use values from corefx-sdl-validation variable group (dotnet...
Santiago Fernandez Madero [Fri, 25 Oct 2019 00:30:59 +0000 (17:30 -0700)]
Update SDL validation to use values from corefx-sdl-validation variable group (dotnet/corefx#42098)

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

4 years agoHttpStress: Add Stress Pipelines (dotnet/corefx#41833)
Eirik Tsarpalis [Thu, 24 Oct 2019 23:02:30 +0000 (00:02 +0100)]
HttpStress: Add Stress Pipelines (dotnet/corefx#41833)

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

4 years agoAdd tests to verify that JSON deserializer doesn't do any multiplication or addition...
Eugene Samoylov [Thu, 24 Oct 2019 22:52:56 +0000 (03:52 +0500)]
Add tests to verify that JSON deserializer doesn't do any multiplication or addition on the string length (dotnet/corefx#41754)

* Add deserialization tests for very long input strings (dotnet/corefx#41687)

* Fix tests

* Add deserialization tests for the maximum possible string length

* Improve long strings creation in deserialization tests for netcoreapp

* Extract common logic from if/def block

* Fix assertion

* Remove unnecessary test cases

* Remove other extra test cases

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

4 years agoUse ValueStringBuilder in UriHelper.UnescapeString (dotnet/corefx#41684)
Alexander Nikolaev [Thu, 24 Oct 2019 22:51:16 +0000 (00:51 +0200)]
Use ValueStringBuilder in UriHelper.UnescapeString (dotnet/corefx#41684)

* UriExt.UnescapeDataString avoids a new string allocation for an unmodified unescaped string

* Original dest array reuse fixed

* ValueStringBuilder is used instead of PooledCharArray

* Remove unused type

* Changes to ValueStringBuilder reverted

* IsStringSame replaced with SequenceEqual

* Array returned from buffer is cleared

* - Indexer-based assignment is replaced with Append method
- Explicit pooled array cleaning is removed

* .sln file changes reverted

* Build fixed

* UnescapeString always copies the result to dest array

* Unused code removed

* Original string reuse fixed

* Heap validation fixed

* - Small optimizations
- Code style fixes

* By-char append is replaced with span-based one

* SequenceEqual is invoked against the original string

* Revert "By-char append is replaced with span-based one"

This reverts commit dotnet/corefx@e5919e3dbe4be0681540c5084fce23d026149957.

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

4 years ago[master] Update dependencies from dotnet/coreclr (dotnet/corefx#42094)
dotnet-maestro[bot] [Thu, 24 Oct 2019 22:29:50 +0000 (22:29 +0000)]
[master] Update dependencies from dotnet/coreclr (dotnet/corefx#42094)

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

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

* Update ref/System.Runtime.Intrinsics.Experimental.cs corresponding to https://github.com/dotnet/coreclr/pull/27382/

* Updating System.Numerics.Vectors to type forward to S.P.Corelib

* Regenerating the System.Runtime.Intrinsics ref assembly for existing APIs

* Regenerating the System.Runtime.Intrinsics ref assembly for new APIs

* Removing DefaultTargets="Build" from the S.R.I and S.N.V Configurations.props

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

4 years agoSupport PinChangedEvent on Unix (dotnet/corefx#40383)
Krzysztof Wicher [Thu, 24 Oct 2019 22:06:34 +0000 (15:06 -0700)]
Support PinChangedEvent on Unix (dotnet/corefx#40383)

* Support PinChangedEvent on Unix

* address PR feedback

* Fix typo in RaisePinChanged

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

4 years agoFix non-netcoreapp builds
Stephen Toub [Thu, 24 Oct 2019 18:29:03 +0000 (14:29 -0400)]
Fix non-netcoreapp builds

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

4 years agoimprove performance of GetAllNetworkInterfaces on Linux (dotnet/corefx#41490)
Tomas Weinfurt [Thu, 24 Oct 2019 20:36:01 +0000 (13:36 -0700)]
improve performance of GetAllNetworkInterfaces on Linux (dotnet/corefx#41490)

* improve GetLinuxNetworkInterfaces

* more improvements to GetAllNetworkInterfaces()

* fix compilation

* update ethtool to support older kernels

* fix osx

* more platform fixes

* put PrefixLengthToSubnetMask back as it was

* normalize units properlry

* fix constant

* feedback from review

* fix log initialization

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

4 years agoClean up some X509FilesystemTests tests (dotnet/corefx#42089)
Jeremy Barton [Thu, 24 Oct 2019 20:26:54 +0000 (13:26 -0700)]
Clean up some X509FilesystemTests tests (dotnet/corefx#42089)

* Make all of the Fact methods public
* Improve the assert messages in VerifyCrlCache
* Make VerifyCrlCache understand offline revocation unknown asserts two flags now.

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

4 years agoUpdate ILLink.Tasks (dotnet/corefx#39287)
Sven Boemer [Thu, 24 Oct 2019 19:37:31 +0000 (12:37 -0700)]
Update ILLink.Tasks (dotnet/corefx#39287)

* Update ILLink.Tasks

* Don't import linker nuget package targets

We use custom targets to invoke the linker.

* Don't pass directories as assembly paths

Instead pass them as extra linker args. To avoid issues with the
response file parsing logic, we remove trailing slashes.

* Update to linker version with unusedinterfaces opt

* Update System.Text.Json with more ctor roots

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

4 years agoDiagnosticSourceEventSource fixes/improvements for distributed tracing (dotnet/corefx...
Noah Falk [Thu, 24 Oct 2019 19:29:54 +0000 (12:29 -0700)]
DiagnosticSourceEventSource fixes/improvements for distributed tracing (dotnet/corefx#41943)

* DiagnosticSourceEventSource fixes for distributed tracing

1) There is no existing mechanism for DiagnosticSourceEventSource to fetch the current activity object. By convention it is not passed as an event argument, but rather stored in the async-local property Activity.Current. This was fixed by adding a well-known "*Activity" property that returns the result of Activity.Current regardless what object it is applied to.

2) DiagnosticSourceEventSource fails to evaluate properties on value types, such as DateTime.Ticks. Calling MethodInfo.CreateDelegate
needs to use a different signature for ref and value type properties and previously the code always used the ref-style signature. Fixed by adding ValueTypedFetchProperty that does the proper CreateDelegate and delegate invocation for structs.

3) There is no mechanism for DiagnosticSourceEventSource to enumerate the tags on an activity. This change adds the *Enumerate well-known property which will iterate any IEnumerable`1, invoke ToString() on each element, then join it as a string.

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

4 years agoFix RegionInfo.DisplayName test (dotnet/corefx#42088)
Tarek Mahmoud Sayed [Thu, 24 Oct 2019 18:43:50 +0000 (11:43 -0700)]
Fix RegionInfo.DisplayName test (dotnet/corefx#42088)

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

4 years agoEnsure serializer throws JsonException when deserializing incompatible JSON into...
Layomi Akinrinade [Thu, 24 Oct 2019 18:40:46 +0000 (11:40 -0700)]
Ensure serializer throws JsonException when deserializing incompatible JSON into collections (dotnet/corefx#42066)

* Ensure serializer throws JsonException when deserializing incompatible JSON into collections

* Address review feedback

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

4 years agoadd entries for new FreeBSD releases (dotnet/corefx#41794)
Tomas Weinfurt [Thu, 24 Oct 2019 17:19:39 +0000 (10:19 -0700)]
add entries for new FreeBSD releases (dotnet/corefx#41794)

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

4 years agoNormalize Linux and Windows X.509 Revocation Statuses (dotnet/corefx#41956)
Jeremy Barton [Thu, 24 Oct 2019 13:01:53 +0000 (06:01 -0700)]
Normalize Linux and Windows X.509 Revocation Statuses (dotnet/corefx#41956)

* Add CrlCrl test before revocation support

* Add revocation tests

* Add lots of tests with revocation

* Make Linux download respect time remaining

* Use synchronous wait so Linux gets an answer

* Use IPv4Loopback name instead of localhost for stability (IPv4 vs IPv6)

* Some tracing improvements

* Add a lot more tests

* Linux multi-OCSP and revocation normalization support

* Even more tests, mainly invalid responses

* Respect CorruptRevocationIssuerName

* Fix the "no timeout" overflow.

* Treat OfflineRevocation as always suppressed

* Finish some half-finished tests

* De-spaghetti Linux OCSP processing

* Check what happens for testing the root directly

* Native changes for Linux multi-layer OCSP

* Make Linux portable build work

* Mitigate issue 41969 in tests

* Support decoding incorrect encoding of OCSPRequest

Also fix an exact-tag vs loose-tag check.

* Disable DynamicRevocationTests on macOS

* Disable designated responder tests on RHEL6.

* Cache the error string for each error code

* Self-review cleanup

* Disable designated OCSP responder tests on Win7

* Re-enable WIn7 designated responder tests, increase timeouts.

* Running locally on Win7 the designated responder tests pass
* Observation of the intermittent CI failures shows they were always in excess of 5 seconds.
  * Running locally the longest test was 1 second, and that includes generating several RSA keys.

* Apply review feedback

* Move DynamicRevocationTests to OuterLoop

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

4 years agoMoving StopWatch to `src\Common\src\Corelib` (dotnet/corefx#42072)
Vladimir Sadov [Thu, 24 Oct 2019 12:23:17 +0000 (05:23 -0700)]
Moving StopWatch to `src\Common\src\Corelib` (dotnet/corefx#42072)

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

4 years agoAdd cgroup v2 support to Interop.cgroups (dotnet/corefx#39686)
Omair Majid [Thu, 24 Oct 2019 12:12:22 +0000 (08:12 -0400)]
Add cgroup v2 support to Interop.cgroups (dotnet/corefx#39686)

* Add cgroup v2 support to Interop.cgroups

Fix up code to adjust cgroup v1 assumptions and check cgroup v2 paths,
locations and values.

Continue using the older cgroup v1 terminology for APIs.

* Clean up new tests

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

4 years agoRecombine files ProcessTests.cs and ProcessTests.netcoreapp.cs (dotnet/corefx#42063)
Roman Marusyk [Thu, 24 Oct 2019 01:32:12 +0000 (03:32 +0200)]
Recombine files ProcessTests.cs and ProcessTests.netcoreapp.cs (dotnet/corefx#42063)

* Recombine files ProcessTests.cs and ProcessTests.netcoreapp.cs that aren't supported anymore

* Add namespaces

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

4 years agoOptimize Enumerable.SkipLast() for IPartition and IList (dotnet/corefx#41342)
Tim [Wed, 23 Oct 2019 22:09:43 +0000 (06:09 +0800)]
Optimize Enumerable.SkipLast() for IPartition and IList (dotnet/corefx#41342)

* Optimize Enumerable.SkipLast() for IPartition and IList

* Convert to conditional expression

* Add parameter name

* Revert "Convert to conditional expression"

This reverts commit 7c7908fb

* Format conditional expression

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

4 years agoReduce the number of syscalls when converting Ticks to TimeSpan (dotnet/corefx#41989)
Grisha Kotler [Wed, 23 Oct 2019 20:01:57 +0000 (23:01 +0300)]
Reduce the number of syscalls when converting Ticks to TimeSpan (dotnet/corefx#41989)

* Reduce the number of syscalls when converting Ticks to TimeSpan

* Remove the usage of Lazy

* Fix build

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

4 years agoDelete duplicative exception add in SourceCore (dotnet/corefx#42035)
Stephen Toub [Wed, 23 Oct 2019 18:05:54 +0000 (14:05 -0400)]
Delete duplicative exception add in SourceCore (dotnet/corefx#42035)

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

4 years agoRegenerating the ref assembly for System.Runtime.Intrinsics.Experimental
Tanner Gooding [Wed, 23 Oct 2019 01:29:14 +0000 (18:29 -0700)]
Regenerating the ref assembly for System.Runtime.Intrinsics.Experimental

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

4 years agoRemove Socket.InnerSafeCloseSocket (dotnet/corefx#41888)
Tom Deseyn [Wed, 23 Oct 2019 13:50:26 +0000 (15:50 +0200)]
Remove Socket.InnerSafeCloseSocket (dotnet/corefx#41888)

* Remove Socket.InnerSafeCloseSocket

* Move IsInvalid checks in SetHandle function

* PR feedback

* Remove unnecessary 'SocketPal.'

* Remove SafeSocketHandle.SetHandle

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

4 years agoEvent log retries (dotnet/corefx#42017)
Dan Moseley [Wed, 23 Oct 2019 13:36:52 +0000 (06:36 -0700)]
Event log retries (dotnet/corefx#42017)

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

4 years agoRemove unused locals in System.Data.Common and keep some logic using discard (dotnet...
Eriawan Kusumawardhono [Wed, 23 Oct 2019 13:33:22 +0000 (20:33 +0700)]
Remove unused locals in System.Data.Common and keep some logic using discard (dotnet/corefx#41962)

* remove unused locals in System.Data.Common and keep some logic using discard

* revert the HandleTable(element) removal as PR feedback. Use discard as return value is ignored.

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

4 years agoAdd test for SafeHandle handling in Socket.Select (dotnet/corefx#42018)
Stephen Toub [Wed, 23 Oct 2019 13:30:24 +0000 (09:30 -0400)]
Add test for SafeHandle handling in Socket.Select (dotnet/corefx#42018)

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

4 years agoMove Matrix3x2/4x4, Plan, and Quaternion to the shared CoreLib partition (dotnet...
Tanner Gooding [Wed, 23 Oct 2019 12:44:26 +0000 (05:44 -0700)]
Move Matrix3x2/4x4, Plan, and Quaternion to the shared CoreLib partition (dotnet/corefx#42021)

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

4 years agoWhen encoder is null, use JavaScriptEncoder.Default to check for NeedsEscaping (dotne...
Ahson Khan [Wed, 23 Oct 2019 08:09:34 +0000 (01:09 -0700)]
When encoder is null, use JavaScriptEncoder.Default to check for NeedsEscaping (dotnet/corefx#42023)

* When encoder is null, use JavaScriptEncoder.Default to check for
NeedsEscaping.

* Remove unnecessary unsafe keyword and add comment to using directive.

* Address feedback.

* Remove gotos and move the IsEmpty check outside the fixed block.

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

4 years agoJsonSerializer.Serialize should check whether the passed-in (dotnet/corefx#42026)
Ahson Khan [Wed, 23 Oct 2019 07:27:40 +0000 (00:27 -0700)]
JsonSerializer.Serialize should check whether the passed-in (dotnet/corefx#42026)

Utf8JsonWriter is null.

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

4 years agoFix several Socket tests to not dispose an event (dotnet/corefx#42020)
Stephen Toub [Wed, 23 Oct 2019 03:08:01 +0000 (23:08 -0400)]
Fix several Socket tests to not dispose an event (dotnet/corefx#42020)

When I run these tests locally, due to my network configuration they sometimes fail.  If they fail and the test is disposing of the ManualResetEvent, the async callback may try to set the event after it's already been disposed, which throws an exception that crashes the test process.  The easy fix is to just dispose of these MRE instances on success and let their finalizers clean up for them if the tests fail.

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

4 years agoAdd directory creation method that takes an ACL (dotnet/corefx#41834)
Carlos Sanchez Lopez [Wed, 23 Oct 2019 02:42:48 +0000 (19:42 -0700)]
Add directory creation method that takes an ACL (dotnet/corefx#41834)

* First commit

* Fix OperationCanceledException dependency error, revert nullable indication

* Only Directory files

* Unit tests verifications

* Split FileSystem.Windows into two additional files instead of one. Fix pinning.

* Remove dead comment, add actual UT verifications

* User WellKnownSidType

* Make method unsafe, nit comments addressed.

* Remove irrelevant comment

* Add additional exceptions to triple slash

* Add unit tests for additional exceptions

* Remove FileSystem.cs, it has one obsolete method. Replace all calls of that removed method.

* Second pass on required strings.resx resources

* Remove unused dependency cs files

* Move shared files to Common

* Add the missing braces

* Add nulcheck for this argument, add exception, document exception in triple slash, add unit test.

* Fix netstandard CI build failure

* Fix Microsoft.IO.Redist build issue with NetStandard

* Remove unnecessary assert in ut

* Fix build problem in Windows Packaging All Configurations x64_Debug, System.Runtime needs to be included to recognize NotNullIfNotNullAttribute, consumed in Path.Internal.cs

* Additional file splitting and dependency addition to fix netstandard/netfx build problems

* Fix netstandard and netcoreapp build issues

* Remove unused file

* nit cleaning

* Minimal unit tests

* Remove unused unit test code and spacing fix

* Add full framework condition to unit test

* Additional fix for full framework

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

4 years agoSimplify LOGFONT marshalling (dotnet/corefx#42011)
Jan Kotas [Wed, 23 Oct 2019 01:41:21 +0000 (18:41 -0700)]
Simplify LOGFONT marshalling (dotnet/corefx#42011)

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

4 years agoSocket.Select: increase ref count while the handle is in use (dotnet/corefx#41763)
Tom Deseyn [Wed, 23 Oct 2019 01:01:59 +0000 (03:01 +0200)]
Socket.Select: increase ref count while the handle is in use (dotnet/corefx#41763)

* Socket.Select: increase ref count while the handle is in use

* PR feedback

* Use Socket.InternalSafeHandle for ref/release.

* Socket.Windows: SelectFileDescriptor: add missing unrefs

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

4 years agoOptimize FindFirstCharToEncode for JavaScriptEncoder.Default and Relaxed using Sse2...
Ahson Khan [Wed, 23 Oct 2019 00:34:24 +0000 (17:34 -0700)]
Optimize FindFirstCharToEncode for JavaScriptEncoder.Default and Relaxed using Sse2 intrinsics. (dotnet/corefx#41933)

* Optimize FindFirstCharToEncode for JavaScriptEncoder.Default and Relaxed
using Sse2 intrinsics.

* Create an Sse2Helper and improve perf of TextEncoder and
AllowedCharactersBitmap

* Loop unroll FindFirstCharacterToEncode

* Improve code coverage.

* Add more tests for surrogate pairs and fix call to WillEncode.

* Address PR feedback - remove some code duplication.

* Move DefaultJavaScriptEncoder to separate file and override EncodeUtf8
with better caching.

* Add default replacement character as a test.

* Address nits.

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

4 years agoMove Vector2/3/4 to the shared CoreLib partition (dotnet/corefx#42005)
Tanner Gooding [Tue, 22 Oct 2019 22:53:10 +0000 (15:53 -0700)]
Move Vector2/3/4 to the shared CoreLib partition (dotnet/corefx#42005)

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

4 years agoAdding Unsafe.SkipInit (dotnet/corefx#41995)
Tanner Gooding [Tue, 22 Oct 2019 22:53:01 +0000 (15:53 -0700)]
Adding Unsafe.SkipInit (dotnet/corefx#41995)

* Adding Unsafe.SkipInit

* Removing the "where T : struct" constraint from Unsafe.SkipInit

* Adding tests for Unsafe.SkipInit

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

4 years agoAdd Encoding extensions which work with sequences (dotnet/corefx#41810)
Levi Broderick [Tue, 22 Oct 2019 22:18:05 +0000 (15:18 -0700)]
Add Encoding extensions which work with sequences (dotnet/corefx#41810)

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

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