Table of Contents

Class AppServicesBundle

Namespace
Ploch.CommandLine.Spectre.Configuration
Assembly
Ploch.CommandLine.Spectre.dll

A services bundle that configures essential services for a Spectre.Console-based command-line application.

public class AppServicesBundle : ConfigurableServicesBundle, IServicesBundle, IOptionalConfigurationProvider, IConfigurationConsumer
Inheritance
ServicesBundle
ConfigurableServicesBundle
AppServicesBundle
Implements
IServicesBundle
IOptionalConfigurationProvider
IConfigurationConsumer
Inherited Members
ConfigurableServicesBundle.DoConfigure()
ServicesBundle.Configuration
ServicesBundle.Services

Remarks

This bundle registers Spectre.Console components, the logging services and command-related handlers to provide a complete foundation for command-line applications. It does not choose a logging provider: an application built through AppBuilder logs through the providers Host.CreateDefaultBuilder installs (console, debug and event source), and Serilog is opt-in through the Ploch.CommandLine.Spectre.Serilog package.

Properties

Dependencies

Gets the bundles registered before this one — the output services.

Methods

Configure(IConfiguration)

Configures the service collection with required services for a Spectre.Console-based command-line application.