internal static void Run(Statement statement) { run: if (statement.Command == "add" || statement.Command == "remove") { throw new Exception($"Such '{statement.Command}' command is under development "); } if (CmdFunc.TryGetValue(statement.Command, out Operation operation)) { operation.Invoke(statement); } else if (AliasFunc.ContainsValue(statement.Command)) { foreach (var item in AliasFunc) { if (item.Value == statement.Command) { statement.Command = item.Key; goto run; } } } else { throw new Exception($"Such '{statement.Command}' command is not found "); } }
public void setButtonClick(CmdFunc fuc) { mFunc = fuc; // mFunc = func; }