Skip to content

IReplMap

Defines the command and context mapping contract used by the REPL graph.

public interface IReplMap

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

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

Creates a context segment and configures child routes within it.

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

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

Maps a terminal route to a handler delegate.

CommandBuilder Map(string route, Delegate handler)
  • route (string): Route template to register.
  • handler (Delegate): Handler delegate to execute.

CommandBuilder - A command builder for metadata configuration.

Maps a reusable module instance into the current route scope.

IReplMap MapModule(IReplModule module)

IReplMap - The same mapper 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. The predicate is evaluated for every resolution pass, allowing dynamic module presence.

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

IReplMap - The same mapper for fluent chaining.

Registers a banner delegate displayed when entering this scope in interactive mode. Unlike WithDescription, which is structural metadata visible in help and documentation, banners are display-only messages that appear at runtime.

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

IReplMap - The same mapper for fluent chaining.

Registers a static banner string displayed when entering this scope in interactive mode. Unlike WithDescription, which is structural metadata visible in help and documentation, banners are display-only messages that appear at runtime.

IReplMap WithBanner(string text)

IReplMap - The same mapper for fluent chaining.