MenuItemAttribute

  • Namespace: Turian
  • Source File: MenuItemAttribute.cs

Creates a menu item that will execute a method. Use the path to the menu item, which is separated by '/'.

Remarks

Creates a menu item that will execute a method.

Example

This example demonstrates using the MenuItemAttribute for a method within an assembly: ` var methods = Assembly .GetExecutingAssembly() .GetTypes() .SelectMany(type => type.GetMethods(BindingFlags.Public | BindingFlags.Static)) .Where(method => method.GetCustomAttributes(typeof(MenuItemAttribute), false).Length > 0) .ToList(); `

Properties

Path

(string) = path: The path to the menu item. The path is separated by '/'.