Skip to content

IReplApp

DI-enabled app contract for mapping commands, contexts, and modules.

public interface IReplApp : ICoreReplApp, IReplMap
  • BuildMcpServerOptions(ICoreReplApp, Action<ReplMcpServerOptions>, IServiceProvider)

Context(string, Action<IReplApp>, Delegate?)

Section titled “Context(string, Action<IReplApp>, Delegate?)”

Creates a context segment and configures child routes within it.

IContextBuilder Context(string segment, Action<IReplApp> configure, Delegate? validation = null)
  • segment (string): Context segment template.
  • configure (Action<IReplApp>): Mapping callback for nested routes.
  • validation (Delegate): Optional validator for scope entry.

IContextBuilder - A context builder for context-level metadata configuration.

Invalidates the active routing cache so module presence predicates are re-evaluated on next resolution.

void InvalidateRouting()

Maps a reusable module instance into the current route scope.

IReplApp MapModule(IReplModule module)

IReplApp - The same app contract for fluent chaining.

Maps a reusable module instance into the current route scope with an injectable runtime presence predicate.

IReplApp MapModule(IReplModule module, Delegate isPresent)

IReplApp - The same app contract for fluent chaining.

MapModule(IReplModule, Func<ModulePresenceContext, bool>)

Section titled “MapModule(IReplModule, Func<ModulePresenceContext, bool>)”

Maps a reusable module instance into the current route scope with a runtime presence predicate.

IReplApp MapModule(IReplModule module, Func<ModulePresenceContext, bool> isPresent)
  • module (IReplModule): Module instance.
  • isPresent (Func<ModulePresenceContext, bool>): Runtime presence predicate.

IReplApp - The same app contract for fluent chaining.

Maps a module resolved through DI activation.

IReplApp MapModule<TModule>() where TModule : class, IReplModule
  • TModule: Module type.

IReplApp - The same app contract for fluent chaining.

Registers a banner delegate rendered when the scope is entered.

IReplApp WithBanner(Delegate bannerProvider)
  • bannerProvider (Delegate): Banner delegate with injectable parameters.

IReplApp - The same app contract for fluent chaining.

Registers a static banner string rendered when the scope is entered.

IReplApp WithBanner(string text)

IReplApp - The same app contract for fluent chaining.