Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
47 views

What is the difference between and consequences of using: IObservable<Trade> bigTrades = ... bigTrades.Subsribe(async t => await bigTradeStore.LogTradeAsync(t)); //async void vs. ...
Liero's user avatar
  • 27.8k
0 votes
0 answers
42 views

I'm working on a Renesas RX project using the MinGW RX toolchain (GCC 8.3.0a) and running PC-lint for static analysis. During linting, I get the following error: #error "Unable to determine type ...
Rugwesh's user avatar
  • 11
1 vote
0 answers
51 views

When using IObservable and System.Reactive, I often come into the situation where I need to forward the elements of an observable through multiple layers of the software. For example: NetworkStream -&...
this.myself's user avatar
  • 2,220
0 votes
1 answer
59 views

I am writing a UI application using ReactiveUI for the view model logic. I am trying to respond to a change in state by sending the new state into an async method, and then storing the result in an ...
Arcanox's user avatar
  • 1,575
0 votes
5 answers
112 views

I have a process that needs to intermittently move some files from one directory to another. Before I move the files, I need to ensure that a user isn't currently adding files to the directory - if ...
Caleb Keller's user avatar
1 vote
1 answer
86 views

I made following observable, that filters only changes for given ResourceId: var valueChangesObs = events .GroupBy(e => e.ResourceId) .SelectMany(e => e.DistinctUntilChanged(e => e....
Liero's user avatar
  • 27.8k
0 votes
0 answers
84 views

Let's say I have a singleton dispatcher with a property OnSubmit that should be consumed by multiple components. The components provide async handlers for the OnSubmit event. The goal is to await the ...
Igor Skomorokh's user avatar
1 vote
1 answer
51 views

I'm struggling to write some operator/method generating an observable that would transform an initial observable into another one but with some kind of back pressure control (like Throttle operator) ...
Remiab's user avatar
  • 13
1 vote
1 answer
76 views

I have an async method that receives data from Rx Observable and writes it to a file. Give this method a cancellationToken and cancel it at some random time. This method is implemented with await ...
cbel's user avatar
  • 1,077
3 votes
0 answers
58 views

I am new to System.Reactive and trying to understand how to use this extension for some of the scenarios. I have basically three components, one is creating the message and the others are the receiver ...
riki's user avatar
  • 2,433
1 vote
0 answers
56 views

I was experimenting with having a BroadcastBlock also broadcast to observers. However I found that it doesn't quite work the way I'd expect. This is an example which demonstrates the difference ...
Ivan Petrov's user avatar
  • 7,389
0 votes
0 answers
58 views

I want to combine two observables, say SendMoves and Results to produce SendMovesAndGetResults. Subscription to SendMoves ultimately causes values to be pushed down Results. Therefore subscription to ...
Mark's user avatar
  • 33
0 votes
1 answer
97 views

I have a source of elements. It can be queried and it publishes events when elements are added. In other words, I can make a cold observable from the query results, and a hot observable from the event....
Nick Strupat's user avatar
  • 5,092
0 votes
1 answer
57 views

I want to managed case in rx.net where there is no data or no stream. I just what to simulate is there connection with udp service. I am trying to do that such like this: Observable .Defer( () =&...
infinitesimal's user avatar
3 votes
2 answers
131 views

I have a stream of click events and I want to determine from that stream whether a single click or a double clicked was performed by the user. Currently I'm attempting to do this by buffering the ...
James B's user avatar
  • 9,675
2 votes
0 answers
60 views

The "Creating Observable Sequences" section of the e-book INTRODUCTION TO RX.NET (by Ian Griffiths and Lee Campbell) describes how to transform file system events generated by ...
Максим Гришкин's user avatar
0 votes
3 answers
103 views

I have a play project to learn Rx as it is something I have always wanted to learn and could be useful. I just can't seem to grasp it like I did Linq. So I have a stream of data and would like to ...
Lews Therin's user avatar
1 vote
1 answer
67 views

I have a stream of mouse events that emit whilst the user drags the mouse cursor on the screen whilst the button is clicked. I want to perform a pairwise operation on these events and can do this ...
James B's user avatar
  • 9,675
0 votes
1 answer
54 views

I'd like to subscribe to a stream and get a notification if a certain sequence of events are observed. Something like - in very much pseudo code: .WhenType<MessageHandled>().ThenType<...
asgerhallas's user avatar
  • 17.8k
0 votes
1 answer
55 views

I have a scenario where I have an Observable sequence of measurements coming from an instrument, which only fires a measurement event when the value has changed by a certain amount. The underlying ...
Hydrargyrum's user avatar
  • 3,876
0 votes
1 answer
64 views

Having a little trouble with this one and hoping you guys can help... I am using C# System.Reactive. I have one observable that is simply an interval that gets azure queue messages from an azure ...
Brandon's user avatar
  • 908
0 votes
1 answer
41 views

I have rx pipeline that does the following - Runs every 10 second. Generate period using Scan (1 minute increments). Fetches data for current time period. Projects them as stream of objects of type ...
ironhide391's user avatar
1 vote
1 answer
77 views

Objective The problem I am trying to solve is aggregating the sequence (summing values) of messages of type (int Key, int Value) until a closing observable emits a "flush" marker item. For ...
Ivan Zaruba's user avatar
  • 4,544
1 vote
1 answer
45 views

I want to create an observable that emits when the right observable emits a value and takes the last left observable value with it, i.e., as described in the following marble diagram (taken from ...
James B's user avatar
  • 9,675
1 vote
1 answer
91 views

I could not figure it out why the following code could not run the OnCompleted, can anyone please help me thanks. Basically what I'm doing is everytime I press a key, I'll fire an event and convert ...
Thanh Pham's user avatar
2 votes
3 answers
108 views

I have an Observable that produces values at variable speed. In order to not get overwhelmed with values I added a Throttle of three seconds so I only get a value if no further values were published ...
Flack's user avatar
  • 5,939
0 votes
0 answers
44 views

I was looking to convert from IObservable<byte> to Stream and came up with this code that uses System.IO.Pipelines.Pipe. public static Stream ToStream(this IObservable<byte> observable, ...
SuperJMN's user avatar
  • 14.1k
1 vote
0 answers
149 views

I come from an Angular background switching over to Blazor. Since I like the redux pattern and have used NGRX with Angular, I'm using Blazor Fluxor for statement management, which works well. Now I ...
baouss's user avatar
  • 2,010
1 vote
1 answer
72 views

Why does Observable.Interval(TimeSpan.FromSeconds(1)).Window(2, 1).Concat() yield 0, 1, 2, ...? My expectation is that .Window(2, 1) would yield a series of pairs of numbers (0, 1, 1, 2, 2, 3, ...) ...
user19668814's user avatar
0 votes
1 answer
113 views

Is there a method or library function that would accept Func<T> and return IObservable<T> by invoking it? The functionality should be probably equal to public IObservable<T> Create&...
Luboš Hemala's user avatar
2 votes
2 answers
140 views

Suppose there is a Subject<T> at endpoint A and an IObservable<T> on endpoint B. Endpoint A sends exactly one object of T using OnNext() and never calls OnComplete(). I don't have a ...
Serge Misnik's user avatar
1 vote
2 answers
113 views

I am using reactive library for 1-second bar aggregation based on symbol quotes (foreign exchange and CFD) So far without success on IAsyncEnumerable extension, so I decided to replace pull with push ...
Strausa's user avatar
  • 63
0 votes
1 answer
927 views

Essentially what the subject says. I can't find any ready-made .Debounce() extension-method (similar to how Throttle() is available out-of-the-box). Following below is a rough and probably faulty idea ...
XDS's user avatar
  • 4,284
4 votes
1 answer
185 views

I am very new to reactive programming and I stuck at one point. I try to implement if my collection has reaches a certain number element or certain time has paseed i need to trigger some method. ...
Osman Aktemur's user avatar
1 vote
1 answer
64 views

Say you have a source observable of type IObservable<uint>. I'm looking for a transformation function IObservable<uint> Countdown(IObservable<uint> source) { // how? Something like ...
Bogey's user avatar
  • 5,916
-1 votes
1 answer
86 views

Context I am investigating a complex issue where for some reason a BehaviorSubject emits an error to observers. That happens even though nobody is actually interacting with that observable. The only ...
user272507's user avatar
0 votes
1 answer
55 views

I have the following scenario: public class MyHostedService : BackgroundService { private readonly IServiceProvider _serviceProvider; private readonly IEventSource _eventSource; private ...
mnj's user avatar
  • 3,661
1 vote
2 answers
96 views

I am trying to write a Scheduler that allows Limited Concurrency. Here is what I have written. public class ThreeAtATimeScheduler : IScheduler { private readonly SemaphoreSlim _semaphore = new ...
fahadash's user avatar
  • 3,313
0 votes
0 answers
73 views

I've been thinking how to create a bridge between IObservable<byte> and Stream, but I'm completely lost. The use case for this is when a function needs you to provide a Stream, but you have your ...
SuperJMN's user avatar
  • 14.1k
0 votes
2 answers
190 views

I've tried with this, but it seems to have concurrency issues. I don't fully understand what is wrong. public static IObservable<byte> ToObservable(this Stream stream, int bufferSize = 4096) { ...
SuperJMN's user avatar
  • 14.1k
1 vote
2 answers
514 views

I have created the below extension where I was able to make an IObservable.Subscribe awaitable, but wrapping the whole subscription. A big issue in current async programming in C# and the code below ...
xplat's user avatar
  • 8,666
1 vote
0 answers
358 views

I recently heard about reactive programming and started to explore Observer C# pattern and rx library. Despite some tutorials, articles and example use cases I still can't think if there are any ...
T4under4's user avatar
  • 165
2 votes
1 answer
79 views

var i = 0; var saveSource = Observable.Interval(TimeSpan.FromMilliseconds(200)).Select(x => i++); var throttledClicks = saveSource .Throttle(TimeSpan.FromMilliseconds(2000)) // Throttle for ...
user007's user avatar
  • 1,192
3 votes
2 answers
385 views

I'm having a hard time finding information as google yields results about the safety of concurrently pushing data to the subject, this isn't my use case, i have a dedicated thread (running an infinite ...
Ronan Thibaudau's user avatar
0 votes
1 answer
99 views

I'm creating a fully generic file explorer for AvaloniaUI. It has a view that shows a folder tree that you can navigate by expanding each directory. My goal is to make this view flexible enough to ...
SuperJMN's user avatar
  • 14.1k
0 votes
0 answers
79 views

I'm developing a websocket client wrapper. The third-party server I'm connecting to manages sessions, and it doesn't tolerate concurrent sessions. If the AuthenticateAsync method is called twice in a ...
nop's user avatar
  • 6,617
1 vote
1 answer
45 views

I have two types of observables A & B, they return the same item type but are accessible by separate APIs. With a list of id's which can be for either A or B. These observables return data for a ...
stack's user avatar
  • 11
2 votes
1 answer
180 views

What's the correct way to call the Read method with a timeout? public int Method() { return Read(); } I've tried with this, but my application is shutting down completely when a timeout ...
SuperJMN's user avatar
  • 14.1k
1 vote
1 answer
208 views

I'm playing around with System.Reactive and looking to achieve the following: A timer fires an event every 3 seconds A filesystemwatcher fires events in case a file is changed (another app appending ...
Jochen van Wylick's user avatar
2 votes
1 answer
136 views

I am using Rx.NET library and its method Buffer in the most simple manner like: observable.Buffer(TimeSpan.FromSeconds(5), 10); It works great except the case when cancellation token is activated. ...
Michal's user avatar
  • 1,456

1
2 3 4 5
70