private void ProcessActionAttributeForMethod(MethodInfo info, Node node, bool add) { if (!add) { DebugButtonMenu.RemoveButtonsForNode(node); return; } object[] attrs = DebugReflectionUtil.GetCustomAttributes <DebugAction>(info, true); if (attrs.Length == 0) { return; } foreach (object objAttr in attrs) { DebugAction attr = (DebugAction)objAttr; DebugButtonMenu.AddActionButton(ReplaceName(attr.Name, node), node, () => info.Invoke(node, attr.Parameters)); } }