Skip to content
ConsoleMonster
Class

CommandProvider

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
sealed

A command provider from a function.

Inheritance

  • object
  • CommandProvider

Constructors

public CommandProvider(string name, Func<IEnumerable<PaletteCommand>> commands) #

Creates a provider.

Parameters

name string required
The group name.
commands System.Func<System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.PaletteCommand>> required
Returns the commands.

Methods

public IEnumerable<PaletteCommand> GetCommands() #

The commands; called when the palette opens.

Returns

IEnumerable<PaletteCommand> The commands.

Properties

public string Name { get; } #

The group name shown with its commands.