Address collection expression diagnostics
In most cases, we now just use the new (C# 12.0) collection expression syntax. However, we've disabled IDE0305 because it makes suggestions that aren't an obvious improvement. It wants to rewrite use of ToArray() to be a collection expression. E.g. something.ToArray() would become [.. something]. Perhaps that will seem natural once we've all got used to spreads in collection expressions, but to me (idg10) today that looks odd.
Add comment explaining why we've disable IDE0290
Make UWP test runner use the same warning settings as everything else, except for CS0618, which a large number of tests appear to depend on.
It turns out that occasionally, the test thread ends up with its SynchronizationContext.Current set to the Windows Forms sync context. That's bad because nothing runs a message loop, so when AsyncSubject attempts to complete an awaited operation, it tries to do so by posting a message to a queue that's never going to be processed.
So we explicitly set the context to null for the test that expects that.
The DeferAsync methods are meant to just call into the equivalent Defer methods. (I don't know why we have both, but I'm guessing that DeferAsync might be useful in cases where you want the compiler to infer the delegate type. With just Defer, it might be unclear whether you mean the one where the factory returns an observable, or the one where the factory returns a value task that produces an observable.)
* Nerdbank.GitVersioning 3.6.128
* BenchmarkDotNet 0.13.5
* Verify.Xunit 19.14.1
Also disabled Nerdbank.GitVersioning for UWP test runner since recent versions of this library import a .proj file that doesn't work with UWP projects. (The runner doesn't need to be built with the current version number, since we never publish it anyway.)
xUnit is no longer able to run tests on UWP. MSTest supports this in Visual Studio 2022, so we are moving back to MSTest. (Rx used to used MSTest before, so this was a relatively straightforward change.)
We had to make a few changes due to the fact that xUnit supplies a SynchronizationContext whereas MSTest does not.
Also fixed a race condition in CreateAsyncTest.
The original PR seems to cause more problems than it solves - see #1893
Once we separate the UI frameworks back out into their own packages, the
issue that PR was intended to solve will go away in any case.
There were various warnings and messages due either to inconsistent style, or because in modern C#, newer idioms are preferred. This changes the code to be consistent with current standards.
In a couple of cases, the warnings were spurious, and have been suppressed.
* Merge AsyncRx.NET assemblies (System.Reactive.Async.Concurrency, System.Reactive.Async.Core, System.Reactive.Async.Disposables, System.Reactive.Interfaces, System.Reactive.Async.Linq and System.Reactive.Async.Bcl all merged into System.Reactive.Async)
* Add AsyncRx.NET package unification ADR
* Replace System.Reactive.Shared with Rx dependency (and rename a couple of types due to resulting clashes, and add extension method to replace the one feature of `Notification<T>` that was in this library and not Rx)
* Fixed erroneous paths for all the .tt files)