HttpHandlerAttribute.cs 797 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. namespace ETModel
  3. {
  4. public class HttpHandlerAttribute : BaseAttribute
  5. {
  6. public AppType AppType { get; }
  7. public string Path { get; }
  8. public HttpHandlerAttribute(AppType appType, string path)
  9. {
  10. this.AppType = appType;
  11. this.Path = path;
  12. }
  13. }
  14. [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
  15. public class GetAttribute : Attribute
  16. {
  17. public string Path { get; }
  18. public GetAttribute()
  19. {
  20. }
  21. public GetAttribute(string path)
  22. {
  23. this.Path = path;
  24. }
  25. }
  26. [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
  27. public class PostAttribute : Attribute
  28. {
  29. public string Path { get; }
  30. public PostAttribute()
  31. {
  32. }
  33. public PostAttribute(string path)
  34. {
  35. this.Path = path;
  36. }
  37. }
  38. }