Path: redb-route/redb.Route/Core/RouteConfigurationBuilder.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/redb.Route/Core/RouteConfigurationBuilder.cs
----
namespace redb.Route.Core;
///
/// Base class for route configurations (Apache Camel's RouteConfigurationBuilder): error handling declared
/// once, apart from the routes, for the routes of every builder of the context. It is a route builder, so it is added
/// to a context the same way — context.AddRoutes(...), or found by assembly discovery.
///
///
/// public sealed class IntegrationErrors : RouteConfigurationBuilder
/// {
/// protected override void Configuration()
/// {
/// // No id: the default, for every route that has no configurations assigned.
/// RouteConfiguration()
/// .OnException<Exception>()
/// .MaximumRedeliveries(3)
/// .Handled()
/// .Log("failed: ${exception.message}");
///
/// // By id: for the routes that say .RouteConfigurationId("audit").
/// RouteConfiguration("audit")
/// .OnException<IOException>().Handled().To("direct://audit-failed");
/// }
/// }
///
/// context.AddRoutes(new IntegrationErrors());
///
///
///
public abstract class RouteConfigurationBuilder : RouteBuilder
{
/// Override this method to declare the configurations with .
protected abstract void Configuration();
/// Runs . A configuration builder may also define routes by overriding this and calling the base.
protected override void Configure() => Configuration();
}