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
1 answer

Like `Switch()`, but switches to the next observable only when it gets its first element

I'm trying to implement an operator, that I would call Relay(...) that will behave mostly like Switch(IObservable>), with the exception that, instead of switching to the next observable as soon as the source emits it, it will…
lhenrygr
  • 51
  • 3
0
votes
0 answers

Merge SourceList and SourceCache

How can I merge SourceList and SourceCache? Demo Model internal interface IModel { } internal class ModelA : IModel { } internal class ModelB : IModel { } Demo instances var sourceList = new SourceList(); var sourceCache = new…
sa.he
  • 1,391
  • 12
  • 25
0
votes
2 answers

Find messages in certain order

I have started to look at ReactiveX and can't figure out if it would be a good fit for a problem I'm trying to solve because either I don't now enough about ReactiveX or it doesn't have what I need. Let's say that I'm constantly receiving messages…
0
votes
1 answer

convert join table using rx.net

In my database I have a join table to store many to many relationships between a JobType and DocumentType (simplified description) JobType Table Column Type Id int Description varchar(100) DocumentType…
user1221237
  • 138
  • 8
0
votes
2 answers

Ways to replace Rx.NET Subject which representing state

I currently working on fixing bug in the following method which polls stateChecker condition while it null until it becomes true (or false due to timeout): private static void WaitWithSubject( Func stateChecker, TimeSpan timeout, …
LukeS5310
  • 3
  • 1
  • 4
0
votes
1 answer

Terminate loop on first value produced by stream (Rx)

I have the following Rx method chain and I am looking to clean/improve the Select method shown below, can this be done with an existing Rx operator, tried using Amb but queried all ISINs and return the first Price produced. I want the first Price…
AwkwardCoder
  • 24,893
  • 27
  • 82
  • 152
0
votes
1 answer

How to perform Tying the Knot/define observable recursively using iteself in Rx.Net?

Sometimes the business logic seems to be able to naturally modeled by some recursive defined observables. Here is one example: interface Demo { IObservable userCommands; IObservable> processes; …
xiang0x48
  • 621
  • 6
  • 20
0
votes
1 answer

How to create an Observable that caches each of the calculated items? (equivalence of Lazy)

I would like to create a sequence (Observable) that is able to cache the items, so the calculations inside the pipeline are processed only once. For instance: var obs = Observable .Range(1, 100) .SelectMany(x => GetItemAsync(x)); I would like…
SuperJMN
  • 13,110
  • 16
  • 86
  • 185
0
votes
3 answers

How to convert an IGroupedObservable to IGrouping?

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 the result to by an observable of groups, so that I…
Theodor Zoulias
  • 34,835
  • 7
  • 69
  • 104
0
votes
1 answer

How to compose RX.Net Observables for mouse dragging interaction?

I want to use RX to enable mouse dragging behaviour to select areas in a plot. (Oxyplot) It should be possible to select multiple areas in a plot and their should be a live update of the select area. So far i have set up three observables from…
0
votes
0 answers

Observable mediator with Rx.NET

class SomeMediator { public string[] Inputs { get; private set; } public ISubject Response { get; private set; } public SomeMediator(string[] inputs) { Inputs = inputs; Response = new Subject(); } } class…
Anonymous
  • 1,823
  • 2
  • 35
  • 74
0
votes
1 answer

How to change observables at runtime in C#?

Consider having two SourceCaches with a different key: var sourceCacheA = new SourceCache(x => x.Prop1); var sourceCacheB = new SourceCache(x => x.Prop2); where are both connected: var observableA =…
Pythoneer
  • 87
  • 6
0
votes
1 answer

Rx.Net How can I emit an element when a source sequence has been idle for a time?

I want to create a sequence that emits a value (let's say 'true') whenever a source sequence emits a value. Then, when the source sequence is idle for a period of time, emits 'false'. Essentially, I need to know when the source sequence is 'idle'…
Tim Long
  • 13,508
  • 19
  • 79
  • 147
0
votes
1 answer

Observable from callback method

Let say I have a class which iherits legacy API and overrides a virtual method which is called when something happens type MyClass() as this = let somethingObservable: IObservable = ... override _.OnSomething(s: Something) =…
irriss
  • 742
  • 2
  • 11
  • 22
0
votes
1 answer

Observable class property doesn't trigger subscription

Simple observable variable works as expected an triggers callback immediately on the same thread. Why a class variable of any observable type (Subject, ISubject, Observable, IObservable) doesn't trigger callback? Example with simple variable -…
Anonymous
  • 1,823
  • 2
  • 35
  • 74