Questions tagged [system.reactive]

System.Reactive refers to the Reactive Extensions for .NET, also known as Rx, but it more specifically refers to the use of the System.Reactive.dll assembly, which is part of Rx. System.Reactive provides developers with a reactive programming model, as opposed to the traditional imperative programming model.

Filter by
Sorted by
Tagged with
2 votes
0 answers
329 views

High-performance ClientWebSocket wrapper

I'm working on a web socket client wrapper around ClientWebSocket and this is kinda my first public library project, which is why I'm asking this question here. I ...
user avatar
  • 401
3 votes
0 answers
90 views

Create IObservable<T> From Func<T>

These extensions create an IObservable<T> that creates a long running task that can be cancelled. It runs the Func<T>...
user avatar
2 votes
0 answers
46 views

Reactive .NET retry policy

I haven't found a good code example for a reactive retry operator with a retry strategy that was good enough for my needs. So I tried to make my own. It seems to work in my tests but I would really ...
user avatar
  • 21
8 votes
1 answer
6k views

Async selector in LINQ

LINQ Select usually works like this: IEnumerable<Task<int>> res = new[] {1,2,3}.Select(async i => i); I would ...
user avatar
  • 6,113
6 votes
0 answers
240 views

Display Child View and Subscribe to its event on ReactiveUI

I am very confuse what is better approach to display child view and subscribe to its event on ReactiveUI WPF, so far I have 2 implementation that somehow works for my case: Implementation 1: ...
user avatar
  • 116
2 votes
0 answers
872 views

Reactive Extensions wrapper around Confluent.Kafka for .NET

Just an Rx wrapper around Kafka to represent topic consumption as IObservable<T>: ...
user avatar
  • 163
1 vote
1 answer
88 views

Using Reactive Extensions in an Asynchronious Way

I am new to Reactive Extensions, I have the requirement to consume PairCollection<IPointCloud> which are fed into a service which performs a very expensive ...
user avatar
4 votes
2 answers
76 views

Reactive operator for distinct values that must change by amount

I would like feedback on this DistinctUntilChangedBy operator for System.Reactive that only emits when the current value is ...
user avatar
5 votes
1 answer
163 views

Rx.NET operator

