From 9bed913a6e42a248c8dc12de82f3898be412f5bc Mon Sep 17 00:00:00 2001 From: neuecc Date: Wed, 28 Feb 2024 15:22:00 +0900 Subject: [PATCH] awaitOperations -> awaitOperation --- README.md | 10 +++++----- src/R3/Operators/SelectAwait.cs | 8 ++++---- src/R3/Operators/SubscribeAwait.cs | 12 ++++++------ src/R3/Operators/WhereAwait.cs | 8 ++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d5f56bce..48f7b246 100644 --- a/README.md +++ b/README.md @@ -1735,7 +1735,7 @@ Operator methods are defined as extension methods to `Observable` in the stat | **Select**(this `Observable` source, `Func` selector) | `Observable` | | **Select**(this `Observable` source, `TState` state, `Func` selector) | `Observable` | | **Select**(this `Observable` source, `TState` state, `Func` selector) | `Observable` | -| **SelectAwait**(this `Observable` source, `Func>` selector, `AwaitOperation` awaitOperations = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `Observable` | +| **SelectAwait**(this `Observable` source, `Func>` selector, `AwaitOperation` awaitOperation = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `Observable` | | **SelectMany**(this `Observable` source, `Func>` selector) | `Observable` | | **SelectMany**(this `Observable` source, `Func>` collectionSelector, `Func` resultSelector) | `Observable` | | **SelectMany**(this `Observable` source, `Func>` selector) | `Observable` | @@ -1762,9 +1762,9 @@ Operator methods are defined as extension methods to `Observable` in the stat | **SkipUntil**(this `Observable` source, `Task` task) | `Observable` | | **SkipWhile**(this `Observable` source, `Func` predicate) | `Observable` | | **SkipWhile**(this `Observable` source, `Func` predicate) | `Observable` | -| **SubscribeAwait**(this `Observable` source, `Func` onNextAsync, `AwaitOperation` awaitOperations = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `IDisposable` | -| **SubscribeAwait**(this `Observable` source, `Func` onNextAsync, `Action` onCompleted, `AwaitOperation` awaitOperations = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `IDisposable` | -| **SubscribeAwait**(this `Observable` source, `Func` onNextAsync, `Action` onErrorResume, `Action` onCompleted, `AwaitOperation` awaitOperations = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `IDisposable` | +| **SubscribeAwait**(this `Observable` source, `Func` onNextAsync, `AwaitOperation` awaitOperation = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `IDisposable` | +| **SubscribeAwait**(this `Observable` source, `Func` onNextAsync, `Action` onCompleted, `AwaitOperation` awaitOperation = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `IDisposable` | +| **SubscribeAwait**(this `Observable` source, `Func` onNextAsync, `Action` onErrorResume, `Action` onCompleted, `AwaitOperation` awaitOperation = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `IDisposable` | | **SubscribeOn**(this `Observable` source, `SynchronizationContext` synchronizationContext) | `Observable` | | **SubscribeOn**(this `Observable` source, `TimeProvider` timeProvider) | `Observable` | | **SubscribeOn**(this `Observable` source, `FrameProvider` frameProvider) | `Observable` | @@ -1847,7 +1847,7 @@ Operator methods are defined as extension methods to `Observable` in the stat | **Where**(this `Observable` source, `Func` predicate) | `Observable` | | **Where**(this `Observable` source, `TState` state, `Func` predicate) | `Observable` | | **Where**(this `Observable` source, `TState` state, `Func` predicate) | `Observable` | -| **WhereAwait**(this `Observable` source, `Func>` predicate, `AwaitOperation` awaitOperations = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `Observable` | +| **WhereAwait**(this `Observable` source, `Func>` predicate, `AwaitOperation` awaitOperation = AwaitOperation.Sequential, `Boolean` configureAwait = true, `Boolean` cancelOnCompleted = true, `Int32` maxConcurrent = -1) | `Observable` | | **WithLatestFrom**(this `Observable` first, `Observable` second, `Func` resultSelector) | `Observable` | | **Zip**(this `Observable` source1, `Observable` source2, `Func` resultSelector) | `Observable` | | **Zip**(this `Observable` source1, `Observable` source2, `Observable` source3, `Func` resultSelector) | `Observable` | diff --git a/src/R3/Operators/SelectAwait.cs b/src/R3/Operators/SelectAwait.cs index 39a56126..122e3b8d 100644 --- a/src/R3/Operators/SelectAwait.cs +++ b/src/R3/Operators/SelectAwait.cs @@ -5,17 +5,17 @@ namespace R3; public static partial class ObservableExtensions { /// This option is only valid for AwaitOperation.Parallel and AwaitOperation.SequentialParallel. It sets the number of concurrent executions. If set to -1, there is no limit. - public static Observable SelectAwait(this Observable source, Func> selector, AwaitOperation awaitOperations = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) + public static Observable SelectAwait(this Observable source, Func> selector, AwaitOperation awaitOperation = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) { - return new SelectAwait(source, selector, awaitOperations, configureAwait, cancelOnCompleted, maxConcurrent); + return new SelectAwait(source, selector, awaitOperation, configureAwait, cancelOnCompleted, maxConcurrent); } } -internal sealed class SelectAwait(Observable source, Func> selector, AwaitOperation awaitOperations, bool configureAwait, bool cancelOnCompleted, int maxConcurrent) : Observable +internal sealed class SelectAwait(Observable source, Func> selector, AwaitOperation awaitOperation, bool configureAwait, bool cancelOnCompleted, int maxConcurrent) : Observable { protected override IDisposable SubscribeCore(Observer observer) { - switch (awaitOperations) + switch (awaitOperation) { case AwaitOperation.Sequential: return source.Subscribe(new SelectAwaitSequential(observer, selector, configureAwait, cancelOnCompleted)); diff --git a/src/R3/Operators/SubscribeAwait.cs b/src/R3/Operators/SubscribeAwait.cs index 06d003ee..71439ccc 100644 --- a/src/R3/Operators/SubscribeAwait.cs +++ b/src/R3/Operators/SubscribeAwait.cs @@ -6,21 +6,21 @@ namespace R3; public static partial class ObservableExtensions { /// This option is only valid for AwaitOperation.Parallel and AwaitOperation.SequentialParallel. It sets the number of concurrent executions. If set to -1, there is no limit. - public static IDisposable SubscribeAwait(this Observable source, Func onNextAsync, AwaitOperation awaitOperations = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) + public static IDisposable SubscribeAwait(this Observable source, Func onNextAsync, AwaitOperation awaitOperation = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) { - return SubscribeAwait(source, onNextAsync, ObservableSystem.GetUnhandledExceptionHandler(), Stubs.HandleResult, awaitOperations, configureAwait, cancelOnCompleted, maxConcurrent); + return SubscribeAwait(source, onNextAsync, ObservableSystem.GetUnhandledExceptionHandler(), Stubs.HandleResult, awaitOperation, configureAwait, cancelOnCompleted, maxConcurrent); } /// This option is only valid for AwaitOperation.Parallel and AwaitOperation.SequentialParallel. It sets the number of concurrent executions. If set to -1, there is no limit. - public static IDisposable SubscribeAwait(this Observable source, Func onNextAsync, Action onCompleted, AwaitOperation awaitOperations = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) + public static IDisposable SubscribeAwait(this Observable source, Func onNextAsync, Action onCompleted, AwaitOperation awaitOperation = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) { - return SubscribeAwait(source, onNextAsync, ObservableSystem.GetUnhandledExceptionHandler(), onCompleted, awaitOperations, configureAwait, cancelOnCompleted, maxConcurrent); + return SubscribeAwait(source, onNextAsync, ObservableSystem.GetUnhandledExceptionHandler(), onCompleted, awaitOperation, configureAwait, cancelOnCompleted, maxConcurrent); } /// This option is only valid for AwaitOperation.Parallel and AwaitOperation.SequentialParallel. It sets the number of concurrent executions. If set to -1, there is no limit. - public static IDisposable SubscribeAwait(this Observable source, Func onNextAsync, Action onErrorResume, Action onCompleted, AwaitOperation awaitOperations = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) + public static IDisposable SubscribeAwait(this Observable source, Func onNextAsync, Action onErrorResume, Action onCompleted, AwaitOperation awaitOperation = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) { - switch (awaitOperations) + switch (awaitOperation) { case AwaitOperation.Sequential: return source.Subscribe(new SubscribeAwaitSequential(onNextAsync, onErrorResume, onCompleted, configureAwait, cancelOnCompleted)); diff --git a/src/R3/Operators/WhereAwait.cs b/src/R3/Operators/WhereAwait.cs index 2d26b76b..7eb883a5 100644 --- a/src/R3/Operators/WhereAwait.cs +++ b/src/R3/Operators/WhereAwait.cs @@ -5,18 +5,18 @@ namespace R3; public static partial class ObservableExtensions { /// This option is only valid for AwaitOperation.Parallel and AwaitOperation.SequentialParallel. It sets the number of concurrent executions. If set to -1, there is no limit. - public static Observable WhereAwait(this Observable source, Func> predicate, AwaitOperation awaitOperations = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) + public static Observable WhereAwait(this Observable source, Func> predicate, AwaitOperation awaitOperation = AwaitOperation.Sequential, bool configureAwait = true, bool cancelOnCompleted = true, int maxConcurrent = -1) { - return new WhereAwait(source, predicate, awaitOperations, configureAwait, cancelOnCompleted, maxConcurrent); + return new WhereAwait(source, predicate, awaitOperation, configureAwait, cancelOnCompleted, maxConcurrent); } } -internal sealed class WhereAwait(Observable source, Func> predicate, AwaitOperation awaitOperations, bool configureAwait, bool cancelOnCompleted, int maxConcurrent) +internal sealed class WhereAwait(Observable source, Func> predicate, AwaitOperation awaitOperation, bool configureAwait, bool cancelOnCompleted, int maxConcurrent) : Observable { protected override IDisposable SubscribeCore(Observer observer) { - switch (awaitOperations) + switch (awaitOperation) { case AwaitOperation.Sequential: return source.Subscribe(new WhereAwaitSequential(observer, predicate, configureAwait, cancelOnCompleted));