ICoreReplApp
Core app contract for mapping commands, contexts, and modules without DI dependencies.
- Kind:
Interface - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/ICoreReplApp.cs
Signature
Section titled “Signature”public interface ICoreReplApp : IReplMapDerived Classes
Section titled “Derived Classes”Extension Methods
Section titled “Extension Methods”Context<ICoreReplApp>(ICoreReplApp, string, Action<ICoreReplApp>, Delegate)
Methods
Section titled “Methods”Context(string, Action<ICoreReplApp>, Delegate?)
Section titled “Context(string, Action<ICoreReplApp>, Delegate?)”Creates a context segment and configures child routes within it.
IContextBuilder Context(string segment, Action<ICoreReplApp> configure, Delegate? validation = null)Parameters
Section titled “Parameters”segment(string): Context segment template.configure(Action<ICoreReplApp>): 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.
CreateDocumentationModel(string?)
Section titled “CreateDocumentationModel(string?)”Builds a structured documentation model of the command graph.
ReplDocumentationModel CreateDocumentationModel(string? targetPath = null)Parameters
Section titled “Parameters”targetPath(string): Optional target path to scope the model. Whennull, returns the full model. When specified and not found, returns an empty model.
Returns
Section titled “Returns”ReplDocumentationModel - A structured documentation model.
InvalidateRouting()
Section titled “InvalidateRouting()”Invalidates the active routing cache so module presence predicates are re-evaluated on next resolution.
void InvalidateRouting()MapModule(IReplModule)
Section titled “MapModule(IReplModule)”Maps a reusable module instance into the current route scope.
ICoreReplApp MapModule(IReplModule module)Parameters
Section titled “Parameters”module(IReplModule): Module instance.
Returns
Section titled “Returns”ICoreReplApp - 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.
ICoreReplApp 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”ICoreReplApp - The same app contract for fluent chaining.
WithBanner(Delegate)
Section titled “WithBanner(Delegate)”Registers a banner delegate rendered when the scope is entered.
ICoreReplApp WithBanner(Delegate bannerProvider)Parameters
Section titled “Parameters”bannerProvider(Delegate): Banner delegate with injectable parameters.
Returns
Section titled “Returns”ICoreReplApp - The same app contract for fluent chaining.
WithBanner(string)
Section titled “WithBanner(string)”Registers a static banner string rendered when the scope is entered.
ICoreReplApp WithBanner(string text)Parameters
Section titled “Parameters”text(string): Banner text.
Returns
Section titled “Returns”ICoreReplApp - The same app contract for fluent chaining.