Show / Hide Table of Contents

Class 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.

Inheritance
object
DefaultProgram
Implements
ICommandProgram
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.CommandsFramework
Assembly: Benday.CommandsFramework.dll
Syntax
public class DefaultProgram : ICommandProgram

Constructors

| Edit this page View Source

DefaultProgram(DefaultProgramOptions, Assembly)

Constructor

Declaration
public DefaultProgram(DefaultProgramOptions options, Assembly implementationAssembly)
Parameters
Type Name Description
DefaultProgramOptions options

Display options such as application name, version, and website

Assembly implementationAssembly

Assembly that contains your command implementations

Properties

| Edit this page View Source

ImplementationAssembly

Declaration
public Assembly ImplementationAssembly { get; }
Property Value
Type Description
Assembly
| Edit this page View Source

Options

Declaration
public ICommandProgramOptions Options { get; }
Property Value
Type Description
ICommandProgramOptions
| Edit this page View Source

OutputProvider

Declaration
public ITextOutputProvider OutputProvider { get; }
Property Value
Type Description
ITextOutputProvider

Methods

| Edit this page View Source

DisplayCommandsWithCategories(List<CommandAttribute>)

Displays the usage information for the program and all available commands displayed by category.

Declaration
public virtual void DisplayCommandsWithCategories(List<CommandAttribute> commands)
Parameters
Type Name Description
List<CommandAttribute> commands

List of commands

| Edit this page View Source

DisplayCommandsWithoutCategories(List<CommandAttribute>)

Displays the usage information for the program and all available commands displayed alphabetically.

Declaration
public virtual void DisplayCommandsWithoutCategories(List<CommandAttribute> commands)
Parameters
Type Name Description
List<CommandAttribute> commands

List of commands

| Edit this page View Source

DisplayUsage(CommandAttributeUtility)

Displays the usage information for the program and all available commands.

Declaration
public virtual void DisplayUsage(CommandAttributeUtility util)
Parameters
Type Name Description
CommandAttributeUtility util
| Edit this page View Source

Run(string[])

Declaration
public void Run(string[] args)
Parameters
Type Name Description
string[] args

Implements

ICommandProgram
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com