Show / Hide Table of Contents

Namespace Benday.CommandsFramework

Classes

ArgumentCollection

Collection of arguments. Two common use cases: 1) create a collection of arguments in order to describe what arguments are available for a command and 2) to represent the arguments on a command with the values populated from the command line.

ArgumentCollectionFactory

Factory for creating CommandExecutionInfo instances from command line arguments. This class should be named CommandExecutionInfoFactory and will be renamed in a future release.

ArgumentFrameworkConstants

Constant strings used by the argument framework.

Argument<T>

Base class for arguments

AsynchronousCommand

Base class for commands that require access to async functionality for execution.

BooleanArgument

Argument implementation for working with boolean values

CommandAliasAttribute

Add this attribute to a command class to create an alternate name for the command that also supplies argument values. This is useful for creating a shortcut for a command that is usually run with the same set of arguments.

[Command(Name = "deploy")]
[CommandAlias("deploy-prod", "environment=production", "verbose=true",
    Description = "Deploy to production")]
public class DeployCommand : SynchronousCommand

The argument values are applied as though they had been typed on the command line, so anything actually supplied on the command line wins over them. The resulting order of precedence is: command line, then alias, then configuration, then the argument's default value.

CommandAliasInfo

A single alternate name for a command. This covers both the plain aliases declared by CommandAttribute.Aliases and the aliases declared by CommandAliasAttribute, which also supply argument values.

CommandAttribute

Add this attribute to a class to indicate that the class contains a command that is runnable through the commands framework. This attribute provides information about the command name, whether it uses async execution, and optionally the human readable description.

CommandAttributeUtility

Utility methods for accessing command attribute information on the types in an assembly.

CommandBase

Base class for all command implementations

CommandExecutionInfo

Information about the requested command execution.

CommandFrameworkConstants

CommandFrameworkUtilities

CommandInfo

Information about a command including name, description, and required/optional arguments.

CommandsApp

Builder for creating and running a CommandsFramework application with simplified DI setup.

ConfigurationData

ConsoleTextOutputProvider

Implementation of ITextOutputProvider that outputs messages to the system console.

DateTimeArgument

Argument implementation for working with DateTime values

DefaultProgram

This class provides a default implementation of a program that uses the CommandsFramework. There are options for supplying the application name, version, and website. Customize these options in order to control how the list of available commands and usage information is displayed.

DefaultProgramOptions

DependencyInjectionCommand

Base class for commands that use dependency injection. The service collection is validated lazily when services are first accessed, allowing commands to be instantiated for schema discovery without DI configuration.

DirectoryArgument

DisplayUsageOptions

ExtensionMethods

Extension methods. Mostly methods for configuring command argument definitions using fluent config methods.

FileArgument

FileBasedConfigurationManager

GetConfigurationValueCommand

Int32Argument

Argument that has an int value.

KnownException

This represents a known exception that should end execution of the application.

LineWrapUtilities

MissingArgumentException

Exception class for describing missing arguments

RemoveConfigurationValueCommand

SetConfigurationValueCommand

StringArgument

Argument implementation for working with string values

StringBuilderTextOutputProvider

Implementation of ITextOutputProvider that wraps a StringBuilder. This is helpful for checking output during unit testing or for implementing a user interface that could call this command

SynchronousCommand

Base class for commands that are run synchronously.

Interfaces

IArgument

Interface describing the methods and properties for an argument

IAsyncCommand

Interface for defining a command as using async execution.

IBooleanArgument

Interface for accessing a boolean argument value

ICommandConfigurationManager

ICommandProgram

ICommandProgramOptions

IDateTimeArgument

Interface for accessing a DateTime argument value

IInt32Argument

Interface for accessing a int argument value

ISynchronousCommand

Interface for definiting a command as using synchronous execution

ITextOutputProvider

Interface for handling text output from commands

Enums

ArgumentDataType

Enumeration of the supported argument data types

In this article
Back to top Copyright © www.benday.com | info@benday.com