Path: redb/redb.Templates/templates/route-xml/redb-route-beans/.template.config/agents-scenario.md Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Templates/templates/route-xml/redb-route-beans/.template.config/agents-scenario.md ---- C# beans, `Beans/PriceCalculator.cs` and `routes/orders.route.xml`: `context.xml` declares `` with a `` and a ``. The route calls `` (arguments are expressions, the return value becomes the body; the same endpoint as `bean:#pricing?method=Gross(...)`), `` (a method that takes `IExchange`) and, in a condition, `` (the expression function: no `#`, bare arguments, and the method must be synchronous; a `Task` method is refused there and belongs in a step). Facts to keep: `RoutePackageIncludeAssembly` in the `.csproj` puts this project's assembly into the package; a constructor argument needs `type=` when the parameter is not a string; a bean with a dependency the XML cannot build stays out of XML and is registered by code. An exception the bean throws is an ordinary route failure (`onException` here). `routes/QuotesRoute.cs` is a second route in C# (`cs-modulectx-quotes`, its own timer `{{quotes.period:10000}}`) that takes the same bean from the registry, `exchange.Context.GetFromRegistry("pricing")`, and calls `Gross` and `Stamp` as typed methods. Usually changed: the class itself, more methods, more beans in `context.xml`.