You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
950 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace IPA
  7. {
  8. [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
  9. public sealed class PluginAttribute : Attribute
  10. {
  11. // whenever this changes, PluginLoader.LoadMetadata must also change
  12. public RuntimeOptions RuntimeOptions { get; }
  13. public PluginAttribute(RuntimeOptions runtimeOptions)
  14. {
  15. RuntimeOptions = runtimeOptions;
  16. }
  17. }
  18. // TODO: figure out a better name for this
  19. public enum RuntimeOptions
  20. {
  21. SingleStartInit,
  22. DynamicInit,
  23. // TODO: do I want this?
  24. SingleDynamicInit
  25. }
  26. [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)]
  27. public sealed class InitAttribute : Attribute { }
  28. }