Skip to content

[Feature]: Introduction of Reactive Streams #150

@eneshoxha

Description

@eneshoxha

Describe the solution you'd like
In the Cortex Data Framework, we are introducing Reactive support for our IStream implementations.

Below is an example of how Stream can look.

var counter = new Stream<int>(0);
var doubled = counter.Map(x => x * 2);

using var _ = doubled.Subscribe(x => Console.WriteLine($"doubled: {x}"));

counter.Emit(1); // prints 2
counter.Emit(2); // prints 4

// Destiny binding: keep target wired to source forever (until disposed)
var uiLabel = new Stream<string>();
using var bind = counter.Destiny(uiLabel, v => $"Count: {v}");

// anywhere in UI
uiLabel.Subscribe(text => label.Text = text);

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfeatureThis label is in use for minor version increments

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions