mirror of
https://github.com/tonytins/tomas.git
synced 2025-04-30 11:31:41 -04:00
- Switched to file-scoped namespaces - Enabled Implicit Usings and Nullable Kernal was migrated too but is unusable, at the moment. Stick with developing or testing from the terminal emulator.
31 lines
751 B
C#
31 lines
751 B
C#
// I license this project under the GPL 3.0 license.
|
|
// See the LICENSE file in the project root for more information.
|
|
using Tomas.Common.Programs;
|
|
using Tomas.Interface;
|
|
using Tomas.Kernel.Programs;
|
|
using Sys = Cosmos.System;
|
|
|
|
namespace Tomas.Kernel;
|
|
|
|
public class Shell : IShell
|
|
{
|
|
const char SYMBOL = '$';
|
|
|
|
public Dictionary<string, IProgram> Programs => new Dictionary<string, IProgram>()
|
|
{
|
|
{"about", new About()},
|
|
{"fensay", new FenSay()},
|
|
{"clear", new Clear()},
|
|
{"commands", new Commands()}
|
|
};
|
|
|
|
public string ReadLine
|
|
{
|
|
get
|
|
{
|
|
Console.Write(SYMBOL);
|
|
var readl = Console.ReadLine();
|
|
return readl;
|
|
}
|
|
}
|
|
}
|