PageRenderTime 65ms CodeModel.GetById 54ms app.highlight 8ms RepoModel.GetById 0ms app.codeStats 1ms

/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
25
26using System;
27
28using Manos.Http;
29using Manos.Routing;
30using Manos.Caching;
31using Manos.Logging;
32
33namespace Manos
34{
35	public interface IManosModule 
36	{
37		RouteHandler Routes { get; }
38		IManosCache Cache { get; }
39		IManosLogger Log { get; }
40		
41		RouteHandler Route (string pattern, IManosModule module);
42		RouteHandler Route (string pattern, ManosAction action);
43		RouteHandler Route (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
44		RouteHandler Route (ManosAction action, params string [] patterns);
45		RouteHandler Route (IManosModule module, params string [] patterns);
46		
47		RouteHandler Get (string pattern, IManosModule module);
48		RouteHandler Get (string pattern, ManosAction action);
49		RouteHandler Get (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
50		RouteHandler Get (ManosAction action, params string [] patterns);
51		RouteHandler Get (IManosModule module, params string [] patterns);
52		
53	 	RouteHandler Put (string pattern, IManosModule module);
54		RouteHandler Put (string pattern, ManosAction action);
55		RouteHandler Put (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
56		RouteHandler Put (ManosAction action, params string [] patterns);
57		RouteHandler Put (IManosModule module, params string [] patterns);
58		
59		RouteHandler Post (string pattern, IManosModule module);
60		RouteHandler Post (string pattern, ManosAction action);
61		RouteHandler Post (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
62		RouteHandler Post (ManosAction action, params string [] patterns);
63		RouteHandler Post (IManosModule module, params string [] patterns);
64		
65		RouteHandler Delete (string pattern, IManosModule module);
66		RouteHandler Delete (string pattern, ManosAction action);
67		RouteHandler Delete (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
68		RouteHandler Delete (ManosAction action, params string [] patterns);
69		RouteHandler Delete (IManosModule module, params string [] patterns);
70		
71		RouteHandler Head (string pattern, IManosModule module);
72		RouteHandler Head (string pattern, ManosAction action);
73		RouteHandler Head (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
74		RouteHandler Head (ManosAction action, params string [] patterns);
75		RouteHandler Head (IManosModule module, params string [] patterns);
76		
77		RouteHandler Options (string pattern, IManosModule module);
78		RouteHandler Options (string pattern, ManosAction action);
79		RouteHandler Options (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
80		RouteHandler Options (ManosAction action, params string [] patterns);
81		RouteHandler Options (IManosModule module, params string [] patterns);
82		
83		RouteHandler Trace (string pattern, IManosModule module);
84		RouteHandler Trace (string pattern, ManosAction action);
85		RouteHandler Trace (string pattern, Manos.Routing.MatchType matchType, ManosAction action);
86		RouteHandler Trace (ManosAction action, params string [] patterns);
87		RouteHandler Trace (IManosModule module, params string [] patterns);
88
89		void StartInternal ();
90	}
91}