Kitto.Web.Routing.Injection
Dependency injection registry for [TKXContext] parameters. Maps type info to provider functions that resolve values from the current activation context (session, config, request, etc.).
IKXActivationContext interface
Interface for the activation context, used by injection providers to access path parameters and other request state. Implemented by TKXActivation (Kitto.Web.Routing.Activation).
function GetPathParam(const AName: string): string;Returns the captured value of the named path parameter ('' if absent).
TKXInjectionRegistry class
Singleton registry of injection providers, keyed by PTypeInfo. Providers are registered at startup and queried per-request during parameter filling. Extensible by applications.
constructor Create;Creates the registry with an empty provider map.
destructor Destroy;Frees the provider map.
class destructor DestroyClass;Frees the singleton instance at unit finalization.
procedure RegisterProvider(const ATypeInfo: PTypeInfo;Registers a provider for a specific type. If a provider for the same type already exists, it is replaced (allowing overrides).
function Resolve(const AType: TRttiType;Resolves a value for the given RTTI type using the registered provider. Returns TValue.Empty if no provider is registered for the type.
