rx.net Questions

4

Solved

In RxJS, there is a switchMap function. Is there an equivalent in ReactiveX/Rx.NET? I don't see one in the transforming documentation.
Cassy asked 31/3, 2017 at 11:22

1

How to plug a cancellation token into an existing IObservable pipeline before calling Publish on it (i.e., before it becomes an IConnectableObservable)? This must be a part of a cold observable pip...
Psychotherapy asked 2/6, 2022 at 5:37

2

Solved

I observed a strange phenomenon that occurs sometimes with an Rx query I wrote, that involves a CancellationToken. Two callbacks are registered to the same CancellationToken, one outside of the que...
Brookbrooke asked 14/3, 2021 at 23:29

1

Solved

In ReactiveX paradigm, Is it a responsibility of the consumer (IObserver) to deal with thread safety? E.g., if OnCompleted call comes along when OnNext is still executing on another thread? It look...

4

Solved

I would like to call back an async function within an Rx subscription. E.g. like that: public class Consumer { private readonly Service _service = new Service(); public ReplaySubject<string...

1

Solved

I am using the SelectMany operator in order to project the elements of an observable sequence to tasks, and propagate the results of those tasks. Everything is OK if all operations succeed, but I d...
Lodge asked 28/1, 2022 at 23:10

3

Solved

Recently I become aware that the Rx Finally operator behaves in a way which, at least for me, is unexpected. My expectation was that any error thrown by the finallyAction would be propagated to the...
Horologium asked 2/11, 2021 at 19:25

1

Solved

Is it possible to use the Using operator in Rx.Net with a resource that implements IAsyncDisposable rather than IDisposable? If not, is there some sort of workaround that I could use?
Vardon asked 1/11, 2021 at 15:43

0

The Rx library includes operators that accept lambda parameters, and some of these lambdas are provided with a CancellationToken that is controlled by the library itself. Some examples of these ope...

3

Solved

Given an IObservable<T> is there a way to use Throttle behaviour (reset a timer when an item is added, but have it return a collection of all the items added within that time? Buffer provide...
Morrie asked 13/1, 2012 at 11:24

3

Solved

I have an IObservable<Item> inside a class and I want to expose a read-only property that provides the last item pushed to the observable at a given time. So it will provide a single value of...
Suppressive asked 4/2, 2017 at 16:8

3

Solved

I have an observable sequence of elements that have a char Key property, that has values in the range from 'A' to 'E'. I want to group these elements based on this key. After grouping them I want t...
Anglocatholic asked 26/11, 2020 at 4:0

4

Solved

I have code which streams data down from SQL and writes it to a different store. The code is approximately this: using (var cmd = new SqlCommand("select * from MyTable", connection)) { using (var...
Contiguity asked 28/7, 2017 at 21:39

2

Solved

I have a nested observable IObservable<IObservable<T>>, and I want to flatten it to a IObservable<T>. I don't want to use the Concat operator because it delays the subscription to...
Nealson asked 15/11, 2020 at 4:52

4

I want to run periodic tasks in with a restriction that at most only one execution of a method is running at any given time. I was experimenting with Rx, but I am not sure how to impose at most on...
Congreve asked 14/7, 2015 at 6:18

1

Solved

I am probably searching for a custom Observable.Using method, that is not restricted to disposable resources. What I have is a cold IObservable that maintains some internal state, for example a Ran...
Dorty asked 15/11, 2020 at 10:28

1

Solved

Recently I encountered a situation where having an asynchronous operation represented both as a Task<T> and as an IObservable<T> would be advantageous. The task representation maintains...
Spoonbill asked 14/11, 2020 at 18:20

5

Solved

Is there a way to unwrap the IObservable<Task<T>> into IObservable<T> keeping the same order of events, like this? Tasks: ----a-------b--c----------d------e---f----> Values: -...
Chopping asked 10/4, 2017 at 2:51

3

Solved

I want a generic way to convert an asynchronous method to an observable. In my case, I'm dealing with methods that uses HttpClient to fetch data from an API. Let's say we have the method Task<st...
Bland asked 3/11, 2020 at 8:44

1

Solved

I am looking for something similar to the exhaustMap operator from rxjs, but RX.NET does not seem to have such an operator. What I need to achieve is that, upon every element of the source stream, ...
Duren asked 14/10, 2020 at 13:3

4

I have a chain of TPL Dataflow blocks and would like to observe progress somewhere inside the system. I am aware that I could just jam a TransformBlock into the mesh where I want to observe, get i...
Dynamiter asked 16/6, 2017 at 1:43

1

Solved

I noticed something strange with the behavior of the Repeat operator, when the source observable's notifications are synchronous. The resulting observable cannot be stopped with a subsequent ...
Scorch asked 3/4, 2020 at 12:55

2

Solved

I am trying to enumerate a large IEnumerable once, and observe the enumeration with various operators attached (Count, Sum, Average etc). The obvious way is to transform it to an IObservable with t...
Amok asked 2/4, 2020 at 8:42

4

Solved

I created a SlidingWindow operator for reactive extensions because I want to easily monitor things like rolling averages, etc. As a simple example, I want to subscribe to hear mouse events, but eac...
Lethbridge asked 6/3, 2013 at 19:43

3

Solved

How can I clear the buffer on a ReplaySubject? Periodically I need to clear the buffer (as an end of day event in my case) to prevent the ReplaySubject continually growing and eventually eating all...
Speedy asked 9/3, 2015 at 14:56

© 2022 - 2024 — McMap. All rights reserved.