Unofficial CardLife revival project, pronounced like "celery"
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.

Attributes.cs 805B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Reflection;
  2. namespace CLre_server.WebStatus
  3. {
  4. public class Attributes
  5. {
  6. }
  7. [System.AttributeUsage(System.AttributeTargets.Method)]
  8. public class WebEndpointAttribute : System.Attribute
  9. {
  10. private readonly string endpoint;
  11. public WebEndpointAttribute(string path)
  12. {
  13. endpoint = path;
  14. Assembly asm = Assembly.GetCallingAssembly();
  15. if (!WebServer._assembliesToCheck.Contains(asm))
  16. {
  17. WebServer._assembliesToCheck.Add(asm);
  18. }
  19. if (WebServer.MainInstance != null && WebServer.MainInstance.IsRunning)
  20. {
  21. }
  22. }
  23. internal string GetPath()
  24. {
  25. return endpoint;
  26. }
  27. }
  28. }