Guest User

Untitled

a guest
Jul 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. public interface INancyModule
  2. {
  3. /// <summary>
  4. /// Gets or sets an <see cref="ITemplateEngineSelector"/> which represents the current application context
  5. /// </summary>
  6. ITemplateEngineSelector TemplateEngineSelector { get; set; }
  7.  
  8. /// <summary>
  9. /// Gets <see cref="RouteDictionary"/> for declaring actions for DELETE requests.
  10. /// </summary>
  11. /// <value>A <see cref="RouteDictionary"/> instance.</value>
  12. RouteDictionary Delete { get; }
  13.  
  14. /// <summary>
  15. /// Gets <see cref="RouteDictionary"/> for declaring actions for GET requests.
  16. /// </summary>
  17. /// <value>A <see cref="RouteDictionary"/> instance.</value>
  18. /// <remarks>These actions will also be used when a HEAD request is recieved.</remarks>
  19. RouteDictionary Get { get; }
  20.  
  21. string ModulePath { get; }
  22.  
  23. /// <summary>
  24. /// Gets <see cref="RouteDictionary"/> for declaring actions for POST requests.
  25. /// </summary>
  26. /// <value>A <see cref="RouteDictionary"/> instance.</value>
  27. RouteDictionary Post { get; }
  28.  
  29. /// <summary>
  30. /// Gets <see cref="RouteDictionary"/> for declaring actions for PUT requests.
  31. /// </summary>
  32. /// <value>A <see cref="RouteDictionary"/> instance.</value>
  33. RouteDictionary Put { get; }
  34.  
  35. /// <summary>
  36. /// Gets or sets an <see cref="IRequest"/> instance that represents the current request.
  37. /// </summary>
  38. /// <value>An <see cref="IRequest"/> instance.</value>
  39. IRequest Request { get; set; }
  40.  
  41. /// <summary>
  42. /// An extension point for adding support for view engines.
  43. /// </summary>
  44. /// <value>This property will always return <see langword="null" /> because it acts as an extension point.</value>
  45. /// <remarks>Extension methods to this property should always return <see cref="Response"/> or one of the types that can implicitly be types into a <see cref="Response"/>.</remarks>
  46. IViewEngine View { get; }
  47.  
  48. /// <summary>
  49. /// An extension point for adding support for formatting response contents.
  50. /// </summary>
  51. /// <value>This property will always return <see langword="null" /> because it acts as an extension point.</value>
  52. /// <remarks>Extension methods to this property should always return <see cref="Response"/> or one of the types that can implicitly be types into a <see cref="Response"/>.</remarks>
  53. IResponseFormatter Response { get; }
  54.  
  55. /// <param name="method">A <see cref="string"/> containing the http request method for which the routes should be returned.</param>
  56. /// <returns>An <see cref="IDictionary{TKey,TValue}"/> containing the routes.</returns>
  57. /// <remarks>Valid values are delete, get, post and put. The parameter is not case sensitive.</remarks>
  58. RouteDictionary GetRoutes(string method);
  59.  
  60. /// <summary>
  61. /// Renders the view based on the extension without a model.
  62. /// </summary>
  63. /// <param name="name">The path to the view</param>
  64. Action<Stream> SmartView(string name);
  65.  
  66. /// <summary>
  67. /// Renders the view based on the extension with a model.
  68. /// </summary>
  69. /// <param name="name">The path to the view</param>
  70. /// <param name="model">The model to pass to the view</param>
  71. Action<Stream> SmartView<TModel>(string name, TModel model);
  72. }
Add Comment
Please, Sign In to add comment