LuaGlobalAttribute.cs 814 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace LuaInterface
  3. {
  4. /// <summary>
  5. /// Marks a method for global usage in Lua scripts
  6. /// </summary>
  7. /// <see cref="LuaRegistrationHelper.TaggedInstanceMethods"/>
  8. /// <see cref="LuaRegistrationHelper.TaggedStaticMethods"/>
  9. [AttributeUsage(AttributeTargets.Method)]
  10. // sealed
  11. public class LuaGlobalAttribute : Attribute
  12. {
  13. private string name,descript;
  14. /// <summary>
  15. /// An alternative name to use for calling the function in Lua - leave empty for CLR name
  16. /// </summary>
  17. public string Name { get { return name; } set { name = value; }}
  18. /// <summary>
  19. /// A description of the function
  20. /// </summary>
  21. public string Description { get { return descript; } set { descript = value; }}
  22. }
  23. }