-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Rambla targets current .NET (the repo builds on .NET 10). The core is
netstandard2.0, so it works broadly; UI integration ships as adapters.
-
Rambla— the framework-agnostic core (includes the[State]source generator). -
Rambla.Wpf— the WPF dispatcher adapter.
(Packages are not yet published to NuGet; for now reference the projects or build from source. See the Roadmap.)
At application startup, on the UI thread, install a scheduler so background writes marshal correctly:
// WPF, once at startup:
Rambla.Wpf.DispatcherStateScheduler.InstallAsDefault();Without an adapter, the default is a synchronous ImmediateStateScheduler (useful
for tests and non-UI code).
Inherit RamblaState and annotate backing fields with [State]. The generator
emits the observable property (strips a leading underscore: _bid → Bid).
public partial class MarketViewModel : RamblaState
{
[State] private decimal _bid;
[State] private decimal _ask;
[State] private decimal _pnl;
}// From a WebSocket handler, timer, or worker — any thread:
vm.Bid = quote.Bid;
vm.Ask = quote.Ask;
vm.Pnl = quote.Pnl;No Dispatcher.Invoke, no OnPropertyChanged, no SynchronizationContext.Post.
Rambla coalesces the writes and raises PropertyChanged on the UI thread.
Group writes so the UI is notified once, coherently — never mid-batch:
using (vm.BeginUpdate())
{
vm.Bid = bid;
vm.Ask = ask;
vm.Pnl = pnl;
}
// or: vm.Update(() => { ... });See Core Semantics for exactly what this guarantees (and what it does not — batches give notification coherence, not cross-thread state atomicity).
Run the market dashboard sample and watch mutations/s, PropertyChanged/s,
coalescing %, flush p50/p95/p99 and producer→visible latency live:
dotnet run -c Release --project samples/Rambla.Demo.MarketDashboardRambla — state for real-time .NET desktop applications · MIT · github.com/nicoseijas/Rambla · This wiki follows ASD-STE100.
Use Rambla
Reference