/src/Manos/Manos/IManosModule.cs

http://github.com/jacksonh/manos · C# · 91 lines · 55 code · 13 blank · 23 comment · 0 complexity · cb0c10d35e8764946eea16d22e197ac5 MD5 · raw file

  1. //
  2. // Copyright (C) 2011 Antony Pinchbeck (antony@componentx.co.uk)
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining
  5. // a copy of this software and associated documentation files (the
  6. // "Software"), to deal in the Software without restriction, including
  7. // without limitation the rights to use, copy, modify, merge, publish,
  8. // distribute, sublicense, and/or sell copies of the Software, and to
  9. // permit persons to whom the Software is furnished to do so, subject to
  10. // the following conditions:
  11. //
  12. // The above copyright notice and this permission notice shall be
  13. // included in all copies or substantial portions of the Software.
  14. //
  15. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  19. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  20. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  21. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. //
  23. //
  24. using System;
  25. using Manos.Http;
  26. using Manos.Routing;
  27. using Manos.Caching;
  28. using Manos.Logging;
  29. namespace Manos
  30. {
  31. public interface IManosModule
  32. {
  33. RouteHandler Routes { get; }
  34. IManosCache Cache { get; }
  35. IManosLogger Log { get; }
  36. RouteHandler Route (string pattern, IManosModule module);
  37. RouteHandler Route (string pattern, ManosAction action);
  38. RouteHandler Route (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  39. RouteHandler Route (ManosAction action, params string [] patterns);
  40. RouteHandler Route (IManosModule module, params string [] patterns);
  41. RouteHandler Get (string pattern, IManosModule module);
  42. RouteHandler Get (string pattern, ManosAction action);
  43. RouteHandler Get (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  44. RouteHandler Get (ManosAction action, params string [] patterns);
  45. RouteHandler Get (IManosModule module, params string [] patterns);
  46. RouteHandler Put (string pattern, IManosModule module);
  47. RouteHandler Put (string pattern, ManosAction action);
  48. RouteHandler Put (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  49. RouteHandler Put (ManosAction action, params string [] patterns);
  50. RouteHandler Put (IManosModule module, params string [] patterns);
  51. RouteHandler Post (string pattern, IManosModule module);
  52. RouteHandler Post (string pattern, ManosAction action);
  53. RouteHandler Post (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  54. RouteHandler Post (ManosAction action, params string [] patterns);
  55. RouteHandler Post (IManosModule module, params string [] patterns);
  56. RouteHandler Delete (string pattern, IManosModule module);
  57. RouteHandler Delete (string pattern, ManosAction action);
  58. RouteHandler Delete (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  59. RouteHandler Delete (ManosAction action, params string [] patterns);
  60. RouteHandler Delete (IManosModule module, params string [] patterns);
  61. RouteHandler Head (string pattern, IManosModule module);
  62. RouteHandler Head (string pattern, ManosAction action);
  63. RouteHandler Head (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  64. RouteHandler Head (ManosAction action, params string [] patterns);
  65. RouteHandler Head (IManosModule module, params string [] patterns);
  66. RouteHandler Options (string pattern, IManosModule module);
  67. RouteHandler Options (string pattern, ManosAction action);
  68. RouteHandler Options (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  69. RouteHandler Options (ManosAction action, params string [] patterns);
  70. RouteHandler Options (IManosModule module, params string [] patterns);
  71. RouteHandler Trace (string pattern, IManosModule module);
  72. RouteHandler Trace (string pattern, ManosAction action);
  73. RouteHandler Trace (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
  74. RouteHandler Trace (ManosAction action, params string [] patterns);
  75. RouteHandler Trace (IManosModule module, params string [] patterns);
  76. void StartInternal ();
  77. }
  78. }