From 1eda7049b9a3d1ef291ea9b1ce9cf4442631ec2b Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Fri, 17 Mar 2023 07:09:47 +0000 Subject: [PATCH] Merge AsyncRx.NET assemblies (#1896) * 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` that was in this library and not Rx) * Fixed erroneous paths for all the .tt files) --- AsyncRx.NET/ApiCompare/ApiCompare.csproj | 2 +- AsyncRx.NET/AsyncRx.NET.sln | 124 +-- .../adr/0001-package-unification.md | 64 ++ .../System.Reactive.Async.Concurrency.csproj | 13 - .../System.Reactive.Async.Core.csproj | 13 - .../System.Reactive.Async.Disposables.csproj | 12 - .../System.Reactive.Async.Interfaces.csproj | 7 - .../System.Reactive.Async.Linq.csproj | 143 ---- .../System.Reactive.Async.Subjects.csproj | 15 - .../AsyncObservable.cs | 0 .../AsyncObservableBase.cs | 0 .../AsyncObservableExtensions.cs | 0 .../AsyncObserver.cs | 0 .../AsyncObserverBase.cs | 0 .../Concurrency/AsyncScheduler.cs | 0 .../Concurrency/AsyncSchedulerBase.cs | 0 .../Concurrency/Clock.cs | 0 .../Concurrency/IAsyncScheduler.cs | 0 .../Concurrency/IClock.cs | 0 .../Concurrency/ImmediateAsyncScheduler.cs | 0 .../SynchronizationContextAsyncScheduler.cs | 0 .../Concurrency/TaskPoolAsyncScheduler.cs | 0 .../Disposables/AsyncDisposable.cs | 0 .../CancellationAsyncDisposable.cs | 0 .../Disposables/CompositeAsyncDisposable.cs | 2 +- .../Disposables/RefCountAsyncDisposable.cs | 2 +- .../Disposables/SerialAsyncDisposable.cs | 2 +- .../SingleAssignmentAsyncDisposable.cs | 0 .../StableCompositeAsyncDisposable.cs | 0 .../IAsyncObservable.cs | 0 .../IAsyncObserver.cs | 0 .../Internal}/AsyncQueueLockAsyncObserver.cs | 0 .../Internal/EventPatternSource.cs | 2 +- .../EventPatternSourceBaseInternal.cs} | 9 +- .../Internal/EventSource.cs | 0 .../Internal}/FastImmediateAsyncObserver.cs | 0 .../Internal}/ISchedulerAsyncObserver.cs | 0 .../Internal/Lookup.cs | 0 .../Internal}/ScheduledAsyncObserver.cs | 0 .../Internal}/ScheduledAsyncObserverBase.cs | 2 +- .../Internal}/UnsafeAsyncObserver.cs | 0 .../Joins/ActiveAsyncPlan.Generated.cs | 0 .../Joins/ActiveAsyncPlan.Generated.tt | 0 .../Joins/ActiveAsyncPlan.cs | 0 .../Joins/AsyncJoinObserver.cs | 4 +- .../Joins/AsyncPattern.Generated.cs | 0 .../Joins/AsyncPattern.Generated.tt | 0 .../Joins/AsyncPattern.cs | 0 .../Joins/AsyncPlan.Generated.cs | 0 .../Joins/AsyncPlan.Generated.tt | 0 .../Joins/AsyncPlan.cs | 0 .../Joins/IAsyncJoinObserver.cs | 2 +- .../Linq/AsyncObservable.cs | 0 .../Linq/AsyncObserver.cs | 0 .../Linq/GroupedAsyncObservable.cs | 0 .../Linq/IGroupedAsyncObservable.cs | 0 .../Linq/Operators/Aggregate.cs | 0 .../Linq/Operators/All.cs | 0 .../Linq/Operators/Amb.cs | 4 +- .../Linq/Operators/And.cs | 0 .../Linq/Operators/Any.cs | 0 .../Linq/Operators/Append.cs | 0 .../Linq/Operators/AsAsyncObservable.cs | 0 .../Linq/Operators/Average.Generated.cs | 0 .../Linq/Operators/Average.Generated.tt | 4 +- .../Linq/Operators/Average.cs | 0 .../Linq/Operators/Buffer.cs | 10 +- .../Linq/Operators/Case.cs | 0 .../Linq/Operators/Cast.cs | 0 .../Linq/Operators/Catch.cs | 0 .../Linq/Operators/CombineLatest.Generated.cs | 56 +- .../Linq/Operators/CombineLatest.Generated.tt | 0 .../Linq/Operators/Concat.cs | 0 .../Linq/Operators/Contains.cs | 0 .../Linq/Operators/Count.cs | 0 .../Linq/Operators/DefaultIfEmpty.cs | 0 .../Linq/Operators/Defer.cs | 0 .../Linq/Operators/Delay.cs | 2 +- .../Linq/Operators/DelaySubscription.cs | 0 .../Linq/Operators/Dematerialize.cs | 0 .../Linq/Operators/Distinct.cs | 0 .../Linq/Operators/DistinctUntilChanged.cs | 0 .../Linq/Operators/Do.cs | 0 .../Linq/Operators/DoWhile.cs | 0 .../Linq/Operators/ElementAt.cs | 0 .../Linq/Operators/ElementAtOrDefault.cs | 0 .../Linq/Operators/Empty.cs | 0 .../Linq/Operators/Finally.cs | 0 .../Linq/Operators/First.cs | 0 .../Linq/Operators/FirstOrDefault.cs | 0 .../Linq/Operators/For.cs | 0 .../Linq/Operators/ForEachAsync.cs | 0 .../Linq/Operators/FromAsync.cs | 0 .../Operators/FromAsyncPattern.Generated.cs | 0 .../Operators/FromAsyncPattern.Generated.tt | 0 .../Linq/Operators/FromEvent.Generated.cs | 0 .../Linq/Operators/FromEvent.Generated.tt | 0 .../Linq/Operators/FromEvent.cs | 0 .../Linq/Operators/FromEventPattern.cs | 6 +- .../Linq/Operators/Generate.cs | 0 .../Linq/Operators/GetAwaiter.cs | 0 .../Linq/Operators/GroupBy.cs | 0 .../Linq/Operators/GroupByUntil.cs | 2 +- .../Linq/Operators/GroupJoin.cs | 2 +- .../Linq/Operators/If.cs | 0 .../Linq/Operators/IgnoreElements.cs | 0 .../Linq/Operators/Interval.cs | 0 .../Linq/Operators/IsEmpty.cs | 0 .../Linq/Operators/Join.cs | 2 +- .../Linq/Operators/Last.cs | 0 .../Linq/Operators/LastOrDefault.cs | 0 .../Linq/Operators/LongCount.cs | 0 .../Linq/Operators/Materialize.cs | 0 .../Linq/Operators/Max.Generated.cs | 0 .../Linq/Operators/Max.Generated.tt | 4 +- .../Linq/Operators/Max.cs | 0 .../Linq/Operators/MaxBy.cs | 0 .../Linq/Operators/Merge.cs | 2 +- .../Linq/Operators/Min.Generated.cs | 0 .../Linq/Operators/Min.Generated.tt | 4 +- .../Linq/Operators/Min.cs | 0 .../Linq/Operators/MinBy.cs | 0 .../Linq/Operators/Multicast.cs | 0 .../Linq/Operators/Never.cs | 0 .../Linq/Operators/ObserveOn.cs | 2 +- .../Linq/Operators/OfType.cs | 0 .../Linq/Operators/OnErrorResumeNext.cs | 0 .../Linq/Operators/Prepend.cs | 0 .../Linq/Operators/Publish.cs | 0 .../Linq/Operators/PublishLast.cs | 0 .../Linq/Operators/Range.cs | 0 .../Linq/Operators/RefCount.cs | 2 +- .../Linq/Operators/Repeat.cs | 0 .../Linq/Operators/Replay.cs | 0 .../Linq/Operators/Retry.cs | 0 .../Linq/Operators/Return.cs | 0 .../Linq/Operators/RunAsync.cs | 0 .../Linq/Operators/Sample.cs | 2 +- .../Linq/Operators/Scan.cs | 0 .../Linq/Operators/Select.cs | 0 .../Linq/Operators/SelectMany.cs | 2 +- .../Linq/Operators/SequenceEqual.cs | 2 +- .../Linq/Operators/Single.cs | 0 .../Linq/Operators/SingleOrDefault.cs | 0 .../Linq/Operators/Skip.cs | 2 +- .../Linq/Operators/SkipLast.cs | 0 .../Linq/Operators/SkipUntil.cs | 4 +- .../Linq/Operators/SkipWhile.cs | 0 .../Linq/Operators/Start.cs | 0 .../Linq/Operators/StartAsync.cs | 0 .../Linq/Operators/SubscribeOn.cs | 0 .../Linq/Operators/Sum.Generated.cs | 0 .../Linq/Operators/Sum.Generated.tt | 4 +- .../Linq/Operators/Sum.cs | 0 .../Linq/Operators/Switch.cs | 2 +- .../Linq/Operators/Synchronize.cs | 6 +- .../Linq/Operators/Take.cs | 2 +- .../Linq/Operators/TakeLast.cs | 0 .../Linq/Operators/TakeLastBuffer.cs | 0 .../Linq/Operators/TakeUntil.cs | 4 +- .../Linq/Operators/TakeWhile.cs | 0 .../Linq/Operators/Then.cs | 0 .../Linq/Operators/Throttle.cs | 4 +- .../Linq/Operators/Throw.cs | 0 .../Linq/Operators/TimeInterval.cs | 0 .../Linq/Operators/Timeout.cs | 2 +- .../Linq/Operators/Timer.cs | 0 .../Linq/Operators/Timestamp.cs | 0 .../Linq/Operators/ToArray.cs | 0 .../Linq/Operators/ToAsync.Generated.cs | 0 .../Linq/Operators/ToAsync.Generated.tt | 0 .../Linq/Operators/ToAsyncObservable.cs | 0 .../Linq/Operators/ToDictionary.cs | 0 .../Linq/Operators/ToEvent.cs | 0 .../Linq/Operators/ToEventPattern.cs | 0 .../Linq/Operators/ToHashSet.cs | 0 .../Linq/Operators/ToList.cs | 0 .../Linq/Operators/ToLookup.cs | 0 .../Linq/Operators/Using.cs | 0 .../Linq/Operators/When.cs | 2 +- .../Linq/Operators/Where.cs | 0 .../Linq/Operators/While.cs | 0 .../Linq/Operators/Window.cs | 10 +- .../Linq/Operators/WithLatestFrom.cs | 4 +- .../Linq/Operators/Zip.Generated.cs | 56 +- .../Linq/Operators/Zip.Generated.tt | 0 .../Linq/Operators/Zip.cs | 2 +- .../Linq/WindowAsyncObservable.cs | 0 .../NotificationAsyncExtensions.cs | 85 ++ .../AsyncMethodBuilderAttribute.cs | 0 .../AsyncObservableMethodBuilder.cs | 0 .../Subjects/AnonymousAsyncSubject.cs | 0 .../Subjects/AsyncAsyncSubject.cs | 0 .../Subjects/AsyncSubject.cs | 0 .../Subjects/BehaviorAsyncSubject.cs | 2 +- .../Subjects/ConcurrentAsyncAsyncSubject.cs | 0 .../ConcurrentBehaviorAsyncSubject.cs | 0 .../Subjects/ConcurrentReplayAsyncSubject.cs | 0 .../Subjects/ConcurrentSimpleAsyncSubject.cs | 0 .../Subjects/ConnectableAsyncObservable.cs | 2 +- .../Subjects/IAsyncSubject.cs | 0 .../Subjects/IConnectableAsyncObservable.cs | 0 .../Subjects/ReplayAsyncSubject.cs | 2 +- .../Subjects/SequentialAsyncAsyncSubject.cs | 0 .../SequentialBehaviorAsyncSubject.cs | 0 .../Subjects/SequentialReplayAsyncSubject.cs | 0 .../Subjects/SequentialSimpleAsyncSubject.cs | 0 .../Subjects/SimpleAsyncSubject.cs | 0 .../System.Reactive.Async.csproj | 129 ++- .../Threading/AsyncGate.cs} | 6 +- .../Threading/AsyncQueueLock.cs | 2 +- .../Tasks/TaskAsyncObservableExtensions.cs | 0 .../Threading/Tasks/TaskAwaitable.cs | 0 .../Threading/Tasks/ValueTaskAwaitable.cs | 0 .../System.Reactive.Bcl.csproj | 11 - .../System.Reactive.Shared.csproj | 11 - .../System/Reactive/EventPattern.cs | 112 --- .../System/Reactive/IEventPattern.cs | 30 - .../System/Reactive/IEventPatternSource.cs | 18 - .../System/Reactive/IEventSource.cs | 23 - .../System/Reactive/Notification.cs | 807 ------------------ .../System/Reactive/TimeInterval.cs | 105 --- .../System/Reactive/Timestamped.cs | 124 --- .../System/Reactive/Unit.cs | 64 -- 224 files changed, 403 insertions(+), 1760 deletions(-) create mode 100644 AsyncRx.NET/Documentation/adr/0001-package-unification.md delete mode 100644 AsyncRx.NET/System.Reactive.Async.Concurrency/System.Reactive.Async.Concurrency.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Async.Core/System.Reactive.Async.Core.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Async.Disposables/System.Reactive.Async.Disposables.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Async.Interfaces/System.Reactive.Async.Interfaces.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Async.Linq/System.Reactive.Async.Linq.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Async.Subjects/System.Reactive.Async.Subjects.csproj rename AsyncRx.NET/{System.Reactive.Async.Core/System/Reactive => System.Reactive.Async}/AsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Core/System/Reactive => System.Reactive.Async}/AsyncObservableBase.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Core/System => System.Reactive.Async}/AsyncObservableExtensions.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Core/System/Reactive => System.Reactive.Async}/AsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Core/System/Reactive => System.Reactive.Async}/AsyncObserverBase.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System/Reactive => System.Reactive.Async}/Concurrency/AsyncScheduler.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System/Reactive => System.Reactive.Async}/Concurrency/AsyncSchedulerBase.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System/Reactive => System.Reactive.Async}/Concurrency/Clock.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System/Reactive => System.Reactive.Async}/Concurrency/IAsyncScheduler.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System/Reactive => System.Reactive.Async}/Concurrency/IClock.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System/Reactive => System.Reactive.Async}/Concurrency/ImmediateAsyncScheduler.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System/Reactive => System.Reactive.Async}/Concurrency/SynchronizationContextAsyncScheduler.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System/Reactive => System.Reactive.Async}/Concurrency/TaskPoolAsyncScheduler.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/AsyncDisposable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/CancellationAsyncDisposable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/CompositeAsyncDisposable.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/RefCountAsyncDisposable.cs (97%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/SerialAsyncDisposable.cs (96%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/SingleAssignmentAsyncDisposable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Disposables/System/Reactive => System.Reactive.Async}/Disposables/StableCompositeAsyncDisposable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System => System.Reactive.Async}/IAsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System => System.Reactive.Async}/IAsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async/Internal}/AsyncQueueLockAsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Internal/EventPatternSource.cs (91%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSourceBase.cs => System.Reactive.Async/Internal/EventPatternSourceBaseInternal.cs} (89%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Internal/EventSource.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async/Internal}/FastImmediateAsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async/Internal}/ISchedulerAsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Internal/Lookup.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async/Internal}/ScheduledAsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async/Internal}/ScheduledAsyncObserverBase.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async/Internal}/UnsafeAsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/ActiveAsyncPlan.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/ActiveAsyncPlan.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/ActiveAsyncPlan.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncJoinObserver.cs (97%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncPattern.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncPattern.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncPattern.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncPlan.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncPlan.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/AsyncPlan.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Joins/IAsyncJoinObserver.cs (89%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/AsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/AsyncObserver.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/GroupedAsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System/Reactive => System.Reactive.Async}/Linq/IGroupedAsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Aggregate.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/All.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Amb.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/And.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Any.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Append.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/AsAsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Average.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Average.Generated.tt (96%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Average.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Buffer.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Case.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Cast.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Catch.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/CombineLatest.Generated.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/CombineLatest.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Concat.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Contains.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Count.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/DefaultIfEmpty.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Defer.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Delay.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/DelaySubscription.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Dematerialize.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Distinct.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/DistinctUntilChanged.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Do.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/DoWhile.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ElementAt.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ElementAtOrDefault.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Empty.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Finally.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/First.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FirstOrDefault.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/For.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ForEachAsync.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromAsync.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromAsyncPattern.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromAsyncPattern.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromEvent.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromEvent.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromEvent.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/FromEventPattern.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Generate.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/GetAwaiter.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/GroupBy.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/GroupByUntil.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/GroupJoin.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/If.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/IgnoreElements.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Interval.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/IsEmpty.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Join.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Last.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/LastOrDefault.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/LongCount.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Materialize.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Max.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Max.Generated.tt (96%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Max.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/MaxBy.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Merge.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Min.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Min.Generated.tt (96%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Min.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/MinBy.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Multicast.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Never.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ObserveOn.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/OfType.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/OnErrorResumeNext.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Prepend.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Publish.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/PublishLast.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Range.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/RefCount.cs (97%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Repeat.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Replay.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Retry.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Return.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/RunAsync.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Sample.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Scan.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Select.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SelectMany.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SequenceEqual.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Single.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SingleOrDefault.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Skip.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SkipLast.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SkipUntil.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SkipWhile.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Start.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/StartAsync.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/SubscribeOn.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Sum.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Sum.Generated.tt (96%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Sum.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Switch.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Synchronize.cs (93%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Take.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/TakeLast.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/TakeLastBuffer.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/TakeUntil.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/TakeWhile.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Then.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Throttle.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Throw.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/TimeInterval.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Timeout.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Timer.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Timestamp.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToArray.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToAsync.Generated.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToAsync.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToAsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToDictionary.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToEvent.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToEventPattern.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToHashSet.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToList.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/ToLookup.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Using.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/When.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Where.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/While.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Window.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/WithLatestFrom.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Zip.Generated.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Zip.Generated.tt (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/Operators/Zip.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Linq/WindowAsyncObservable.cs (100%) create mode 100644 AsyncRx.NET/System.Reactive.Async/NotificationAsyncExtensions.cs rename AsyncRx.NET/{System.Reactive.Async.Linq/System => System.Reactive.Async}/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System => System.Reactive.Async}/Runtime/CompilerServices/AsyncObservableMethodBuilder.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Core/System/Reactive => System.Reactive.Async}/Subjects/AnonymousAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/AsyncAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Core/System/Reactive => System.Reactive.Async}/Subjects/AsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/BehaviorAsyncSubject.cs (98%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/ConcurrentAsyncAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/ConcurrentBehaviorAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/ConcurrentReplayAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/ConcurrentSimpleAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System/Reactive => System.Reactive.Async}/Subjects/ConnectableAsyncObservable.cs (97%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System/Reactive => System.Reactive.Async}/Subjects/IAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Interfaces/System/Reactive => System.Reactive.Async}/Subjects/IConnectableAsyncObservable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/ReplayAsyncSubject.cs (99%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/SequentialAsyncAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/SequentialBehaviorAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/SequentialReplayAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/SequentialSimpleAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Subjects/System/Reactive => System.Reactive.Async}/Subjects/SimpleAsyncSubject.cs (100%) rename AsyncRx.NET/{System.Reactive.Bcl/System/Threading/AsyncLock.cs => System.Reactive.Async/Threading/AsyncGate.cs} (91%) rename AsyncRx.NET/{System.Reactive.Bcl/System => System.Reactive.Async}/Threading/AsyncQueueLock.cs (97%) rename AsyncRx.NET/{System.Reactive.Async.Linq/System => System.Reactive.Async}/Threading/Tasks/TaskAsyncObservableExtensions.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System => System.Reactive.Async}/Threading/Tasks/TaskAwaitable.cs (100%) rename AsyncRx.NET/{System.Reactive.Async.Concurrency/System => System.Reactive.Async}/Threading/Tasks/ValueTaskAwaitable.cs (100%) delete mode 100644 AsyncRx.NET/System.Reactive.Bcl/System.Reactive.Bcl.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System.Reactive.Shared.csproj delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/EventPattern.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPattern.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPatternSource.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventSource.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/Notification.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/TimeInterval.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/Timestamped.cs delete mode 100644 AsyncRx.NET/System.Reactive.Shared/System/Reactive/Unit.cs diff --git a/AsyncRx.NET/ApiCompare/ApiCompare.csproj b/AsyncRx.NET/ApiCompare/ApiCompare.csproj index 79e6e94db8..4496ab2833 100644 --- a/AsyncRx.NET/ApiCompare/ApiCompare.csproj +++ b/AsyncRx.NET/ApiCompare/ApiCompare.csproj @@ -10,7 +10,7 @@ - + diff --git a/AsyncRx.NET/AsyncRx.NET.sln b/AsyncRx.NET/AsyncRx.NET.sln index 62d535cc0b..fb57ed8a7c 100644 --- a/AsyncRx.NET/AsyncRx.NET.sln +++ b/AsyncRx.NET/AsyncRx.NET.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.3 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33424.131 MinimumVisualStudioVersion = 15.0.26124.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{1D64A210-F73A-4F91-9598-4C51865D105D}" EndProject @@ -13,22 +13,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Playground", "Playground\Pl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApiCompare", "ApiCompare\ApiCompare.csproj", "{84F35A01-ECC4-4635-B702-77F6B18FD54C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Shared", "System.Reactive.Shared\System.Reactive.Shared.csproj", "{09F10630-405B-4270-9AB6-0AB8F2EE6621}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Async.Concurrency", "System.Reactive.Async.Concurrency\System.Reactive.Async.Concurrency.csproj", "{2794CB27-C6A2-4156-A919-C033A9EE474E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Async.Disposables", "System.Reactive.Async.Disposables\System.Reactive.Async.Disposables.csproj", "{CE5036FE-9B94-40CC-8084-26ACE74D806A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Async.Interfaces", "System.Reactive.Async.Interfaces\System.Reactive.Async.Interfaces.csproj", "{B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Async.Subjects", "System.Reactive.Async.Subjects\System.Reactive.Async.Subjects.csproj", "{31A2470C-29B0-45BD-A9E8-340E7BDA15B0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Async.Linq", "System.Reactive.Async.Linq\System.Reactive.Async.Linq.csproj", "{D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Bcl", "System.Reactive.Bcl\System.Reactive.Bcl.csproj", "{B709ED34-B782-4617-AE83-C0170A2EEE19}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive.Async.Core", "System.Reactive.Async.Core\System.Reactive.Async.Core.csproj", "{9D2E636E-1C4D-4130-908D-4174B6D7AC71}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -75,102 +59,6 @@ Global {84F35A01-ECC4-4635-B702-77F6B18FD54C}.Release|x64.Build.0 = Release|Any CPU {84F35A01-ECC4-4635-B702-77F6B18FD54C}.Release|x86.ActiveCfg = Release|Any CPU {84F35A01-ECC4-4635-B702-77F6B18FD54C}.Release|x86.Build.0 = Release|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Debug|Any CPU.Build.0 = Debug|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Debug|x64.ActiveCfg = Debug|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Debug|x64.Build.0 = Debug|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Debug|x86.ActiveCfg = Debug|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Debug|x86.Build.0 = Debug|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Release|Any CPU.ActiveCfg = Release|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Release|Any CPU.Build.0 = Release|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Release|x64.ActiveCfg = Release|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Release|x64.Build.0 = Release|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Release|x86.ActiveCfg = Release|Any CPU - {09F10630-405B-4270-9AB6-0AB8F2EE6621}.Release|x86.Build.0 = Release|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Debug|x64.ActiveCfg = Debug|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Debug|x64.Build.0 = Debug|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Debug|x86.ActiveCfg = Debug|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Debug|x86.Build.0 = Debug|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Release|Any CPU.Build.0 = Release|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Release|x64.ActiveCfg = Release|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Release|x64.Build.0 = Release|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Release|x86.ActiveCfg = Release|Any CPU - {2794CB27-C6A2-4156-A919-C033A9EE474E}.Release|x86.Build.0 = Release|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Debug|x64.ActiveCfg = Debug|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Debug|x64.Build.0 = Debug|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Debug|x86.ActiveCfg = Debug|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Debug|x86.Build.0 = Debug|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Release|Any CPU.Build.0 = Release|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Release|x64.ActiveCfg = Release|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Release|x64.Build.0 = Release|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Release|x86.ActiveCfg = Release|Any CPU - {CE5036FE-9B94-40CC-8084-26ACE74D806A}.Release|x86.Build.0 = Release|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Debug|x64.ActiveCfg = Debug|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Debug|x64.Build.0 = Debug|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Debug|x86.ActiveCfg = Debug|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Debug|x86.Build.0 = Debug|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Release|Any CPU.Build.0 = Release|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Release|x64.ActiveCfg = Release|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Release|x64.Build.0 = Release|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Release|x86.ActiveCfg = Release|Any CPU - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE}.Release|x86.Build.0 = Release|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Debug|x64.ActiveCfg = Debug|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Debug|x64.Build.0 = Debug|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Debug|x86.ActiveCfg = Debug|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Debug|x86.Build.0 = Debug|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Release|Any CPU.Build.0 = Release|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Release|x64.ActiveCfg = Release|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Release|x64.Build.0 = Release|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Release|x86.ActiveCfg = Release|Any CPU - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0}.Release|x86.Build.0 = Release|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Debug|x64.ActiveCfg = Debug|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Debug|x64.Build.0 = Debug|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Debug|x86.ActiveCfg = Debug|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Debug|x86.Build.0 = Debug|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Release|Any CPU.Build.0 = Release|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Release|x64.ActiveCfg = Release|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Release|x64.Build.0 = Release|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Release|x86.ActiveCfg = Release|Any CPU - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D}.Release|x86.Build.0 = Release|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Debug|x64.ActiveCfg = Debug|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Debug|x64.Build.0 = Debug|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Debug|x86.ActiveCfg = Debug|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Debug|x86.Build.0 = Debug|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Release|Any CPU.Build.0 = Release|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Release|x64.ActiveCfg = Release|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Release|x64.Build.0 = Release|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Release|x86.ActiveCfg = Release|Any CPU - {B709ED34-B782-4617-AE83-C0170A2EEE19}.Release|x86.Build.0 = Release|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Debug|x64.ActiveCfg = Debug|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Debug|x64.Build.0 = Debug|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Debug|x86.ActiveCfg = Debug|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Debug|x86.Build.0 = Debug|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Release|Any CPU.Build.0 = Release|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Release|x64.ActiveCfg = Release|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Release|x64.Build.0 = Release|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Release|x86.ActiveCfg = Release|Any CPU - {9D2E636E-1C4D-4130-908D-4174B6D7AC71}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -179,14 +67,6 @@ Global {AEDF2B02-F301-4AC6-9DBC-2744746D816A} = {1D64A210-F73A-4F91-9598-4C51865D105D} {3B83795B-9870-43FA-82AF-95A44CF0194F} = {7D5B343C-B34D-481C-8774-B6BB14BC1B22} {84F35A01-ECC4-4635-B702-77F6B18FD54C} = {7D5B343C-B34D-481C-8774-B6BB14BC1B22} - {09F10630-405B-4270-9AB6-0AB8F2EE6621} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {2794CB27-C6A2-4156-A919-C033A9EE474E} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {CE5036FE-9B94-40CC-8084-26ACE74D806A} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {B66081C4-2DE2-451C-AE3B-6D2A8B9BE0EE} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {31A2470C-29B0-45BD-A9E8-340E7BDA15B0} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {D3A5AA1A-1E6F-43FD-B827-3015429D6E6D} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {B709ED34-B782-4617-AE83-C0170A2EEE19} = {1D64A210-F73A-4F91-9598-4C51865D105D} - {9D2E636E-1C4D-4130-908D-4174B6D7AC71} = {1D64A210-F73A-4F91-9598-4C51865D105D} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {836C3B9A-682A-4E6F-8053-92BFC9D29D89} diff --git a/AsyncRx.NET/Documentation/adr/0001-package-unification.md b/AsyncRx.NET/Documentation/adr/0001-package-unification.md new file mode 100644 index 0000000000..d36cc3cc4f --- /dev/null +++ b/AsyncRx.NET/Documentation/adr/0001-package-unification.md @@ -0,0 +1,64 @@ +# AsyncRx.NET NuGet Package Unification + +When the AsyncRx.NET was added to the dotnet/reactive repository back in 2017, it reflected the Rx v3 packaging approach in which all the various elements were split out. This ADR describes the change to a smaller number of packages. + +## Status + +Proposed. + +## Context + +The original AsyncRx.NET code was split into many packages. Note that none of these was published to NuGet. We had the following: + +* `System.Reactive.Async.Concurrency` +* `System.Reactive.Async.Core` +* `System.Reactive.Async.Disposables` +* `System.Reactive.Async.Interfaces` +* `System.Reactive.Async.Linq` +* `System.Reactive.Async.Subjects` +* `System.Reactive.Async` + +There were also two more projects that didn't contain anything specific to asynchronous Rx: + +* `System.Reactive.Bcl` +* `System.Reactive.Shared` + +The last of these, `System.Reactive.Shared`, contains the following types: + +* `EventPattern` +* `IEventPattern` +* `IEventPatternSource` +* `IEventSource` +* `Notification` +* `TimeInterval` +* `TimeStamped` +* `Unit` + +Definitions for all of these types already exist in the `System.Reactive` component published to NuGet. + +The `System.Reactive.Bcl` project contains two types providing asynchronous locking features. They appear to have been labelled `Bcl` because they are entirely non-Rx-specific, and are the sort of thing that might reasonably ultimately migrate into the BCL (and historically, a few things from Rx have done that). They are defined in the `System.Threading` namespace. + +It's useful to understand the history of `System.Reactive.Async.Interfaces` in particular. This is the asynchronous counterpart of `System.Reactive.Interfaces`. Back in the days of Rx v2.0, that interfaces library was conceived of as the home for types that were expected not to evolve. The plan was that this library would remain unchanged as the rest of Rx expanded and evolved. This way, APIs could expose Rx interface types in a way that did not cause a dependency on some specific version of the Rx implementation types. But it didn't go to plan. New versions of the `System.Reactive.Async.Interfaces` got published with new Rx releases. And then in Rx 4.0, the 'great unification' occurred, and the relevant types moved into `System.Reactive` with `System.Reactive.Interfaces` becoming a backwards-compatibility façade containing nothing but type forwarders. + +There's one important difference between Rx.NET and AsyncRx.NET when it comes to core interfaces. With Rx.NET, the two most critical interfaces, `IObservable` and `IObserver`, were added to the .NET runtime libraries. This means that any component can exposed Rx-based surface area without taking a dependency on any Rx library at all. The same is **not** true for AsyncRx.NET. + +The two most critical interfaces in AsyncRx.NET, `IAsyncObservable` and `IAsyncObserver` have not been defined in the .NET runtime libraries. There is arguably a need—for example, Project Orleans has defined (Orleans.Streams.IAsyncObservable)[https://learn.microsoft.com/en-us/dotnet/api/orleans.streams.iasyncobservable-1?view=orleans-7.0]. However, its definitions include Orleans-specific dependencies, so while the existence of that interface is evidence of a general-purpose requirement for this kind of thing, AsyncRx.NET cannot use that actual definition. + +Moreover, there are some unresolved questions over how cancellation fits into the picture discussed at https://github.com/dotnet/reactive/issues/1296 which suggests that AsyncRx.NET's existing definitions of these interfaces might not yet be fully baked. + +## Decision + +There will be a single `System.Reactive.Async` component. In most cases, we will simply move code out of the other projects and into this one without modification. However, some of the projects require special consideration. + +The `System.Reactive.Async.Interfaces` will be removed because it's not clear that even the two most critical interfaces, `IAsyncObservable` and `IAsyncObserver`, are fully baked, so it would be misleading to imply that these interfaces represent some stable type that can be relied on over a longer time frame than any particular AsyncRx.NET implementation release. (And in any case, that idea didn't quite pan out as planned for Rx.NET.) Moreover, merging these interface types into `System.Reactive.Async` is entirely consistent with the unification that was done with Rx.NET in v4.0. (And this does not introduce any of the problems we now see from that unification have gone too far, because there are no UI-framework-specific concerns in AsyncRx.NET.) + +The `System.Reactive.Shared` component will be removed, and AsyncRx.NET will instead take a dependency on `System.Reactive`, so that it can use the definitions of these types from that library. The long-term intention is that AsyncRx.NET will depend on the (to-be-created) version of Rx.NET that fixes the problems around unwanted accidental dependencies on UI framework, currently planned to be Rx 7.0. To signal this 'future-oriented' nature of AsyncRx.NET, initial previews will not depend on the currently published Rx 5.0, but will depend on the latest available preview until such time as a non-preview Rx 7.0 ships. + +The `System.Reactive.Bcl` component will be removed. The types it contains will move into `System.Reactive.Async`. We will move them out of the `System.Threading` namespace because at this point we have no plan for getting them into the .NET runtime libraries. We will check to see whether the runtime libraries do now in fact have similar functionality, in which case we will use that instead, and delete these types. But if there are no direct equivalents, we will move these into a suitable namespace and make them `internal` since they are implementation details, and it is not our intention for AsyncRx.NET to be providing general-purpose asynchronous programming utilities. + +## Consequences + +Consumers of AsyncRx.NET will see just a single NuGet package, `System.Reactive.Async`, removing any uncertainty over which is the right package to use. + +By removing `System.Reactive.Shared`, we avoid duplicate definitions of all the types it contains. The downside is that a dependency on AsyncRx.NET now necessarily means a dependency on Rx.NET, which wasn't previously the case. (Our view is that most projects wanting AsyncRx.NET will probably want Rx.NET too, so we don't regard this as a serious downside.) + diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System.Reactive.Async.Concurrency.csproj b/AsyncRx.NET/System.Reactive.Async.Concurrency/System.Reactive.Async.Concurrency.csproj deleted file mode 100644 index 57982d9dfd..0000000000 --- a/AsyncRx.NET/System.Reactive.Async.Concurrency/System.Reactive.Async.Concurrency.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.1 - - - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System.Reactive.Async.Core.csproj b/AsyncRx.NET/System.Reactive.Async.Core/System.Reactive.Async.Core.csproj deleted file mode 100644 index 40ac10e217..0000000000 --- a/AsyncRx.NET/System.Reactive.Async.Core/System.Reactive.Async.Core.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netstandard2.1 - - - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System.Reactive.Async.Disposables.csproj b/AsyncRx.NET/System.Reactive.Async.Disposables/System.Reactive.Async.Disposables.csproj deleted file mode 100644 index 4f2f989ee6..0000000000 --- a/AsyncRx.NET/System.Reactive.Async.Disposables/System.Reactive.Async.Disposables.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.1 - - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System.Reactive.Async.Interfaces.csproj b/AsyncRx.NET/System.Reactive.Async.Interfaces/System.Reactive.Async.Interfaces.csproj deleted file mode 100644 index f45bdfccce..0000000000 --- a/AsyncRx.NET/System.Reactive.Async.Interfaces/System.Reactive.Async.Interfaces.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - netstandard2.1 - - - diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System.Reactive.Async.Linq.csproj b/AsyncRx.NET/System.Reactive.Async.Linq/System.Reactive.Async.Linq.csproj deleted file mode 100644 index 0a45ac5c6e..0000000000 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System.Reactive.Async.Linq.csproj +++ /dev/null @@ -1,143 +0,0 @@ - - - - netstandard2.1 - - - - - True - True - FromEvent.Generated.tt - - - - - - - - - - - - - - - - True - True - ActiveAsyncPlan.Generated.tt - - - True - True - AsyncPattern.Generated.tt - - - True - True - AsyncPlan.Generated.tt - - - Average.Generated.tt - True - True - - - CombineLatest.Generated.tt - True - True - - - FromAsyncPattern.Generated.tt - True - True - - - True - True - FromEvent.Generated.tt - - - Max.Generated.tt - True - True - - - Min.Generated.tt - True - True - - - Sum.Generated.tt - True - True - - - True - True - ToAsync.Generated.tt - - - Zip.Generated.tt - True - True - - - - - - TextTemplatingFileGenerator - ActiveAsyncPlan.Generated.cs - - - TextTemplatingFileGenerator - AsyncPattern.Generated.cs - - - TextTemplatingFileGenerator - AsyncPlan.Generated.cs - - - Average.Generated.cs - TextTemplatingFileGenerator - - - CombineLatest.Generated.cs - TextTemplatingFileGenerator - - - TextTemplatingFileGenerator - FromEvent.Generated.cs - - - ToAsync.Generated.cs - TextTemplatingFileGenerator - - - FromAsyncPattern.Generated.cs - TextTemplatingFileGenerator - - - Max.Generated.cs - TextTemplatingFileGenerator - - - Min.Generated.cs - TextTemplatingFileGenerator - - - Sum.Generated.cs - TextTemplatingFileGenerator - - - Zip.Generated.cs - TextTemplatingFileGenerator - - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System.Reactive.Async.Subjects.csproj b/AsyncRx.NET/System.Reactive.Async.Subjects/System.Reactive.Async.Subjects.csproj deleted file mode 100644 index 49cfdf1a45..0000000000 --- a/AsyncRx.NET/System.Reactive.Async.Subjects/System.Reactive.Async.Subjects.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - netstandard2.1 - - - - - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/AsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/AsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObservableBase.cs b/AsyncRx.NET/System.Reactive.Async/AsyncObservableBase.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObservableBase.cs rename to AsyncRx.NET/System.Reactive.Async/AsyncObservableBase.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/AsyncObservableExtensions.cs b/AsyncRx.NET/System.Reactive.Async/AsyncObservableExtensions.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/AsyncObservableExtensions.cs rename to AsyncRx.NET/System.Reactive.Async/AsyncObservableExtensions.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/AsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/AsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObserverBase.cs b/AsyncRx.NET/System.Reactive.Async/AsyncObserverBase.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/AsyncObserverBase.cs rename to AsyncRx.NET/System.Reactive.Async/AsyncObserverBase.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/AsyncScheduler.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncScheduler.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/AsyncScheduler.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncScheduler.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/AsyncSchedulerBase.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncSchedulerBase.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/AsyncSchedulerBase.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/AsyncSchedulerBase.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/Clock.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/Clock.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/Clock.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/Clock.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Concurrency/IAsyncScheduler.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/IAsyncScheduler.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Concurrency/IAsyncScheduler.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/IAsyncScheduler.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Concurrency/IClock.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/IClock.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Concurrency/IClock.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/IClock.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/ImmediateAsyncScheduler.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/ImmediateAsyncScheduler.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/ImmediateAsyncScheduler.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/ImmediateAsyncScheduler.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/SynchronizationContextAsyncScheduler.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/SynchronizationContextAsyncScheduler.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/SynchronizationContextAsyncScheduler.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/SynchronizationContextAsyncScheduler.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/TaskPoolAsyncScheduler.cs b/AsyncRx.NET/System.Reactive.Async/Concurrency/TaskPoolAsyncScheduler.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Reactive/Concurrency/TaskPoolAsyncScheduler.cs rename to AsyncRx.NET/System.Reactive.Async/Concurrency/TaskPoolAsyncScheduler.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/AsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/AsyncDisposable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/AsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/AsyncDisposable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/CancellationAsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/CancellationAsyncDisposable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/CancellationAsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/CancellationAsyncDisposable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/CompositeAsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/CompositeAsyncDisposable.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/CompositeAsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/CompositeAsyncDisposable.cs index e4470fbf20..297bfa6b61 100644 --- a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/CompositeAsyncDisposable.cs +++ b/AsyncRx.NET/System.Reactive.Async/Disposables/CompositeAsyncDisposable.cs @@ -11,7 +11,7 @@ namespace System.Reactive.Disposables { public sealed class CompositeAsyncDisposable : IAsyncDisposable { - private readonly AsyncLock _gate = new AsyncLock(); + private readonly AsyncGate _gate = new AsyncGate(); private readonly List _disposables; private bool _disposed; diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/RefCountAsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/RefCountAsyncDisposable.cs similarity index 97% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/RefCountAsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/RefCountAsyncDisposable.cs index 3f931ca313..e93e783dc3 100644 --- a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/RefCountAsyncDisposable.cs +++ b/AsyncRx.NET/System.Reactive.Async/Disposables/RefCountAsyncDisposable.cs @@ -9,7 +9,7 @@ namespace System.Reactive.Disposables { public sealed class RefCountAsyncDisposable : IAsyncDisposable { - private readonly AsyncLock _gate = new AsyncLock(); + private readonly AsyncGate _gate = new AsyncGate(); private IAsyncDisposable _disposable; private bool _primaryDisposed; private int _count; diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/SerialAsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/SerialAsyncDisposable.cs similarity index 96% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/SerialAsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/SerialAsyncDisposable.cs index 7a00a64da7..bb1c69ce87 100644 --- a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/SerialAsyncDisposable.cs +++ b/AsyncRx.NET/System.Reactive.Async/Disposables/SerialAsyncDisposable.cs @@ -9,7 +9,7 @@ namespace System.Reactive.Disposables { public sealed class SerialAsyncDisposable : IAsyncDisposable { - private readonly AsyncLock _gate = new AsyncLock(); + private readonly AsyncGate _gate = new AsyncGate(); private IAsyncDisposable _disposable; private bool _disposed; diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/SingleAssignmentAsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/SingleAssignmentAsyncDisposable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/SingleAssignmentAsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/SingleAssignmentAsyncDisposable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/StableCompositeAsyncDisposable.cs b/AsyncRx.NET/System.Reactive.Async/Disposables/StableCompositeAsyncDisposable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Disposables/System/Reactive/Disposables/StableCompositeAsyncDisposable.cs rename to AsyncRx.NET/System.Reactive.Async/Disposables/StableCompositeAsyncDisposable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/IAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/IAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/IAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/IAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/IAsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/IAsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/IAsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/IAsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/AsyncQueueLockAsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/Internal/AsyncQueueLockAsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/AsyncQueueLockAsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/AsyncQueueLockAsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSource.cs b/AsyncRx.NET/System.Reactive.Async/Internal/EventPatternSource.cs similarity index 91% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSource.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/EventPatternSource.cs index 1cd176113c..66382b88df 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSource.cs +++ b/AsyncRx.NET/System.Reactive.Async/Internal/EventPatternSource.cs @@ -4,7 +4,7 @@ namespace System.Reactive { - internal sealed class EventPatternSource : EventPatternSourceBase, IEventPatternSource + internal sealed class EventPatternSource : EventPatternSourceBaseInternal, IEventPatternSource { public EventPatternSource(IAsyncObservable> source, Action, /*object,*/ EventPattern> invokeHandler) : base(source, invokeHandler) diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSourceBase.cs b/AsyncRx.NET/System.Reactive.Async/Internal/EventPatternSourceBaseInternal.cs similarity index 89% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSourceBase.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/EventPatternSourceBaseInternal.cs index 306058e7f0..c86286f297 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventPatternSourceBase.cs +++ b/AsyncRx.NET/System.Reactive.Async/Internal/EventPatternSourceBaseInternal.cs @@ -14,7 +14,12 @@ namespace System.Reactive /// /// The type of the sender that raises the event. /// The type of the event data generated by the event. - internal abstract class EventPatternSourceBase + /// + /// TODO: System.Reactive defines an EventPatternSourceBase. I (idg10) renamed this to EventPatternSourceBaseInternal to + /// avoid a conflict. Work out whether we could in fact just use the type defined in System.Reactive. It's not identical, + /// but perhaps it offers what we need. + /// + internal abstract class EventPatternSourceBaseInternal { private readonly IAsyncObservable> _source; private readonly Dictionary> _subscriptions; @@ -26,7 +31,7 @@ internal abstract class EventPatternSourceBase /// Source sequence to expose as an event. /// Delegate used to invoke the event for each element of the sequence. /// or is null. - protected EventPatternSourceBase(IAsyncObservable> source, Action, /*object,*/ EventPattern> invokeHandler) + protected EventPatternSourceBaseInternal(IAsyncObservable> source, Action, /*object,*/ EventPattern> invokeHandler) { _source = source ?? throw new ArgumentNullException(nameof(source)); _invokeHandler = invokeHandler ?? throw new ArgumentNullException(nameof(invokeHandler)); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventSource.cs b/AsyncRx.NET/System.Reactive.Async/Internal/EventSource.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/EventSource.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/EventSource.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/FastImmediateAsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/Internal/FastImmediateAsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/FastImmediateAsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/FastImmediateAsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ISchedulerAsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/Internal/ISchedulerAsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ISchedulerAsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/ISchedulerAsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/Lookup.cs b/AsyncRx.NET/System.Reactive.Async/Internal/Lookup.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Internal/Lookup.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/Lookup.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ScheduledAsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/Internal/ScheduledAsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ScheduledAsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/ScheduledAsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ScheduledAsyncObserverBase.cs b/AsyncRx.NET/System.Reactive.Async/Internal/ScheduledAsyncObserverBase.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ScheduledAsyncObserverBase.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/ScheduledAsyncObserverBase.cs index 696d9b59c3..b255b98de5 100644 --- a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/ScheduledAsyncObserverBase.cs +++ b/AsyncRx.NET/System.Reactive.Async/Internal/ScheduledAsyncObserverBase.cs @@ -12,7 +12,7 @@ internal abstract class ScheduledAsyncObserverBase : AsyncObserverBase, IS { private readonly IAsyncObserver _observer; - private readonly AsyncLock _lock = new AsyncLock(); + private readonly AsyncGate _lock = new AsyncGate(); private readonly Queue _queue = new Queue(); private bool _hasFaulted = false; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/UnsafeAsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/Internal/UnsafeAsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/UnsafeAsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Internal/UnsafeAsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/ActiveAsyncPlan.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Joins/ActiveAsyncPlan.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/ActiveAsyncPlan.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/ActiveAsyncPlan.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/ActiveAsyncPlan.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Joins/ActiveAsyncPlan.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/ActiveAsyncPlan.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Joins/ActiveAsyncPlan.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/ActiveAsyncPlan.cs b/AsyncRx.NET/System.Reactive.Async/Joins/ActiveAsyncPlan.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/ActiveAsyncPlan.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/ActiveAsyncPlan.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncJoinObserver.cs b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncJoinObserver.cs similarity index 97% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncJoinObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncJoinObserver.cs index 813b4b7003..3b44bc038f 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncJoinObserver.cs +++ b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncJoinObserver.cs @@ -18,7 +18,7 @@ internal sealed class AsyncJoinObserver : AsyncObserverBase>, private readonly List _activePlans = new List(); private readonly SingleAssignmentAsyncDisposable _subscription = new SingleAssignmentAsyncDisposable(); - private AsyncLock _gate; + private AsyncGate _gate; private bool _isDisposed; public AsyncJoinObserver(IAsyncObservable source, Func onError) @@ -56,7 +56,7 @@ public async ValueTask DisposeAsync() } } - public async Task SubscribeAsync(AsyncLock gate) + public async Task SubscribeAsync(AsyncGate gate) { _gate = gate; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPattern.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncPattern.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPattern.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncPattern.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPattern.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncPattern.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPattern.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncPattern.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPattern.cs b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncPattern.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPattern.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncPattern.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPlan.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncPlan.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPlan.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncPlan.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPlan.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncPlan.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPlan.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncPlan.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPlan.cs b/AsyncRx.NET/System.Reactive.Async/Joins/AsyncPlan.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/AsyncPlan.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/AsyncPlan.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/IAsyncJoinObserver.cs b/AsyncRx.NET/System.Reactive.Async/Joins/IAsyncJoinObserver.cs similarity index 89% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/IAsyncJoinObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Joins/IAsyncJoinObserver.cs index f45cda7c65..df2d71c599 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Joins/IAsyncJoinObserver.cs +++ b/AsyncRx.NET/System.Reactive.Async/Joins/IAsyncJoinObserver.cs @@ -9,7 +9,7 @@ namespace System.Reactive.Joins { internal interface IAsyncJoinObserver : IAsyncDisposable { - Task SubscribeAsync(AsyncLock gate); + Task SubscribeAsync(AsyncGate gate); void Dequeue(); } diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/AsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Linq/AsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/AsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/AsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/AsyncObserver.cs b/AsyncRx.NET/System.Reactive.Async/Linq/AsyncObserver.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/AsyncObserver.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/AsyncObserver.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/GroupedAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Linq/GroupedAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/GroupedAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/GroupedAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Linq/IGroupedAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Linq/IGroupedAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Linq/IGroupedAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/IGroupedAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Aggregate.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Aggregate.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Aggregate.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Aggregate.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/All.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/All.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/All.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/All.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Amb.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Amb.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Amb.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Amb.cs index 0fad13a01a..9105d85dc0 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Amb.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Amb.cs @@ -83,7 +83,7 @@ public static (IAsyncObserver, IAsyncObserver) Amb(IA if (second == null) throw new ArgumentNullException(nameof(second)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var state = AmbState.None; @@ -199,7 +199,7 @@ public static IAsyncObserver[] Amb(IAsyncObserver obs if (subscriptions == null) throw new ArgumentNullException(nameof(subscriptions)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var winner = default(int?); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/And.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/And.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/And.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/And.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Any.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Any.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Any.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Any.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Append.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Append.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Append.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Append.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/AsAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/AsAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/AsAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/AsAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.Generated.tt similarity index 96% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.Generated.tt index ea02bcc6aa..7716f14686 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.Generated.tt +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.Generated.tt @@ -53,7 +53,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=targetTypeName#>>.From( + return CreateAsyncObservable<<#=targetTypeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); @@ -66,7 +66,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=targetTypeName#>>.From( + return CreateAsyncObservable<<#=targetTypeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Average.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Average.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Buffer.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Buffer.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Buffer.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Buffer.cs index 6b181a5340..000c3b50b0 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Buffer.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Buffer.cs @@ -306,7 +306,7 @@ public static IAsyncObserver Buffer(IAsyncObserver, IAsyncDisposable)> CoreAsync() { - var gate = new AsyncLock(); + var gate = new AsyncGate(); var buffer = new List(); @@ -378,7 +378,7 @@ public static IAsyncObserver Buffer(IAsyncObserver, IAsyncDisposable)> CoreAsync() { - var gate = new AsyncLock(); + var gate = new AsyncGate(); var queue = new Queue>(); @@ -509,7 +509,7 @@ TimeSpan GetNextDue() async Task<(IAsyncObserver, IAsyncDisposable)> CoreAsync() { - var gate = new AsyncLock(); + var gate = new AsyncGate(); var timer = new SerialAsyncDisposable(); @@ -586,7 +586,7 @@ public static (IAsyncObserver, IAsyncObserver) Buffer< if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var buffer = new List(); @@ -660,7 +660,7 @@ public static (IAsyncObserver, IAsyncObserver) Buffer< { var closeSubscription = new SerialAsyncDisposable(); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var queueLock = new AsyncQueueLock(); var buffer = new List(); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Case.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Case.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Case.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Case.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Cast.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Cast.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Cast.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Cast.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Catch.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Catch.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Catch.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Catch.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/CombineLatest.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/CombineLatest.Generated.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/CombineLatest.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/CombineLatest.Generated.cs index f22411c302..c8ae78381a 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/CombineLatest.Generated.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/CombineLatest.Generated.cs @@ -1827,7 +1827,7 @@ public static (IAsyncObserver, IAsyncObserver) CombineLatest(IAs bool isDone2 = false; T2 latestValue2 = default(T2); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -1946,7 +1946,7 @@ public static (IAsyncObserver, IAsyncObserver) CombineLatest, IAsyncObserver, IAsyncObserver) Combi bool isDone3 = false; T3 latestValue3 = default(T3); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -2243,7 +2243,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver) Combi bool isDone3 = false; T3 latestValue3 = default(T3); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -2432,7 +2432,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone4 = false; T4 latestValue4 = default(T4); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -2643,7 +2643,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone4 = false; T4 latestValue4 = default(T4); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -2889,7 +2889,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone5 = false; T5 latestValue5 = default(T5); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -3146,7 +3146,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone5 = false; T5 latestValue5 = default(T5); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -3449,7 +3449,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone6 = false; T6 latestValue6 = default(T6); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -3752,7 +3752,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone6 = false; T6 latestValue6 = default(T6); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -4112,7 +4112,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone7 = false; T7 latestValue7 = default(T7); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -4461,7 +4461,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone7 = false; T7 latestValue7 = default(T7); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -4878,7 +4878,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone8 = false; T8 latestValue8 = default(T8); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -5273,7 +5273,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone8 = false; T8 latestValue8 = default(T8); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -5747,7 +5747,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone9 = false; T9 latestValue9 = default(T9); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -6188,7 +6188,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone9 = false; T9 latestValue9 = default(T9); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -6719,7 +6719,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone10 = false; T10 latestValue10 = default(T10); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -7206,7 +7206,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone10 = false; T10 latestValue10 = default(T10); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -7794,7 +7794,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone11 = false; T11 latestValue11 = default(T11); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -8327,7 +8327,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone11 = false; T11 latestValue11 = default(T11); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -8972,7 +8972,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone12 = false; T12 latestValue12 = default(T12); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -9551,7 +9551,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone12 = false; T12 latestValue12 = default(T12); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -10253,7 +10253,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone13 = false; T13 latestValue13 = default(T13); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -10878,7 +10878,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone13 = false; T13 latestValue13 = default(T13); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -11637,7 +11637,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone14 = false; T14 latestValue14 = default(T14); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -12308,7 +12308,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone14 = false; T14 latestValue14 = default(T14); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -13124,7 +13124,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone15 = false; T15 latestValue15 = default(T15); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( @@ -13841,7 +13841,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn bool isDone15 = false; T15 latestValue15 = default(T15); - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/CombineLatest.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/CombineLatest.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/CombineLatest.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/CombineLatest.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Concat.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Concat.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Concat.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Concat.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Contains.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Contains.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Contains.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Contains.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Count.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Count.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Count.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Count.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DefaultIfEmpty.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/DefaultIfEmpty.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DefaultIfEmpty.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/DefaultIfEmpty.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Defer.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Defer.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Delay.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Delay.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Delay.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Delay.cs index cfa7239181..918871500f 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Delay.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Delay.cs @@ -76,7 +76,7 @@ public partial class AsyncObserver var semaphore = new SemaphoreSlim(0); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var queue = new Queue>(); var isDone = false; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DelaySubscription.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/DelaySubscription.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DelaySubscription.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/DelaySubscription.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Dematerialize.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Dematerialize.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Dematerialize.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Dematerialize.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Distinct.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Distinct.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Distinct.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Distinct.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DistinctUntilChanged.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/DistinctUntilChanged.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DistinctUntilChanged.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/DistinctUntilChanged.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Do.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Do.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Do.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Do.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DoWhile.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/DoWhile.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/DoWhile.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/DoWhile.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ElementAt.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ElementAt.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ElementAt.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ElementAt.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ElementAtOrDefault.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ElementAtOrDefault.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ElementAtOrDefault.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ElementAtOrDefault.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Empty.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Empty.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Empty.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Empty.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Finally.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Finally.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Finally.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Finally.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/First.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/First.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/First.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/First.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FirstOrDefault.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FirstOrDefault.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FirstOrDefault.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FirstOrDefault.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/For.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/For.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/For.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/For.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ForEachAsync.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ForEachAsync.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ForEachAsync.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ForEachAsync.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromAsync.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromAsync.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromAsync.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromAsync.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromAsyncPattern.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromAsyncPattern.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromAsyncPattern.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromAsyncPattern.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromAsyncPattern.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromAsyncPattern.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromAsyncPattern.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromAsyncPattern.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEvent.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEvent.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEvent.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEvent.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEvent.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEvent.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEvent.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEvent.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEvent.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEvent.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEvent.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEvent.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEventPattern.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEventPattern.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEventPattern.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEventPattern.cs index ddfb2f16d1..d9e1523eff 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/FromEventPattern.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/FromEventPattern.cs @@ -24,7 +24,11 @@ public static IAsyncObservable> FromEventPattern(Action(action => new EventHandler((o, e) => action(o, e)), addHandler, removeHandler, scheduler).Select(t => new EventPattern(t.arg1, t.arg2)); + return FromEvent( + action => new EventHandler((o, e) => action(o, e)), + addHandler, + removeHandler, + scheduler).Select(t => new EventPattern(t.arg1, t.arg2)); } public static IAsyncObservable> FromEventPattern(Action addHandler, Action removeHandler) => FromEventPattern(addHandler, removeHandler, GetSchedulerForCurrentContext()); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Generate.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Generate.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Generate.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Generate.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GetAwaiter.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/GetAwaiter.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GetAwaiter.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/GetAwaiter.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupBy.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupBy.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupBy.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupBy.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupByUntil.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupByUntil.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupByUntil.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupByUntil.cs index 92c4164937..5221045a9f 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupByUntil.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupByUntil.cs @@ -609,7 +609,7 @@ public partial class AsyncObserver groups = new ConcurrentDictionary>(Environment.ProcessorCount * 4, capacity, comparer); } - var gate = new AsyncLock(); + var gate = new AsyncGate(); var nullGate = new object(); var nullGroup = default(IAsyncSubject); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupJoin.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupJoin.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupJoin.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupJoin.cs index af2714174f..93d855bc95 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/GroupJoin.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/GroupJoin.cs @@ -57,7 +57,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncDisposable) if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var group = new CompositeAsyncDisposable(subscriptions); var refCount = new RefCountAsyncDisposable(group); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/If.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/If.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/If.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/If.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/IgnoreElements.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/IgnoreElements.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/IgnoreElements.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/IgnoreElements.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Interval.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Interval.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Interval.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Interval.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/IsEmpty.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/IsEmpty.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/IsEmpty.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/IsEmpty.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Join.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Join.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Join.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Join.cs index 80235198c5..5d9971479b 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Join.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Join.cs @@ -59,7 +59,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncDisposable) if (resultSelector == null) throw new ArgumentNullException(nameof(resultSelector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var group = new CompositeAsyncDisposable(subscriptions); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Last.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Last.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Last.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Last.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/LastOrDefault.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/LastOrDefault.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/LastOrDefault.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/LastOrDefault.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/LongCount.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/LongCount.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/LongCount.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/LongCount.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Materialize.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Materialize.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Materialize.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Materialize.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.Generated.tt similarity index 96% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.Generated.tt index c203d8db3f..8686381e47 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.Generated.tt +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.Generated.tt @@ -42,7 +42,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=typeName#>>.From( + return CreateAsyncObservable<<#=typeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); @@ -55,7 +55,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=typeName#>>.From( + return CreateAsyncObservable<<#=typeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Max.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Max.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/MaxBy.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/MaxBy.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/MaxBy.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/MaxBy.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Merge.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Merge.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Merge.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Merge.cs index 5a0ada1391..f03a496dbb 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Merge.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Merge.cs @@ -35,7 +35,7 @@ public static (IAsyncObserver>, IAsyncDisposable) Merg if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var count = 1; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.Generated.tt similarity index 96% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.Generated.tt index bed8dec4df..2248cdc812 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.Generated.tt +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.Generated.tt @@ -42,7 +42,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=typeName#>>.From( + return CreateAsyncObservable<<#=typeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); @@ -55,7 +55,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=typeName#>>.From( + return CreateAsyncObservable<<#=typeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Min.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Min.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/MinBy.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/MinBy.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/MinBy.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/MinBy.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Multicast.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Multicast.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Multicast.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Multicast.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Never.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Never.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Never.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Never.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ObserveOn.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ObserveOn.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ObserveOn.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ObserveOn.cs index baa2998f78..d4949b1e1c 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ObserveOn.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ObserveOn.cs @@ -44,7 +44,7 @@ public partial class AsyncObserver var semaphore = new SemaphoreSlim(0); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var queue = new Queue(); var error = default(Exception); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/OfType.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/OfType.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/OfType.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/OfType.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/OnErrorResumeNext.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/OnErrorResumeNext.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/OnErrorResumeNext.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/OnErrorResumeNext.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Prepend.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Prepend.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Prepend.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Prepend.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Publish.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Publish.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Publish.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Publish.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/PublishLast.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/PublishLast.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/PublishLast.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/PublishLast.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Range.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Range.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Range.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Range.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/RefCount.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/RefCount.cs similarity index 97% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/RefCount.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/RefCount.cs index 6a2ada1b25..60da700b31 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/RefCount.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/RefCount.cs @@ -15,7 +15,7 @@ public static IAsyncObservable RefCount(this IConnectableAsync if (source == null) throw new ArgumentNullException(nameof(source)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var count = 0; var connectable = default(IAsyncDisposable); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Repeat.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Repeat.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Repeat.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Repeat.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Replay.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Replay.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Replay.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Replay.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Retry.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Retry.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Retry.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Retry.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Return.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Return.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Return.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Return.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/RunAsync.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/RunAsync.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/RunAsync.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/RunAsync.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Sample.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Sample.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Sample.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Sample.cs index d0fe784413..e8752d3d8f 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Sample.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Sample.cs @@ -78,7 +78,7 @@ public static (IAsyncObserver, IAsyncObserver) Sample, IAsyncDisposable) SelectMany, IAsyncObserver) SequenceEqual(); var queueRight = new Queue(); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Single.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Single.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Single.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Single.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SingleOrDefault.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/SingleOrDefault.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SingleOrDefault.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/SingleOrDefault.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Skip.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Skip.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Skip.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Skip.cs index aea9e1fe6c..126dbb00d3 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Skip.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Skip.cs @@ -130,7 +130,7 @@ public static IAsyncObserver Skip(IAsyncObserver obse // REVIEW: May be easier to just use SkipUntil with a Timer parameter. Do we want Skip on the observer? // DESIGN: It seems that if an observer would be an IAsyncDisposable, this could get a bit easier ("inject" the inner disposable). - var gate = new AsyncLock(); + var gate = new AsyncGate(); var open = false; return diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SkipLast.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/SkipLast.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SkipLast.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/SkipLast.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SkipUntil.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/SkipUntil.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SkipUntil.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/SkipUntil.cs index c01b1204fe..7f6c478d79 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/SkipUntil.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/SkipUntil.cs @@ -87,7 +87,7 @@ public static (IAsyncObserver, IAsyncObserver) SkipUntil, IAsyncObserver) SkipUntil>.From( + return CreateAsyncObservable<<#=typeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); @@ -55,7 +55,7 @@ foreach (var t in types) if (selector == null) throw new ArgumentNullException(nameof(selector)); - return Build<<#=typeName#>>.From( + return CreateAsyncObservable<<#=typeName#>>.From( source, selector, static (source, selector, observer) => source.SubscribeSafeAsync(AsyncObserver.<#=name#><#=methodName#>(observer, selector))); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Sum.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Sum.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Sum.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Sum.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Switch.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Switch.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Switch.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Switch.cs index aa753f1dca..14cc45ee71 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Switch.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Switch.cs @@ -34,7 +34,7 @@ public static (IAsyncObserver>, IAsyncDisposable) Swit if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var isStopped = false; var hasLatest = false; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Synchronize.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Synchronize.cs similarity index 93% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Synchronize.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Synchronize.cs index 6482643919..27d016799c 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Synchronize.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Synchronize.cs @@ -16,7 +16,7 @@ public static IAsyncObservable Synchronize(this IAsyncObservab return Create(source, static (source, observer) => source.SubscribeSafeAsync(AsyncObserver.Synchronize(observer))); } - public static IAsyncObservable Synchronize(this IAsyncObservable source, AsyncLock gate) + public static IAsyncObservable Synchronize(this IAsyncObservable source, AsyncGate gate) { if (source == null) throw new ArgumentNullException(nameof(source)); @@ -37,10 +37,10 @@ public static IAsyncObserver Synchronize(IAsyncObserver Synchronize(IAsyncObserver observer, AsyncLock gate) + public static IAsyncObserver Synchronize(IAsyncObserver observer, AsyncGate gate) { if (observer == null) throw new ArgumentNullException(nameof(observer)); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Take.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Take.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Take.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Take.cs index c049a72cfe..d0064c23a2 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Take.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Take.cs @@ -130,7 +130,7 @@ public static IAsyncObserver Take(IAsyncObserver obse // REVIEW: May be easier to just use TakeUntil with a Timer parameter. Do we want TakeUntil on the observer? // DESIGN: It seems that if an observer would be an IAsyncDisposable, this could get a bit easier ("inject" the inner disposable). - var gate = new AsyncLock(); + var gate = new AsyncGate(); return ( diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeLast.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeLast.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeLast.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeLast.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeLastBuffer.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeLastBuffer.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeLastBuffer.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeLastBuffer.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeUntil.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeUntil.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeUntil.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeUntil.cs index 8d9be0f876..b71eb727af 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/TakeUntil.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/TakeUntil.cs @@ -87,7 +87,7 @@ public static (IAsyncObserver, IAsyncObserver) TakeUntil, IAsyncObserver) TakeUntil, IAsyncDisposable) Throttle(IAsy if (scheduler == null) throw new ArgumentNullException(nameof(scheduler)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var timer = new SerialAsyncDisposable(); @@ -187,7 +187,7 @@ public static (IAsyncObserver, IAsyncDisposable) Throttle, IAsyncDisposable)> CoreAsync() { - var gate = new AsyncLock(); + var gate = new AsyncGate(); var switched = false; var id = 0UL; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Timer.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Timer.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Timer.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Timer.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Timestamp.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Timestamp.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Timestamp.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Timestamp.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToArray.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToArray.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToArray.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToArray.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToAsync.Generated.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToAsync.Generated.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToAsync.Generated.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToAsync.Generated.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToAsync.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToAsync.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToAsync.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToAsync.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToDictionary.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToDictionary.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToDictionary.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToDictionary.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToEvent.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToEvent.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToEvent.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToEvent.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToEventPattern.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToEventPattern.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToEventPattern.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToEventPattern.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToHashSet.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToHashSet.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToHashSet.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToHashSet.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToList.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToList.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToList.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToList.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToLookup.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToLookup.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/ToLookup.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/ToLookup.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Using.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Using.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Using.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Using.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/When.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/When.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/When.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/When.cs index 78ecec0245..562c28ad3d 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/When.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/When.cs @@ -19,7 +19,7 @@ public static IAsyncObservable When(IEnumerable(async observer => { var externalSubscriptions = new Dictionary(); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var activePlans = new List(); var outputObserver = AsyncObserver.Create( diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Where.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Where.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Where.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Where.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/While.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/While.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/While.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/While.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Window.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Window.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Window.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Window.cs index e23a8e81dc..aafbe08e33 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Window.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Window.cs @@ -296,7 +296,7 @@ public static (IAsyncObserver, IAsyncDisposable) Window(IAsync if (scheduler == null) throw new ArgumentNullException(nameof(scheduler)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var window = default(IAsyncSubject); var d = new CompositeAsyncDisposable(); @@ -382,7 +382,7 @@ async Task CreateWindowAsync() if (scheduler == null) throw new ArgumentNullException(nameof(scheduler)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var d = new CompositeAsyncDisposable(); var timer = new SerialAsyncDisposable(); @@ -538,7 +538,7 @@ async Task CreateTimer() if (scheduler == null) throw new ArgumentNullException(nameof(scheduler)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var n = 0; var window = default(IAsyncSubject); @@ -649,7 +649,7 @@ async Task> CreateWindowAsync() if (subscription == null) throw new ArgumentNullException(nameof(subscription)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var refCount = new RefCountAsyncDisposable(subscription); var window = default(IAsyncSubject); @@ -736,7 +736,7 @@ async Task CreateWindowAsync() var closeSubscription = new SerialAsyncDisposable(); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var queueLock = new AsyncQueueLock(); var refCount = new RefCountAsyncDisposable(subscription); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/WithLatestFrom.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/WithLatestFrom.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/WithLatestFrom.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/WithLatestFrom.cs index 92ac076164..859aaaca2e 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/WithLatestFrom.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/WithLatestFrom.cs @@ -103,7 +103,7 @@ public static (IAsyncObserver, IAsyncObserver) WithLatestFrom, IAsyncObserver) WithLatestFrom, IAsyncObserver) Zip(IAsyncObserve if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -1913,7 +1913,7 @@ public static (IAsyncObserver, IAsyncObserver) Zip(IAsy if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2007,7 +2007,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver) Zip(); var values2 = new Queue(); @@ -2103,7 +2103,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver) Zip(); var values2 = new Queue(); @@ -2199,7 +2199,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2297,7 +2297,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2395,7 +2395,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2495,7 +2495,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2595,7 +2595,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2697,7 +2697,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2799,7 +2799,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -2903,7 +2903,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3007,7 +3007,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3113,7 +3113,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3219,7 +3219,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3327,7 +3327,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3435,7 +3435,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3545,7 +3545,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3655,7 +3655,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3767,7 +3767,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3879,7 +3879,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -3993,7 +3993,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -4107,7 +4107,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -4223,7 +4223,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -4339,7 +4339,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -4457,7 +4457,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -4575,7 +4575,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (observer == null) throw new ArgumentNullException(nameof(observer)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); @@ -4695,7 +4695,7 @@ public static (IAsyncObserver, IAsyncObserver, IAsyncObserver, IAsyn if (selector == null) throw new ArgumentNullException(nameof(selector)); - var gate = new AsyncLock(); + var gate = new AsyncGate(); var values1 = new Queue(); var values2 = new Queue(); diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Zip.Generated.tt b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Zip.Generated.tt similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Zip.Generated.tt rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Zip.Generated.tt diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Zip.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Zip.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Zip.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/Operators/Zip.cs index 14e3d9468d..4deb6427c7 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/Operators/Zip.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Zip.cs @@ -50,7 +50,7 @@ public static IAsyncObserver[] Zip(IAsyncObserver[count]; var isDone = new bool[count]; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/WindowAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Linq/WindowAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Linq/WindowAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Linq/WindowAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async/NotificationAsyncExtensions.cs b/AsyncRx.NET/System.Reactive.Async/NotificationAsyncExtensions.cs new file mode 100644 index 0000000000..46c0753301 --- /dev/null +++ b/AsyncRx.NET/System.Reactive.Async/NotificationAsyncExtensions.cs @@ -0,0 +1,85 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT License. +// See the LICENSE file in the project root for more information. + +using System.Threading.Tasks; + +namespace System.Reactive +{ + internal static class NotificationAsyncExtensions + { + /// + /// Invokes the observer's method corresponding to the notification. + /// + /// The item type. + /// The notification. + /// Observer to invoke the notification on. + /// A task that completes when the observer is done. + /// + /// + /// The implementation of we get from System.Reactive is + /// missing the built-in support for this method that the version in System.Reactive.Shared + /// used to have (but is otherwise identical). This reproduces that as an extension method. + /// + public static async ValueTask AcceptAsync(this Notification notification, IAsyncObserver observer) + { + if (observer == null) + throw new ArgumentNullException(nameof(observer)); + + var adapter = new NotificationAdapter(observer); + notification.Accept(adapter); + await adapter.Wait().ConfigureAwait(false); + } + + private class NotificationAdapter : IObserver + { + private readonly IAsyncObserver _asyncObserver; + private ValueTask? _valueTask; + + public NotificationAdapter(IAsyncObserver asyncObserver) + { + _asyncObserver = asyncObserver; + } + + public async ValueTask Wait() + { + if (!_valueTask.HasValue) + { + throw new InvalidOperationException("Accept did not call any IObserver method"); + } + + await _valueTask.Value.ConfigureAwait(false); + } + + public void OnCompleted() + { + if (_valueTask.HasValue) + { + throw new InvalidOperationException("Accept should have called only one IObserver method"); + } + + _valueTask = _asyncObserver.OnCompletedAsync(); + } + + public void OnError(Exception error) + { + if (_valueTask.HasValue) + { + throw new InvalidOperationException("Accept should have called only one IObserver method"); + } + + _valueTask = _asyncObserver.OnErrorAsync(error); + } + + public void OnNext(T value) + { + if (_valueTask.HasValue) + { + throw new InvalidOperationException("Accept should have called only one IObserver method"); + } + + _valueTask = _asyncObserver.OnNextAsync(value); + } + } + } +} diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs b/AsyncRx.NET/System.Reactive.Async/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs rename to AsyncRx.NET/System.Reactive.Async/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Runtime/CompilerServices/AsyncObservableMethodBuilder.cs b/AsyncRx.NET/System.Reactive.Async/Runtime/CompilerServices/AsyncObservableMethodBuilder.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Runtime/CompilerServices/AsyncObservableMethodBuilder.cs rename to AsyncRx.NET/System.Reactive.Async/Runtime/CompilerServices/AsyncObservableMethodBuilder.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/Subjects/AnonymousAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/AnonymousAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/Subjects/AnonymousAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/AnonymousAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/AsyncAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/AsyncAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/AsyncAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/AsyncAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/Subjects/AsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/AsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Core/System/Reactive/Subjects/AsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/AsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/BehaviorAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/BehaviorAsyncSubject.cs similarity index 98% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/BehaviorAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/BehaviorAsyncSubject.cs index 48791e91cd..16b4ecc51b 100644 --- a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/BehaviorAsyncSubject.cs +++ b/AsyncRx.NET/System.Reactive.Async/Subjects/BehaviorAsyncSubject.cs @@ -11,7 +11,7 @@ namespace System.Reactive.Subjects { public abstract class BehaviorAsyncSubject : IAsyncSubject { - private readonly AsyncLock _gate = new AsyncLock(); + private readonly AsyncGate _gate = new AsyncGate(); private readonly List> _observers = new List>(); private T _value; private bool _done; diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentAsyncAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentAsyncAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentAsyncAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentAsyncAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentBehaviorAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentBehaviorAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentBehaviorAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentBehaviorAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentReplayAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentReplayAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentReplayAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentReplayAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentSimpleAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentSimpleAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ConcurrentSimpleAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/ConcurrentSimpleAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Subjects/ConnectableAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/ConnectableAsyncObservable.cs similarity index 97% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Subjects/ConnectableAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/ConnectableAsyncObservable.cs index aca9ddb553..95e94dee67 100644 --- a/AsyncRx.NET/System.Reactive.Async.Linq/System/Reactive/Subjects/ConnectableAsyncObservable.cs +++ b/AsyncRx.NET/System.Reactive.Async/Subjects/ConnectableAsyncObservable.cs @@ -12,7 +12,7 @@ internal sealed class ConnectableAsyncObservable : IConnectabl { private readonly IAsyncSubject subject; private readonly IAsyncObservable source; - private readonly AsyncLock gate = new AsyncLock(); + private readonly AsyncGate gate = new AsyncGate(); private Connection connection; diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Subjects/IAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/IAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Subjects/IAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/IAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Subjects/IConnectableAsyncObservable.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/IConnectableAsyncObservable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Interfaces/System/Reactive/Subjects/IConnectableAsyncObservable.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/IConnectableAsyncObservable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ReplayAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/ReplayAsyncSubject.cs similarity index 99% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ReplayAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/ReplayAsyncSubject.cs index 8524de7b1d..90e29eb18a 100644 --- a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/ReplayAsyncSubject.cs +++ b/AsyncRx.NET/System.Reactive.Async/Subjects/ReplayAsyncSubject.cs @@ -120,7 +120,7 @@ public ReplayAsyncSubject(bool concurrent, int bufferSize, TimeSpan window, IAsy private abstract class ReplayBase : IAsyncSubject { private readonly bool _concurrent; - private readonly AsyncLock _lock = new AsyncLock(); + private readonly AsyncGate _lock = new AsyncGate(); private readonly List> _observers = new List>(); // TODO: immutable array private bool _done; private Exception _error; diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialAsyncAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/SequentialAsyncAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialAsyncAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/SequentialAsyncAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialBehaviorAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/SequentialBehaviorAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialBehaviorAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/SequentialBehaviorAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialReplayAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/SequentialReplayAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialReplayAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/SequentialReplayAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialSimpleAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/SequentialSimpleAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SequentialSimpleAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/SequentialSimpleAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SimpleAsyncSubject.cs b/AsyncRx.NET/System.Reactive.Async/Subjects/SimpleAsyncSubject.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Subjects/System/Reactive/Subjects/SimpleAsyncSubject.cs rename to AsyncRx.NET/System.Reactive.Async/Subjects/SimpleAsyncSubject.cs diff --git a/AsyncRx.NET/System.Reactive.Async/System.Reactive.Async.csproj b/AsyncRx.NET/System.Reactive.Async/System.Reactive.Async.csproj index a6c9614b95..e2a108c32d 100644 --- a/AsyncRx.NET/System.Reactive.Async/System.Reactive.Async.csproj +++ b/AsyncRx.NET/System.Reactive.Async/System.Reactive.Async.csproj @@ -2,17 +2,130 @@ netstandard2.1 + + System.Reactive - - - - - - - - + + + + + + True + True + ActiveAsyncPlan.Generated.tt + + + True + True + AsyncPattern.Generated.tt + + + True + True + AsyncPlan.Generated.tt + + + Average.Generated.tt + True + True + + + CombineLatest.Generated.tt + True + True + + + FromAsyncPattern.Generated.tt + True + True + + + True + True + FromEvent.Generated.tt + + + Max.Generated.tt + True + True + + + Min.Generated.tt + True + True + + + Sum.Generated.tt + True + True + + + True + True + ToAsync.Generated.tt + + + Zip.Generated.tt + True + True + + + + + + TextTemplatingFileGenerator + ActiveAsyncPlan.Generated.cs + + + TextTemplatingFileGenerator + AsyncPattern.Generated.cs + + + TextTemplatingFileGenerator + AsyncPlan.Generated.cs + + + Average.Generated.cs + TextTemplatingFileGenerator + + + CombineLatest.Generated.cs + TextTemplatingFileGenerator + + + TextTemplatingFileGenerator + FromEvent.Generated.cs + + + ToAsync.Generated.cs + TextTemplatingFileGenerator + + + FromAsyncPattern.Generated.cs + TextTemplatingFileGenerator + + + Max.Generated.cs + TextTemplatingFileGenerator + + + Min.Generated.cs + TextTemplatingFileGenerator + + + Sum.Generated.cs + TextTemplatingFileGenerator + + + Zip.Generated.cs + TextTemplatingFileGenerator + + + + + diff --git a/AsyncRx.NET/System.Reactive.Bcl/System/Threading/AsyncLock.cs b/AsyncRx.NET/System.Reactive.Async/Threading/AsyncGate.cs similarity index 91% rename from AsyncRx.NET/System.Reactive.Bcl/System/Threading/AsyncLock.cs rename to AsyncRx.NET/System.Reactive.Async/Threading/AsyncGate.cs index b1c320b0b6..d1b9ebbced 100644 --- a/AsyncRx.NET/System.Reactive.Bcl/System/Threading/AsyncLock.cs +++ b/AsyncRx.NET/System.Reactive.Async/Threading/AsyncGate.cs @@ -7,7 +7,7 @@ namespace System.Threading { - public sealed class AsyncLock + public sealed class AsyncGate { private readonly object _gate = new object(); private readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1, 1); @@ -53,9 +53,9 @@ private void Release() public struct Releaser : IDisposable { - private readonly AsyncLock _parent; + private readonly AsyncGate _parent; - public Releaser(AsyncLock parent) => _parent = parent; + public Releaser(AsyncGate parent) => _parent = parent; public void Dispose() => _parent.Release(); } diff --git a/AsyncRx.NET/System.Reactive.Bcl/System/Threading/AsyncQueueLock.cs b/AsyncRx.NET/System.Reactive.Async/Threading/AsyncQueueLock.cs similarity index 97% rename from AsyncRx.NET/System.Reactive.Bcl/System/Threading/AsyncQueueLock.cs rename to AsyncRx.NET/System.Reactive.Async/Threading/AsyncQueueLock.cs index d2002e3372..56e0af029c 100644 --- a/AsyncRx.NET/System.Reactive.Bcl/System/Threading/AsyncQueueLock.cs +++ b/AsyncRx.NET/System.Reactive.Async/Threading/AsyncQueueLock.cs @@ -10,7 +10,7 @@ namespace System.Threading public sealed class AsyncQueueLock : IAsyncDisposable { private readonly Queue> _queue = new Queue>(); - private readonly AsyncLock _gate = new AsyncLock(); + private readonly AsyncGate _gate = new AsyncGate(); private bool _isAcquired; private bool _hasFaulted; diff --git a/AsyncRx.NET/System.Reactive.Async.Linq/System/Threading/Tasks/TaskAsyncObservableExtensions.cs b/AsyncRx.NET/System.Reactive.Async/Threading/Tasks/TaskAsyncObservableExtensions.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Linq/System/Threading/Tasks/TaskAsyncObservableExtensions.cs rename to AsyncRx.NET/System.Reactive.Async/Threading/Tasks/TaskAsyncObservableExtensions.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Threading/Tasks/TaskAwaitable.cs b/AsyncRx.NET/System.Reactive.Async/Threading/Tasks/TaskAwaitable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Threading/Tasks/TaskAwaitable.cs rename to AsyncRx.NET/System.Reactive.Async/Threading/Tasks/TaskAwaitable.cs diff --git a/AsyncRx.NET/System.Reactive.Async.Concurrency/System/Threading/Tasks/ValueTaskAwaitable.cs b/AsyncRx.NET/System.Reactive.Async/Threading/Tasks/ValueTaskAwaitable.cs similarity index 100% rename from AsyncRx.NET/System.Reactive.Async.Concurrency/System/Threading/Tasks/ValueTaskAwaitable.cs rename to AsyncRx.NET/System.Reactive.Async/Threading/Tasks/ValueTaskAwaitable.cs diff --git a/AsyncRx.NET/System.Reactive.Bcl/System.Reactive.Bcl.csproj b/AsyncRx.NET/System.Reactive.Bcl/System.Reactive.Bcl.csproj deleted file mode 100644 index a96e970256..0000000000 --- a/AsyncRx.NET/System.Reactive.Bcl/System.Reactive.Bcl.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - netstandard2.1 - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Shared/System.Reactive.Shared.csproj b/AsyncRx.NET/System.Reactive.Shared/System.Reactive.Shared.csproj deleted file mode 100644 index a96e970256..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System.Reactive.Shared.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - netstandard2.1 - - - - - - - diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/EventPattern.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/EventPattern.cs deleted file mode 100644 index ad8bec5426..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/EventPattern.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; - -namespace System.Reactive -{ - /// - /// Represents a .NET event invocation consisting of the weakly typed object that raised the event and the data that was generated by the event. - /// - /// The type of the event data generated by the event. - public class EventPattern : EventPattern - { - /// - /// Creates a new data representation instance of a .NET event invocation with the given sender and event data. - /// - /// The sender object that raised the event. - /// The event data that was generated by the event. - public EventPattern(object sender, TEventArgs e) - : base(sender, e) - { - } - } - - /// - /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event. - /// - /// The type of the sender that raised the event. - /// The type of the event data generated by the event. - public class EventPattern : IEquatable>, IEventPattern - { - /// - /// Creates a new data representation instance of a .NET event invocation with the given sender and event data. - /// - /// The sender object that raised the event. - /// The event data that was generated by the event. - public EventPattern(TSender sender, TEventArgs e) - { - Sender = sender; - EventArgs = e; - } - - /// - /// Gets the sender object that raised the event. - /// - public TSender Sender { get; } - - /// - /// Gets the event data that was generated by the event. - /// - public TEventArgs EventArgs { get; } - - /// - /// Determines whether the current EventPattern<TSender, TEventArgs> object represents the same event as a specified EventPattern<TSender, TEventArgs> object. - /// - /// An object to compare to the current EventPattern<TSender, TEventArgs> object. - /// true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. - public bool Equals(EventPattern other) - { - if (object.ReferenceEquals(null, other)) - return false; - if (object.ReferenceEquals(this, other)) - return true; - - return EqualityComparer.Default.Equals(Sender, other.Sender) && EqualityComparer.Default.Equals(EventArgs, other.EventArgs); - } - - /// - /// Determines whether the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>. - /// - /// The System.Object to compare with the current EventPattern<TSender, TEventArgs>. - /// true if the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>; otherwise, false. - public override bool Equals(object obj) - { - return Equals(obj as EventPattern); - } - - /// - /// Returns the hash code for the current EventPattern<TSender, TEventArgs> instance. - /// - /// A hash code for the current EventPattern<TSender, TEventArgs> instance. - public override int GetHashCode() - { - var x = EqualityComparer.Default.GetHashCode(Sender); - var y = EqualityComparer.Default.GetHashCode(EventArgs); - return (x << 5) + (x ^ y); - } - - /// - /// Determines whether two specified EventPattern<TSender, TEventArgs> objects represent the same event. - /// - /// The first EventPattern<TSender, TEventArgs> to compare, or null. - /// The second EventPattern<TSender, TEventArgs> to compare, or null. - /// true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. - public static bool operator ==(EventPattern first, EventPattern second) - { - return object.Equals(first, second); - } - - /// - /// Determines whether two specified EventPattern<TSender, TEventArgs> objects represent a different event. - /// - /// The first EventPattern<TSender, TEventArgs> to compare, or null. - /// The second EventPattern<TSender, TEventArgs> to compare, or null. - /// true if both EventPattern<TSender, TEventArgs> objects don't represent the same event; otherwise, false. - public static bool operator !=(EventPattern first, EventPattern second) - { - return !object.Equals(first, second); - } - } -} diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPattern.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPattern.cs deleted file mode 100644 index 8e6535a750..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPattern.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -namespace System.Reactive -{ - /// - /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event. - /// - /// - /// The type of the sender that raised the event. - /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - /// - /// The type of the event data generated by the event. - /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - public interface IEventPattern - { - /// - /// Gets the sender object that raised the event. - /// - TSender Sender { get; } - - /// - /// Gets the event data that was generated by the event. - /// - TEventArgs EventArgs { get; } - } -} diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPatternSource.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPatternSource.cs deleted file mode 100644 index eae6d6be25..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventPatternSource.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -namespace System.Reactive -{ - /// - /// Represents a data stream signaling its elements by means of an event. - /// - /// The type of the event data generated by the event. - public interface IEventPatternSource - { - /// - /// Event signaling the next element in the data stream. - /// - event EventHandler OnNext; - } -} diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventSource.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventSource.cs deleted file mode 100644 index 11d5d3d021..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/IEventSource.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -namespace System.Reactive -{ - /// - /// Represents a data stream signaling its elements by means of an event. - /// - /// - /// The type of the event data generated by the event. - /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics. - /// - public interface IEventSource - { - /// - /// Event signaling the next element in the data stream. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "By design.")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly", Justification = "Can't do this for Action.")] - event Action OnNext; - } -} diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Notification.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Notification.cs deleted file mode 100644 index d0983fb1f0..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Notification.cs +++ /dev/null @@ -1,807 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.ExceptionServices; -using System.Threading.Tasks; - -#pragma warning disable 0659 -#pragma warning disable 0661 - -namespace System.Reactive -{ - /// - /// Indicates the type of a notification. - /// - public enum NotificationKind - { - /// - /// Represents an OnNext notification. - /// - OnNext, - - /// - /// Represents an OnError notification. - /// - OnError, - - /// - /// Represents an OnCompleted notification. - /// - OnCompleted, - } - - /// - /// Represents a notification to an observer. - /// - /// The type of the elements received by the observer. -#if !NO_SERIALIZABLE - [Serializable] -#endif - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2218:OverrideGetHashCodeOnOverridingEquals", Justification = "Resembles a discriminated union with finite number of subclasses (external users shouldn't create their own subtypes), each of which does override GetHashCode itself.")] - public abstract class Notification : IEquatable> - { - /// - /// Default constructor used by derived types. - /// - protected internal Notification() - { - } - - /// - /// Returns the value of an OnNext notification or throws an exception. - /// - public abstract T Value { get; } - - /// - /// Returns a value that indicates whether the notification has a value. - /// - public abstract bool HasValue { get; } - - /// - /// Returns the exception of an OnError notification or returns null. - /// - public abstract Exception Exception { get; } - - /// - /// Gets the kind of notification that is represented. - /// - public abstract NotificationKind Kind { get; } - - /// - /// Represents an OnNext notification to an observer. - /// -#if !NO_DEBUGGER_ATTRIBUTES - [DebuggerDisplay("OnNext({Value})")] -#endif -#if !NO_SERIALIZABLE - [Serializable] -#endif - internal sealed class OnNextNotification : Notification - { - /// - /// Constructs a notification of a new value. - /// - public OnNextNotification(T value) - { - Value = value; - } - - /// - /// Returns the value of an OnNext notification. - /// - public override T Value { get; } - - /// - /// Returns null. - /// - public override Exception Exception => null; - - /// - /// Returns true. - /// - public override bool HasValue => true; - - /// - /// Returns . - /// - public override NotificationKind Kind => NotificationKind.OnNext; - - /// - /// Returns the hash code for this instance. - /// - public override int GetHashCode() => EqualityComparer.Default.GetHashCode(Value); - - /// - /// Indicates whether this instance and a specified object are equal. - /// - public override bool Equals(Notification other) - { - if (ReferenceEquals(this, other)) - return true; - if (ReferenceEquals(other, null)) - return false; - if (other.Kind != NotificationKind.OnNext) - return false; - - return EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Returns a string representation of this instance. - /// - public override string ToString() => String.Format(CultureInfo.CurrentCulture, "OnNext({0})", Value); - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public override void Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - observer.OnNext(Value); - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - /// Task indicating the completion of invoking the observer method. - public override ValueTask AcceptAsync(IAsyncObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - return observer.OnNextAsync(Value); - } - -#if NOTYET - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// Observer to invoke the notification on. - /// Result produced by the observation. - public override TResult Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - return observer.OnNext(Value); - } -#endif - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public override void Accept(Action onNext, Action onError, Action onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - onNext(Value); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public override TResult Accept(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onNext(Value); - } - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task indicating the completion of invoking the delegate. - public override ValueTask AcceptAsync(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onNext(Value); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the notification handler delegates. - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task containing the result produced by the observation. - public override ValueTask AcceptAsync(Func> onNext, Func> onError, Func> onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onNext(Value); - } - } - - /// - /// Represents an OnError notification to an observer. - /// -#if !NO_DEBUGGER_ATTRIBUTES - [DebuggerDisplay("OnError({Exception})")] -#endif -#if !NO_SERIALIZABLE - [Serializable] -#endif - internal sealed class OnErrorNotification : Notification - { - /// - /// Constructs a notification of an exception. - /// - public OnErrorNotification(Exception exception) - { - Exception = exception; - } - - /// - /// Throws the exception. - /// - public override T Value { get { ExceptionDispatchInfo.Capture(Exception).Throw(); return default(T); } } - - /// - /// Returns the exception. - /// - public override Exception Exception { get; } - - /// - /// Returns false. - /// - public override bool HasValue => false; - - /// - /// Returns . - /// - public override NotificationKind Kind => NotificationKind.OnError; - - /// - /// Returns the hash code for this instance. - /// - public override int GetHashCode() => Exception.GetHashCode(); - - /// - /// Indicates whether this instance and other are equal. - /// - public override bool Equals(Notification other) - { - if (ReferenceEquals(this, other)) - return true; - if (ReferenceEquals(other, null)) - return false; - if (other.Kind != NotificationKind.OnError) - return false; - - return Equals(Exception, other.Exception); - } - - /// - /// Returns a string representation of this instance. - /// - public override string ToString() => String.Format(CultureInfo.CurrentCulture, "OnError({0})", Exception.GetType().FullName); - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public override void Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - observer.OnError(Exception); - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - /// Task indicating the completion of invoking the observer method. - public override ValueTask AcceptAsync(IAsyncObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - return observer.OnErrorAsync(Exception); - } - -#if NOTYET - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// Observer to invoke the notification on. - /// Result produced by the observation. - public override TResult Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - return observer.OnError(Exception); - } -#endif - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public override void Accept(Action onNext, Action onError, Action onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - onError(Exception); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public override TResult Accept(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onError(Exception); - } - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task indicating the completion of invoking the delegate. - public override ValueTask AcceptAsync(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onError(Exception); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the notification handler delegates. - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task containing the result produced by the observation. - public override ValueTask AcceptAsync(Func> onNext, Func> onError, Func> onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onError(Exception); - } - } - - /// - /// Represents an OnCompleted notification to an observer. - /// -#if !NO_DEBUGGER_ATTRIBUTES - [DebuggerDisplay("OnCompleted()")] -#endif -#if !NO_SERIALIZABLE - [Serializable] -#endif - internal sealed class OnCompletedNotification : Notification - { - /// - /// Constructs a notification of the end of a sequence. - /// - public OnCompletedNotification() - { - } - - /// - /// Throws an . - /// - public override T Value { get { throw new InvalidOperationException("An OnCompleted notification does not have a value."); } } - - /// - /// Returns null. - /// - public override Exception Exception => null; - - /// - /// Returns false. - /// - public override bool HasValue => false; - - /// - /// Returns . - /// - public override NotificationKind Kind => NotificationKind.OnCompleted; - - /// - /// Returns the hash code for this instance. - /// - public override int GetHashCode() => typeof(T).GetHashCode() ^ 8510; - - /// - /// Indicates whether this instance and other are equal. - /// - public override bool Equals(Notification other) - { - if (ReferenceEquals(this, other)) - return true; - if (ReferenceEquals(other, null)) - return false; - - return other.Kind == NotificationKind.OnCompleted; - } - - /// - /// Returns a string representation of this instance. - /// - public override string ToString() => "OnCompleted()"; - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public override void Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - observer.OnCompleted(); - } - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - /// Task indicating the completion of invoking the observer method. - public override ValueTask AcceptAsync(IAsyncObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - return observer.OnCompletedAsync(); - } - -#if NOTYET - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// Observer to invoke the notification on. - /// Result produced by the observation. - public override TResult Accept(IObserver observer) - { - if (observer == null) - throw new ArgumentNullException(nameof(observer)); - - return observer.OnCompleted(); - } -#endif - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public override void Accept(Action onNext, Action onError, Action onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - onCompleted(); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public override TResult Accept(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onCompleted(); - } - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task indicating the completion of invoking the delegate. - public override ValueTask AcceptAsync(Func onNext, Func onError, Func onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onCompleted(); - } - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the notification handler delegates. - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task containing the result produced by the observation. - public override ValueTask AcceptAsync(Func> onNext, Func> onError, Func> onCompleted) - { - if (onNext == null) - throw new ArgumentNullException(nameof(onNext)); - if (onError == null) - throw new ArgumentNullException(nameof(onError)); - if (onCompleted == null) - throw new ArgumentNullException(nameof(onCompleted)); - - return onCompleted(); - } - } - - /// - /// Determines whether the current object has the same observer message payload as a specified value. - /// - /// An object to compare to the current object. - /// true if both objects have the same observer message payload; otherwise, false. - /// - /// Equality of objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. - /// - public abstract bool Equals(Notification other); - - /// - /// Determines whether the two specified objects have the same observer message payload. - /// - /// The first to compare, or null. - /// The second to compare, or null. - /// true if the first value has the same observer message payload as the second value; otherwise, false. - /// - /// Equality of objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. - /// - public static bool operator ==(Notification left, Notification right) - { - if (ReferenceEquals(left, right)) - return true; - - if ((object)left == null || (object)right == null) - return false; - - return left.Equals(right); - } - - /// - /// Determines whether the two specified objects have a different observer message payload. - /// - /// The first to compare, or null. - /// The second to compare, or null. - /// true if the first value has a different observer message payload as the second value; otherwise, false. - /// - /// Equality of objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two objects represent a different observer method call, use Object.ReferenceEquals identity equality instead. - /// - public static bool operator !=(Notification left, Notification right) => !(left == right); - - /// - /// Determines whether the specified System.Object is equal to the current . - /// - /// The System.Object to compare with the current . - /// true if the specified System.Object is equal to the current ; otherwise, false. - /// - /// Equality of objects is based on the equality of the observer message payload they represent, including the notification Kind and the Value or Exception (if any). - /// This means two objects can be equal even though they don't represent the same observer method call, but have the same Kind and have equal parameters passed to the observer method. - /// In case one wants to determine whether two objects represent the same observer method call, use Object.ReferenceEquals identity equality instead. - /// - public override bool Equals(object obj) => Equals(obj as Notification); - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - public abstract void Accept(IObserver observer); - - /// - /// Invokes the observer's method corresponding to the notification. - /// - /// Observer to invoke the notification on. - /// Task indicating the completion of invoking the observer method. - public abstract ValueTask AcceptAsync(IAsyncObserver observer); - -#if NOTYET - /// - /// Invokes the observer's method corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the observer's notification handlers. - /// Observer to invoke the notification on. - /// Result produced by the observation. - public abstract TResult Accept(IObserver observer); -#endif - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - public abstract void Accept(Action onNext, Action onError, Action onCompleted); - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the notification handler delegates. - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Result produced by the observation. - public abstract TResult Accept(Func onNext, Func onError, Func onCompleted); - - /// - /// Invokes the delegate corresponding to the notification. - /// - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task indicating the completion of invoking the delegate. - public abstract ValueTask AcceptAsync(Func onNext, Func onError, Func onCompleted); - - /// - /// Invokes the delegate corresponding to the notification and returns the produced result. - /// - /// The type of the result returned from the notification handler delegates. - /// Delegate to invoke for an OnNext notification. - /// Delegate to invoke for an OnError notification. - /// Delegate to invoke for an OnCompleted notification. - /// Task containing the result produced by the observation. - public abstract ValueTask AcceptAsync(Func> onNext, Func> onError, Func> onCompleted); - -#if NOTYET - /// - /// Returns an observable sequence with a single notification, using the immediate scheduler. - /// - /// The observable sequence that surfaces the behavior of the notification upon subscription. - public IObservable ToObservable() => ToObservable(ImmediateScheduler.Instance); - - /// - /// Returns an observable sequence with a single notification. - /// - /// Scheduler to send out the notification calls on. - /// The observable sequence that surfaces the behavior of the notification upon subscription. - public IObservable ToObservable(IScheduler scheduler) - { - if (scheduler == null) - throw new ArgumentNullException(nameof(scheduler)); - - return new AnonymousObservable(observer => scheduler.Schedule(() => - { - Accept(observer); - - if (Kind == NotificationKind.OnNext) - { - observer.OnCompleted(); - } - })); - } -#endif - } - - /// - /// Provides a set of static methods for constructing notifications. - /// - public static class Notification - { - /// - /// Creates an object that represents an OnNext notification to an observer. - /// - /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. - /// The value contained in the notification. - /// The OnNext notification containing the value. - public static Notification CreateOnNext(T value) - { - return new Notification.OnNextNotification(value); - } - - /// - /// Creates an object that represents an OnError notification to an observer. - /// - /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. - /// The exception contained in the notification. - /// The OnError notification containing the exception. - /// is null. - public static Notification CreateOnError(Exception error) - { - if (error == null) - throw new ArgumentNullException(nameof(error)); - - return new Notification.OnErrorNotification(error); - } - - /// - /// Creates an object that represents an OnCompleted notification to an observer. - /// - /// The type of the elements received by the observer. Upon dematerialization of the notifications into an observable sequence, this type is used as the element type for the sequence. - /// The OnCompleted notification. - public static Notification CreateOnCompleted() - { - return new Notification.OnCompletedNotification(); - } - } -} - -#pragma warning restore 0659 -#pragma warning restore 0661 diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/TimeInterval.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/TimeInterval.cs deleted file mode 100644 index b91b1fb34a..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/TimeInterval.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Globalization; - -namespace System.Reactive -{ - /// - /// Represents a value associated with time interval information. - /// The time interval can represent the time it took to produce the value, the interval relative to a previous value, the value's delivery time relative to a base, etc. - /// - /// The type of the value being annotated with time interval information. -#if !NO_SERIALIZABLE - [Serializable] -#endif - public struct TimeInterval : IEquatable> - { - /// - /// Constructs a time interval value. - /// - /// The value to be annotated with a time interval. - /// Time interval associated with the value. - public TimeInterval(T value, TimeSpan interval) - { - Interval = interval; - Value = value; - } - - /// - /// Gets the value. - /// - public T Value { get; } - - /// - /// Gets the interval. - /// - public TimeSpan Interval { get; } - - /// - /// Determines whether the current value has the same and as a specified value. - /// - /// An object to compare to the current value. - /// true if both values have the same and ; otherwise, false. - public bool Equals(TimeInterval other) - { - return other.Interval.Equals(Interval) && EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Determines whether the two specified values have the same and . - /// - /// The first value to compare. - /// The second value to compare. - /// true if the first value has the same and as the second value; otherwise, false. - public static bool operator ==(TimeInterval first, TimeInterval second) - { - return first.Equals(second); - } - - /// - /// Determines whether the two specified values don't have the same and . - /// - /// The first value to compare. - /// The second value to compare. - /// true if the first value has a different or as the second value; otherwise, false. - public static bool operator !=(TimeInterval first, TimeInterval second) - { - return !first.Equals(second); - } - - /// - /// Determines whether the specified System.Object is equal to the current . - /// - /// The System.Object to compare with the current . - /// true if the specified System.Object is equal to the current ; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is TimeInterval)) - return false; - - var other = (TimeInterval)obj; - return Equals(other); - } - - /// - /// Returns the hash code for the current value. - /// - /// A hash code for the current value. - public override int GetHashCode() - { - return Interval.GetHashCode() ^ (Value?.GetHashCode() ?? 1963); - } - - /// - /// Returns a string representation of the current value. - /// - /// String representation of the current value. - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Interval); - } - } -} diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Timestamped.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Timestamped.cs deleted file mode 100644 index 6be61c1a47..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Timestamped.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Globalization; - -namespace System.Reactive -{ - /// - /// Represents value with a timestamp on it. - /// The timestamp typically represents the time the value was received, using an IScheduler's clock to obtain the current time. - /// - /// The type of the value being timestamped. -#if !NO_SERIALIZABLE - [Serializable] -#endif - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Timestamped", Justification = "Reviewed and agreed upon.")] - public struct Timestamped : IEquatable> - { - /// - /// Constructs a timestamped value. - /// - /// The value to be annotated with a timestamp. - /// Timestamp associated with the value. - public Timestamped(T value, DateTimeOffset timestamp) - { - Timestamp = timestamp; - Value = value; - } - - /// - /// Gets the value. - /// - public T Value { get; } - - /// - /// Gets the timestamp. - /// - public DateTimeOffset Timestamp { get; } - - /// - /// Determines whether the current value has the same and as a specified value. - /// - /// An object to compare to the current value. - /// true if both values have the same and ; otherwise, false. - public bool Equals(Timestamped other) - { - return other.Timestamp.Equals(Timestamp) && EqualityComparer.Default.Equals(Value, other.Value); - } - - /// - /// Determines whether the two specified values have the same and . - /// - /// The first value to compare. - /// The second value to compare. - /// true if the first value has the same and as the second value; otherwise, false. - public static bool operator ==(Timestamped first, Timestamped second) - { - return first.Equals(second); - } - - /// - /// Determines whether the two specified values don't have the same and . - /// - /// The first value to compare. - /// The second value to compare. - /// true if the first value has a different or as the second value; otherwise, false. - public static bool operator !=(Timestamped first, Timestamped second) - { - return !first.Equals(second); - } - - /// - /// Determines whether the specified System.Object is equal to the current . - /// - /// The System.Object to compare with the current . - /// true if the specified System.Object is equal to the current ; otherwise, false. - public override bool Equals(object obj) - { - if (!(obj is Timestamped)) - return false; - - var other = (Timestamped)obj; - return Equals(other); - } - - /// - /// Returns the hash code for the current value. - /// - /// A hash code for the current value. - public override int GetHashCode() - { - return Timestamp.GetHashCode() ^ (Value?.GetHashCode() ?? 1979); - } - - /// - /// Returns a string representation of the current value. - /// - /// String representation of the current value. - public override string ToString() - { - return String.Format(CultureInfo.CurrentCulture, "{0}@{1}", Value, Timestamp); - } - } - - /// - /// A helper class with a factory method for creating instances. - /// - public static class Timestamped - { - /// - /// Creates an instance of a . This is syntactic sugar that uses type inference - /// to avoid specifying a type in a constructor call, which is very useful when using anonymous types. - /// - /// The value to be annotated with a timestamp. - /// Timestamp associated with the value. - /// Creates a new timestamped value. - public static Timestamped Create(T value, DateTimeOffset timestamp) - { - return new Timestamped(value, timestamp); - } - } -} diff --git a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Unit.cs b/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Unit.cs deleted file mode 100644 index 98a38e10d5..0000000000 --- a/AsyncRx.NET/System.Reactive.Shared/System/Reactive/Unit.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT License. -// See the LICENSE file in the project root for more information. - -namespace System.Reactive -{ - /// - /// Represents a type with a single value. This type is often used to denote the successful completion of a void-returning method (C#) or a Sub procedure (Visual Basic). - /// -#if !NO_SERIALIZABLE - [Serializable] -#endif - public struct Unit : IEquatable - { - /// - /// Determines whether the specified value is equal to the current . Because has a single value, this always returns true. - /// - /// An object to compare to the current value. - /// Because has a single value, this always returns true. - public bool Equals(Unit other) => true; - - /// - /// Determines whether the specified System.Object is equal to the current . - /// - /// The System.Object to compare with the current . - /// true if the specified System.Object is a value; otherwise, false. - public override bool Equals(object obj) => obj is Unit; - - /// - /// Returns the hash code for the current value. - /// - /// A hash code for the current value. - public override int GetHashCode() => 0; - - /// - /// Returns a string representation of the current value. - /// - /// String representation of the current value. - public override string ToString() => "()"; - - /// - /// Determines whether the two specified values are equal. Because has a single value, this always returns true. - /// - /// The first value to compare. - /// The second value to compare. - /// Because has a single value, this always returns true. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "first", Justification = "Parameter required for operator overloading."), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second", Justification = "Parameter required for operator overloading.")] - public static bool operator ==(Unit first, Unit second) => true; - - /// - /// Determines whether the two specified values are not equal. Because has a single value, this always returns false. - /// - /// The first value to compare. - /// The second value to compare. - /// Because has a single value, this always returns false. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "first", Justification = "Parameter required for operator overloading."), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "second", Justification = "Parameter required for operator overloading.")] - public static bool operator !=(Unit first, Unit second) => false; - - /// - /// Gets the single value. - /// - public static Unit Default => default(Unit); - } -}