Skip to content

Commit

Permalink
Fix Synchronous name spelling (#28)
Browse files Browse the repository at this point in the history
* Fix Synchronous name spelling

* Update ReactiveExtensionsTests.cs
  • Loading branch information
ChrisPulman authored Jan 14, 2024
1 parent f7bed15 commit df99448
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ dotnet_diagnostic.CA2242.severity = error
dotnet_diagnostic.RCS1001.severity = error
dotnet_diagnostic.RCS1018.severity = error
dotnet_diagnostic.RCS1037.severity = error
dotnet_diagnostic.RCS1047.severity = none
dotnet_diagnostic.RCS1055.severity = error
dotnet_diagnostic.RCS1062.severity = error
dotnet_diagnostic.RCS1066.severity = error
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ Extensions for concerns found in System.Reactive that make consuming the library
- OnErrorRetry
- TakeUntil
- SyncronizeAsync
- SubscribeSynchronus
- SubscribeSynchronous
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void SubscribeSynchronus_RunsWithAsyncTasksInSubscriptions()
var itterations = 0;
var subject = new Subject<bool>();
using var disposable = subject
.SubscribeSynchronus(async x =>
.SubscribeSynchronous(async x =>
{
if (x)
{
Expand Down
9 changes: 4 additions & 5 deletions src/ReactiveMarbles.Extensions/ReactiveExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,6 @@ public static IObservable<TSource> TakeUntil<TSource>(this IObservable<TSource>
/// <typeparam name="T">The type of the elements in the source sequence.</typeparam>
/// <param name="source">The source.</param>
/// <returns>An Observable of T and a release mechanism.</returns>
[SuppressMessage("Roslynator", "RCS1047:Non-asynchronous method name should not end with 'Async'.", Justification = "To avoid naming conflicts.")]
public static IObservable<(T Value, IDisposable Sync)> SynchronizeAsync<T>(this IObservable<T> source) =>
Observable.Create<(T Value, IDisposable Sync)>(observer =>
{
Expand All @@ -930,7 +929,7 @@ public static IObservable<TSource> TakeUntil<TSource>(this IObservable<TSource>
/// <param name="onError">The on error.</param>
/// <param name="onCompleted">The on completed.</param>
/// <returns><see cref="IDisposable"/> object used to unsubscribe from the observable sequence.</returns>
public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Func<T, Task> onNext, Action<Exception> onError, Action onCompleted) =>
public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, Task> onNext, Action<Exception> onError, Action onCompleted) =>
source.SynchronizeAsync().Subscribe(
async observer =>
{
Expand All @@ -948,7 +947,7 @@ public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Fun
/// <param name="onNext">Action to invoke for each element in the observable sequence.</param>
/// <param name="onError">Action to invoke upon exceptional termination of the observable sequence.</param>
/// <returns><see cref="IDisposable"/> object used to unsubscribe from the observable sequence.</returns>
public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Func<T, Task> onNext, Action<Exception> onError) =>
public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, Task> onNext, Action<Exception> onError) =>
source.SynchronizeAsync().Subscribe(
async observer =>
{
Expand All @@ -966,7 +965,7 @@ public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Fun
/// <param name="onCompleted">Action to invoke upon graceful termination of the observable sequence.</param>
/// <returns><see cref="IDisposable"/> object used to unsubscribe from the observable sequence.</returns>
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="onNext"/> or <paramref name="onCompleted"/> is <c>null</c>.</exception>
public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Func<T, Task> onNext, Action onCompleted) =>
public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, Task> onNext, Action onCompleted) =>
source.SynchronizeAsync().Subscribe(
async observer =>
{
Expand All @@ -982,7 +981,7 @@ public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Fun
/// <param name="source">Observable sequence to subscribe to.</param>
/// <param name="onNext">Action to invoke for each element in the observable sequence.</param>
/// <returns><see cref="IDisposable"/> object used to unsubscribe from the observable sequence.</returns>
public static IDisposable SubscribeSynchronus<T>(this IObservable<T> source, Func<T, Task> onNext) =>
public static IDisposable SubscribeSynchronous<T>(this IObservable<T> source, Func<T, Task> onNext) =>
source.SynchronizeAsync().Subscribe(
async observer =>
{
Expand Down

0 comments on commit df99448

Please sign in to comment.