Path: redb-route/redb.Route/Fluent/Direct.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/Fluent/Direct.cs
----
namespace redb.Route;
///
/// Fluent entry point for Direct (synchronous in-process) endpoints.
///
/// .From(Direct.Endpoint("input"))
/// .To(Direct.Endpoint("processing"))
///
///
public static class Direct
{
/// Reference a named direct endpoint (no configuration parameters).
public static DirectBuilder Endpoint(string name) => new(name);
}
/// Fluent builder for Direct endpoint URIs.
public sealed class DirectBuilder
{
private readonly string _name;
internal DirectBuilder(string name)
{
ArgumentException.ThrowIfNullOrWhiteSpace(name);
_name = name;
}
public string Build() => $"direct:{_name}";
public static implicit operator string(DirectBuilder b) => b.Build();
public override string ToString() => Build();
}