Path: redb-route/tests/redb.Route.Tests.Xml/Examples/Generated/FactoriesRoutes.cs Snapshot: redb-route, 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-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/tests/redb.Route.Tests.Xml/Examples/Generated/FactoriesRoutes.cs ---- // /factories.route.xml — do not edit; regenerate instead. /> #nullable enable using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; using redb.Route.Abstractions; using redb.Route.Aggregation; using redb.Route.ControlBus; using redb.Route.Core; using redb.Route.Transactions; using redb.Route.Xml; using redb.Route.Xslt; namespace redb.Route.Tests.Xml.Examples.Generated; /// A generated route builder — see the header for the source file. public sealed class FactoriesRoutes : RouteBuilder { protected override void Configure() { Context!.AddToRegistry("corp-ldap", XmlBeans.Create(Context!, "redb.Route.Ldap.LdapConnectionFactory, redb.Route.Ldap", [], [("Server", "{{ldap.server}}"), ("Port", "{{ldap.port:636}}"), ("Ssl", "{{ldap.ssl:true}}"), ("BindDn", "{{ldap.service.dn}}"), ("BindPassword", "{{ldap.service.password}}"), ("FollowReferrals", "false")])); Context!.AddToRegistry("corp-smtp", XmlBeans.Create(Context!, "redb.Route.Mail.MailConnectionFactory, redb.Route.Mail", [], [("Host", "{{mail.host}}"), ("Port", "{{mail.port:587}}"), ("Security", "Auto"), ("Username", "{{mail.user}}"), ("Password", "{{mail.password}}")])); Context!.AddToRegistry("main-db", XmlBeans.Create(Context!, "redb.Route.Sql.Connection.SqlConnectionFactory, redb.Route.Sql", [XmlBeans.Create(Context!, "redb.Route.Sql.Connection.SqlConnectionOptions, redb.Route.Sql", [], [("ConnectionString", "{{db.main.connection}}")])], [])); // LDAP authentication issuing a JWT var route0 = From("http:{{api.listen:0.0.0.0:5090}}/auth/login?inOut=true"); route0.RouteId("auth-login"); route0.Description("LDAP authentication issuing a JWT"); route0.To("ldap://{{ldap.base.dn}}?action=bind&connectionFactory=#corp-ldap"); route0.To("bean:#auth-processor?method=IssueToken"); // Login audit into main-db var route1 = From("direct://auth-audit"); route1.RouteId("auth-audit"); route1.Description("Login audit into main-db"); route1.To("sql:INSERT INTO auth_log(login, at) VALUES (:#login, :#at)?dataSource=#main-db¶m.login=${header.login}¶m.at=${dateformat(now(), 'o')}"); // Order notification over SMTP var route2 = From("direct://notify-mail"); route2.RouteId("notify-mail"); route2.Description("Order notification over SMTP"); route2.SetHeader("mail.subject", Expr("Order ${header.orderId}: ${header.status}")); route2.To("smtp://{{mail.from}}?to={{mail.to}}&connectionFactory=#corp-smtp"); } }