Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
IT Security ToolsGitHub Release: rapid7/metasploit-framework v6.5.5 (21.09.2026)(21.09.2026 um 21:18 Uhr)
IT Security Toolsironcurtain memory-mcp-server/v0.2.1(21.09.2026 um 20:10 Uhr)
IT Security NachrichtenIT Security News Hourly Summary 2026-09-21 21h : 6 posts(21.09.2026 um 21:00 Uhr)
IT Security NachrichtenWhat to Do When Your Competitors Are Scraping Your Prices(21.09.2026 um 21:02 Uhr)
IT Security NachrichtenAs KDE Turns 30, Contributors and Commits are Going Strong(21.09.2026 um 21:04 Uhr)
IT Security ToolsGitHub Release: rapid7/metasploit-framework v6.5.5 (21.09.2026)(21.09.2026 um 21:18 Uhr)
IT Security Toolsironcurtain memory-mcp-server/v0.2.1(21.09.2026 um 20:10 Uhr)
IT Security NachrichtenIT Security News Hourly Summary 2026-09-21 21h : 6 posts(21.09.2026 um 21:00 Uhr)
IT Security NachrichtenWhat to Do When Your Competitors Are Scraping Your Prices(21.09.2026 um 21:02 Uhr)
IT Security NachrichtenAs KDE Turns 30, Contributors and Commits are Going Strong(21.09.2026 um 21:04 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

redb.Route 3.0.1 — flat DSL navigation, CRTP refactor, and a silent null fix

Series: redb ecosystem Before 3.0.1, deep nested scopes required closing in exact reverse order — tedious and easy to get wrong. Three things changed. Flat End*() navigation A typed closer walks the Parent chain and exits t…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Series: redb ecosystem






Before 3.0.1, deep nested scopes required closing in exact reverse order — tedious and easy to get wrong. Three things changed.






Flat End*() navigation



A typed closer walks the Parent chain and exits to the right level in one call:




From("direct://demo-cascade-endchoice")
.Choice()
.When(e => true)
.Split(e => new object?[] { 1, 2, 3 })
.Process(e => { /* per-item work */ })
.Log("item=${body}")
.EndChoice() // walks past Split → When → lands at route root

.SetHeader("post-cascade", "ok")
.Log("cascade done");






Universal .End() exits to the nearest scope without naming it:




.Choice()
.When(e => true)
.Split(e => new object?[] { "a", "b" })
.Log(LogLevel.Information)
.Message("inside")
.End() // closes RichLog → returns Split body
.End() // closes Split → returns When body
.EndChoice() // closes Choice → returns route root






Sibling branches open naturally after a closed sub-scope — .When() and .Otherwise() walk up to the enclosing ChoiceDefinition via the Parent chain, so this compiles as-is:




.Choice()
.When(e => e.In.Body is IEnumerable<string> && e.In.Body is not string)
.Split(...)
.Process(...)
.EndSplit()
.Log("list branch done [${routeId}]") // still on the When body, not on Split
.When(e => e.In.Body is string s && s.Length > 0) // ← sibling, works after EndSplit
.Process(e => { /* ... */ })
.Otherwise()
.Process(e => { /* fallback */ })
.EndChoice()









Three logging styles, same pipeline step



The updated demo shows all three forms side by side — useful to see the tradeoffs:




// (A) Lambda — arbitrary C# at runtime
.Log(e => $"[lambda] item={e.In.Body} branch={e.In.Headers["branch"]}")

// (B) String template — compiled by the expression engine, zero alloc when level is off
.Log("[tmpl] item=${body} branch=${header.branch} [${routeId}]")

// (C) Rich-log scope — structured, multi-message, headers/properties as separate fields
.Log(LogLevel.Information)
.Message("[rich-tmpl] item=${body}")
.Message(e => $"[rich-lambda] upper={((string)e.In.Body!).ToUpperInvariant()}")
.Header("branch")
.Property("item-index")
.ShowRouteId(true)
.EndLog()






${body}, ${header.x}, ${property.y}, ${routeId}, ${exception.type}, ${exception.message} — all resolved by the compiled expression engine (Tokenizer → Parser → AST → IL). The template compiles once, runs as a cached delegate. .Message() in a rich-log scope accepts both forms simultaneously.






CRTP base — 27 duplicate class bodies removed



Every leaf method (To, Process, SetBody, Filter, Split, Transaction, ~40 more) now lives once in RouteDefinitionBase<TSelf>. Each returns TSelf — chaining stays on the concrete scope type throughout. Public API and route AST identical to 3.0.0.






Fix: GetContext() silently returned null inside nested scopes



IRouteDefinition.GetContext() was casting to RouteDefinition, which only matched the route root. Inside When, Loop, Traced, Catch — it returned null without throwing. Now walks Parent to the owning route. Matters if you have extension methods that read context at DSL build time.






Full demo: DeepDslShowcaseRoutes.cs · Changelog: 3.0.1 · Apache 2.0

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten redb.Route 3.0.1 — flat DSL navigation, CRTP refactor, and a silent null fix

Thematisch verwandte Begriffe: redbRoute, flat, navigation, CRTP · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-77582 | Tinyauth is an authentication and authorization server. Prior to 5.1.0, …
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick