AddCliInvokeExtensions Class

Definition

Provides extension methods for setting up dependency injection for CliInvoke's core services and built-in middleware.

public static class AddCliInvokeExtensions

Remarks

These methods register CliInvoke's core services and CliInvoke's core built-in middleware (LoggingMiddleware, RetryMiddleware). The registered IProcessConfigurationBuilder resolves to a blank builder with an empty target path: the only public constructor takes the target file path, which the container cannot supply, so callers set the target via SetTargetFilePath before building.

Platform middleware shipped in the CliInvoke.Specializations package (PowerShellMiddleware, CmdMiddleware) is not registered here; call AddCliInvokeSpecializations from that package alongside AddCliInvoke when using UsePowerShell() or UseCmd().

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Methods (1)