public ScriptCommand Parse(string line)
{
string[] linesplitt = null;
string type = "";
List<string> param = new List<string>();
try
{
linesplitt = line.Split(',');
type = linesplitt[0];
for (int i = 1; i < linesplitt.Length; i++)
{
param.Add(linesplitt[i]);
}
}
catch (Exception e)
{
Console.WriteLine("Couldn't parse command. {0}", e.ToString());
}
return new ScriptCommand(type, param);
}