IReplMap
Defines the command and context mapping contract used by the REPL graph.
- Kind:
Interface - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/IReplMap.cs
Signature
Section titled “Signature”public interface IReplMapDerived Classes
Section titled “Derived Classes”Methods
Section titled “Methods”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)Parameters
Section titled “Parameters”segment(string): Context segment template.configure(Action<IReplMap>): Mapping callback for nested routes.validation(Delegate): Optional validator for scope entry.
Returns
Section titled “Returns”IContextBuilder - A context builder for context-level metadata configuration.
Map(string, Delegate)
Section titled “Map(string, Delegate)”Maps a terminal route to a handler delegate.
CommandBuilder Map(string route, Delegate handler)Parameters
Section titled “Parameters”Returns
Section titled “Returns”CommandBuilder - A command builder for metadata configuration.
MapModule(IReplModule)
Section titled “MapModule(IReplModule)”Maps a reusable module instance into the current route scope.
IReplMap MapModule(IReplModule module)Parameters
Section titled “Parameters”module(IReplModule): Module instance.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”module(IReplModule): Module instance.isPresent(Func<ModulePresenceContext, bool>): Runtime presence predicate.
Returns
Section titled “Returns”IReplMap - The same mapper for fluent chaining.
WithBanner(Delegate)
Section titled “WithBanner(Delegate)”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)Parameters
Section titled “Parameters”bannerProvider(Delegate): Banner delegate with injectable parameters.
Returns
Section titled “Returns”IReplMap - The same mapper for fluent chaining.
WithBanner(string)
Section titled “WithBanner(string)”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)Parameters
Section titled “Parameters”text(string): Banner text.
Returns
Section titled “Returns”IReplMap - The same mapper for fluent chaining.