using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.Helpers;
namespace Tango.Console
{
public static class ConsoleDictionary
{
private static List<ConsoleKnownCommand> _knownCommands;
public static List<ConsoleKnownCommand> GetKnownCommands()
{
if (_knownCommands == null)
{
_knownCommands = new List<ConsoleKnownCommand>();
String text = EmbeddedResourceHelper.GetEmbeddedResourceText("Tango.Console.CMD.txt");
foreach (var line in text.ToLines())
{
if (line.IsNotNullOrEmpty())
{
ConsoleKnownCommand command = new ConsoleKnownCommand();
String[] args = line.Split('\t');
command.Name = args[0].ToLower();
command.Description = args[1].Replace("\"", "");
_knownCommands.Add(command);
}
}
}
return _knownCommands;
}
}
}