Questions tagged [rx.net]

The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators.

The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Using Rx, developers represent asynchronous data streams with Observables, query asynchronous data streams using LINQ operators, and parameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, Rx = Observables + LINQ + Schedulers.

Resources:

264 questions
0
votes
2 answers

Rx.Net : Calling multiple IObservable in SelectMany

Please Note: This is continuation of the question posted earlier but the solution of interest is of a different situation. I am trying to make multiple calls to the methods that each return IObservable but the values being returned back in the…
Gautam T Goudar
  • 271
  • 3
  • 12
0
votes
1 answer

Rx.Net: Chaining subscribers - alternative approach?

How can I re-write this code so that I don't have to chain Subscribers like below? Reason for asking is, this style will limit in an observable depending on another observable due to the style of the code, it can get confusing. var results =…
Gautam T Goudar
  • 271
  • 3
  • 12
0
votes
1 answer

How to combine GroupedObservables in rx.net?

I have one observable that I use GroupBy on to get a number of streams. I actually want a Scan result over each sub-stream. Let's say the observable is over product prices and the scan result is average price per product type. I have another stream…
Sentinel
  • 3,582
  • 1
  • 30
  • 44
0
votes
1 answer

Run a Task N Time with different parameter value - RX.net

What I want to achieve is create a global task which can be executive n times at one run but it can take an object as parameter and with different values, as it is shown next I have a list with all objects that my global task is going to…
0
votes
1 answer

RX terminolgy: Async processing in RX operator when there are frequent observable notifications

The purpose is to do some async work on a scarce resource in a RX operator, Select for example. Issues arise when observable notifications came at a rate that is faster than the time it takes for the async operation to complete. Now I actually…
chrisc
  • 105
  • 6
0
votes
2 answers

ReactiveUI and WithLatestFrom

I've just started looking into ReactiveUI and I guess I'm missing something. Say I have a 'Connect' button and want to create a new network connection based on the server address in a TextBox. I thought, I'd create a ReactiveCommand and bind it to…
Daniel
  • 597
  • 11
  • 19
0
votes
1 answer

How to publish an event to an IObservable

So say I have the following class: public class User { public IObservable Events { get; } public User(Guid id, string username, string password) => Events = Observable.Return(new UserCreated(id, username, password)); public…
ad0ran
  • 326
  • 4
  • 15
0
votes
1 answer

Reactive extensions - how to do variable rate polling?

I am wondering how can I poll/invoke a method at a set interval. I would like to be able to vary this regular interval also. So something like this. [Reactive] public TimeSpan Rate { get; set; } IObservable rate = this.WhenAnyValue(vm =>…
resp78
  • 1,414
  • 16
  • 37
0
votes
1 answer

ReactiveX video game render loop timing

I'm currently investigating reactivex in .net for use in a simulation heavy video game. My first goal is to create the basic event / rendering loop. I have the following code that does nearly exactly what I want. var frames = Observable …
Walt Byers
  • 13
  • 1
  • 5
0
votes
0 answers

What is the correct way to use RefCount

var x = Observable.Return(1) .Do(_ => Console.WriteLine("creating")) .Replay() .RefCount(); x.Subscribe(); //first subscription x.Subscribe(); //second subscription Result: creating creating The "creating" is supported to be print only…
Junru Zhu
  • 76
  • 6
0
votes
0 answers

Rx Java vs Rx C#

I am starting to learn Rx for C# with this ebook, but since I also work a lot with Java I am wondering about how Rx for C# and Rx for Java may differ. This way I can learn one and then just focus on the differences between them to finally learn…
Michel Feinstein
  • 13,416
  • 16
  • 91
  • 173
0
votes
2 answers

Zipping a repeated stream with RX

I have two hot observables which I do not want to miss any notification 1st observable produces numbers 1-2-3-4 and 2nd strings a-b I am looking for a way to zip them to produce the next output a-1 b-2 a-3 b-4 a-5 So what I want is to…
Apostolis Bekiaris
  • 2,145
  • 2
  • 18
  • 21
0
votes
1 answer

How can I change an iteration to be Reactive (Rx)

I would like to change the following code to be Observable-based: // 'assets' is a IReadOnly list of StorageFile (approx. 10-20 files) foreach (var file in assets) { img.Source = new BitmapImage(new Uri(file.Path)); img.ImageOpened += async…
Maximus
  • 1,441
  • 14
  • 38
0
votes
1 answer

Reactive Programming in synchronous environment: performance vs dependency management

I understand that Reactive Programming shine in asynchronous environment (web request, or heavy IO/multi-threading/background task. However, in synchronous world, I found that Reactive Programming still give a great benefit of freeing dependency…
0
votes
1 answer

How to unit test Rx.Net foreach subscription

All messages should be published to the message bus: upstream.Get().ForEachAsync(async e => await _bus.Publish(e, cancellationToken)); I want to unit test to verify that the publish method is being called correctly: [Theory, AutoMoqData] …
Mohsen
  • 4,000
  • 8
  • 42
  • 73