ConsoleAttribute.cs 408 B

123456789101112131415161718192021
  1. using System;
  2. using System.Reflection;
  3. namespace IngameDebugConsole
  4. {
  5. public abstract class ConsoleAttribute : Attribute
  6. {
  7. public MethodInfo Method { get; private set; }
  8. public abstract int Order { get; }
  9. public void SetMethod(MethodInfo method)
  10. {
  11. if (Method != null)
  12. throw new Exception("Method was already initialized.");
  13. Method = method;
  14. }
  15. public abstract void Load();
  16. }
  17. }