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.

83 lines
2.5 KiB

4 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Apewer.AspNetBridge
  5. {
  6. /// <summary></summary>
  7. [AttributeUsage(AttributeTargets.Class, Inherited = false)]
  8. public sealed class RoutePrefixAttribute : Attribute
  9. {
  10. string _path;
  11. /// <summary></summary>
  12. public string Path { get { return _path; } }
  13. /// <summary></summary>
  14. /// <param name="path"></param>
  15. public RoutePrefixAttribute(string path) { _path = path; }
  16. }
  17. /// <summary></summary>
  18. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  19. public sealed class RouteAttribute : Attribute
  20. {
  21. string _path;
  22. /// <summary></summary>
  23. public string Path { get { return _path; } }
  24. /// <summary></summary>
  25. public RouteAttribute(string path) { _path = path; }
  26. }
  27. /// <summary></summary>
  28. [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
  29. public class FromBodyAttribute : Attribute { }
  30. /// <summary></summary>
  31. [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
  32. public class FromUriAttribute : Attribute { }
  33. /// <summary></summary>
  34. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  35. public sealed class HttpConnectAttribute : Attribute { }
  36. /// <summary></summary>
  37. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  38. public sealed class HttpDeleteAttribute : Attribute { }
  39. /// <summary></summary>
  40. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  41. public sealed class HttpGetAttribute : Attribute { }
  42. /// <summary></summary>
  43. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  44. public sealed class HttpHeadAttribute : Attribute { }
  45. /// <summary></summary>
  46. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  47. public sealed class HttpOptionsAttribute : Attribute { }
  48. /// <summary></summary>
  49. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  50. public sealed class HttpPatchAttribute : Attribute { }
  51. /// <summary></summary>
  52. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  53. public sealed class HttpPostAttribute : Attribute { }
  54. /// <summary></summary>
  55. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  56. public sealed class HttpPutAttribute : Attribute { }
  57. /// <summary></summary>
  58. [AttributeUsage(AttributeTargets.Method, Inherited = false)]
  59. public sealed class HttpTraceAttribute : Attribute { }
  60. }