public bool ParserCommandHelpOutput(string outputStr) { try { var jss = new JavaScriptSerializer(); CommandStaticStruct s = jss.Deserialize <CommandStaticStruct>(outputStr); if (!s.IsValid()) { return(false); } StaticCommandList.Add(s); } catch { return(false); } return(true); }
public CommandStaticStruct GetCommandStaticStructByName(string strName) { CommandStaticStruct result = StaticCommandList.Find(x => x.name == strName); return(result); }
public Command() { StaticStruct = new CommandStaticStruct(); DynamicStruct = new CommandDynamicStruct(); Clear(); }