Path: redb-route/redb.Route/Abstractions/IIdempotentRepositoryProvider.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/Abstractions/IIdempotentRepositoryProvider.cs
----
namespace redb.Route.Abstractions;
///
/// Lookup service for named instances. Lets routes refer
/// to repositories by string name (resolved lazily during pipeline execution) instead of
/// holding a hard reference at definition time.
///
/// Useful when the same route definition is reused across multiple contexts/tenants where
/// each picks its own backing store, or when DI registration occurs after routes are defined.
///
///
public interface IIdempotentRepositoryProvider
{
///
/// Returns the repository registered under .
///
/// Logical repository name (case-insensitive).
/// The repository.
///
/// Thrown when no repository is registered under the given name.
///
IIdempotentRepository Get(string name);
///
/// Looks up a repository by name. false when nothing is registered under it; an object of another type
/// under the name is a configuration error and throws .
///
bool TryGet(string name, out IIdempotentRepository repository);
}