I need an operator to allow a stream of booleans to act as a gate for another stream (let values pass when the gate stream is true, drop them when it's false). I would normally use Switch for this, ...
user avatar
1 vote
0 answers
248 views

A ViewModel build with ReactiveUI 8 to get web images

This is a practice application that I built to learn Rx.Net & RxUI. It follows the MVVM pattern and is written in C# with WPF. Here is a link to a question I asked during the development, which ...
user avatar
  • 11
4 votes
0 answers
69 views

Mechanism for providing timeout notifications when traffic ceases

I'm trying to build a nicely encapsulated mechanism for providing timeouts that wait for a signalling channel to go quiet for a duration. As a fun study of ...
user avatar
  • 161
4 votes
1 answer
994 views

Observable Logger

I'm experimenting with an alternative abstraction layer for logging that is build on top of the Reactive Extensions. This allows me to easily add features I need to my layer and map logs to any other ...
user avatar
  • 43.8k
9 votes
2 answers
2k views

Retry and CircutBreaker the reactive way

I wrote a simple utility for Retry and CircuitBreaker patterns. I implemented it by using ReactiveX because I thought it might actually be the perfect framework for it. I know that there is a project ...
user avatar
  • 43.8k
4 votes
2 answers
2k views

Generic parallel task queue returning an observable sequence of return value

This is a continuation of Parallel Task Queue that runs in sequence. Using Reactive Extensions I want to create a generic class a that process a task and executes it on a specific queue returning a <...
user avatar
  • 151
0 votes
1 answer
395 views

Merging union Observables

I am having a scenario where I need to execute observables that depends on the result of the first one. However I need to keep the result of the first observable. I couldn't find any extension that ...
user avatar
  • 5,561
2 votes
2 answers
2k views

Change object property in nested list based on a keyword

I have these classes: ...
user avatar
2 votes
0 answers
575 views

Converting MongoDB's IAsyncCursor(Source) into an Rx Observable Sequence

I've been toying with this idea for quite a while. Needless to say that this really enables a lot of possibilities, Especially when combined with a SignalR Backend. Added below is what I came up with....
user avatar
2 votes
1 answer
5k views

ReactiveUI And WPF - Reusing a value to update multiple properties

I've created my first ReactiveUI app in WPF. Simply, the user enters their full name in one textbox, and then the name gets split into its parts and displayed in the other textboxes. This is just an ...
user avatar
5 votes
1 answer
681 views

Finding local C# servers on a Java client using UDP and reactive extensions

This program uses UDP broadcast to find app servers on the local network. When a server receives a client broadcast, it sends a port (integer) to the client which will later be used to create a TCP ...
user avatar
  • 1,915
5 votes
2 answers
101 views

BufferAggregate

In the ongoing saga of me rewriting functions that can be easily composed from existing Rx functions, I present my latest progeny: a bastard combination of Scan and Aggregate. The aim is to aggregate ...
user avatar
  • 355
3 votes
2 answers
486 views

'Buffered' function for Rx

My application has a whole chain of Observables running through it, and recently I found that something was slowing down my (hot) source, but I couldn't work out where. Obviously, with everything ...
user avatar
  • 355
1 vote
0 answers
2k views

Rx.net File watcher

I am new with Rx.net and tried to do a folder watcher that could send a notification when a new file is done being uploaded. Each instance check one and only one folder. Here are the steps to achieve ...
user avatar
  • 19
14 votes
1 answer
12k views

A ViewModel using ReactiveUI 6 that loads and sends data

Most of the Rx Compelling Examples™ load and store data locally, which I don't find that Compelling. I spent some time coming up with how to best perform the following actions but want to make sure I ...
user avatar
12 votes
1 answer
2k views

Observable timer sequence

This question over on SO about how to call a function "later" using Rx led me to post the following ill-advised piece of code to solve the problem: ...
user avatar
8 votes
1 answer
5k views

CancellationToken and Reactive Extensions

I have a couple of calls that I need to cancel a subscription based on a CancellationToken. I saw How to cancel an observable sequence but I needed a more generic way. I created an extension method ...
user avatar
  • 4,064
4 votes
2 answers
935 views

RX fluent subscribing to observables

I have three observables: ...
user avatar
  • 141
4 votes
1 answer
153 views

Is this an ugly/incorrect usage of subscriptions?

Little backstory: I'm trying to write code that will read messages from INetworkConnection that the INetworkConnection publishes ...
user avatar
  • 3,753
2 votes
0 answers
339 views

Polling, parsing, validating and handling data cleanly and efficiently

<edit: There's a major problem in the code. It is basically the one in the comment regarding backpressure. I'll rework the code within a a few days... It's time for a quick code review, good ...
user avatar
  • 431
11 votes
2 answers
2k views

ReactiveUI and Rx background calculations with cancellation

I'm working on a WPF app which uses ReactiveUI and Rx, there's part of the workflow that watches two data sources (ReferenceData and ...
user avatar
  • 213
4 votes
0 answers
332 views

F# and Rx code that throttles; can it be done without ref cells (and possibly with active patterns)?

I'm basically redoing a piece of reactive C# code posted in SO code in F#, please, see below. The translation is fairly literal, I've just written the infinite loop as a recursive function and ...
user avatar
  • 431
5 votes
1 answer
3k views

Create an IObservable from a method

I have such a method that performs a long query search against some data. Task<List<SearchResult>> Search(string query){ ... } I have tried various ...
user avatar
  • 151
3 votes
1 answer
696 views

pull things from lazy source till timeout is reached

I need to pull things from lazy source till timeout is reached in this fashion: ...
user avatar
2 votes
1 answer
4k views

Hot Observable of Change Tracking Events from SQL Server 2008 R2

After I found the Change Tracking feature in SQL Server, I thought that I would love to have this information in a stream. That lead me to RX, and Hot Observables. I did some reading and came up with ...
user avatar
  • 121
6 votes
1 answer
2k views

Can this reactive code be improved?

I have a view model that I'm migrating to RxUI. It exposes a collection of brokers along with a bool indicating whether there is a market (ie. at least one broker). ...
user avatar
11 votes
1 answer
1k views

Improve Parallel Cache with Reactive Extensions & Unity Interception

The requirement is to be able to cache method invocations made on a boundary layer (Services layer). I'm using Unity to inject the concrete implementation of the Service layer classes. The ...
user avatar
5 votes
1 answer
6k views

Implementation of a throttled ConcurrentQueue Rx observer

I was looking for a solution to allow me to rate limit the number of outgoing REST calls but preserved the order of queued elements so I found a rate limiter implementation and combined it with ...
user avatar
  • 193
2 votes
1 answer
2k views

Is this a good example of Reactive Extensions? How can I make this better?

...
user avatar
6 votes
4 answers
3k views

Is there an easier way to use Rx's GroupBy operator?

I'm just playing with the concept of GroupBy inside Rx. So, I wondered how hard it would be to write a console application that continuously reads lines, groups ...
user avatar
  • 181