Don't ignore drives with type "aufs" or "overlay" (Xamarin-31021)
[mono.git] / mcs / class / Mainsoft.Web / Mainsoft.Web / ServletHttpContext.cs
1 //\r
2 // (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)\r
3 // Author: Konstantin Triger <kostat@mainsoft.com>\r
4 //\r
5 \r
6 //\r
7 // Permission is hereby granted, free of charge, to any person obtaining\r
8 // a copy of this software and associated documentation files (the\r
9 // "Software"), to deal in the Software without restriction, including\r
10 // without limitation the rights to use, copy, modify, merge, publish,\r
11 // distribute, sublicense, and/or sell copies of the Software, and to\r
12 // permit persons to whom the Software is furnished to do so, subject to\r
13 // the following conditions:\r
14 //\r
15 // The above copyright notice and this permission notice shall be\r
16 // included in all copies or substantial portions of the Software.\r
17 //\r
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
19 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
20 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
21 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
22 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
23 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
25 //\r
26 \r
27 using System;\r
28 using System.Collections.Generic;\r
29 using System.Text;\r
30 using System.Web;\r
31 using Mainsoft.Web.Hosting;\r
32 using javax.servlet;\r
33 using javax.servlet.http;\r
34 \r
35 namespace Mainsoft.Web\r
36 {\r
37         /// <summary>\r
38         /// ServletHttpContext contains all of the per-request state information related to the processing of a single request, \r
39         /// and the rendering of the corresponding response.\r
40         /// </summary>\r
41         public sealed class ServletHttpContext : BaseHttpContext\r
42         {\r
43                 internal ServletHttpContext (HttpContext context)\r
44                         : base (context) {\r
45                 }\r
46 \r
47                 /// <summary>\r
48                 /// Gets the Mainsoft.Web.ServletHttpContext object for the current sevlet request.\r
49                 /// </summary>\r
50                 /// <param name="context"></param>\r
51                 /// <returns></returns>\r
52                 public static new ServletHttpContext GetCurrent (HttpContext context) {\r
53                         return BaseHttpContext.GetCurrent (context) as ServletHttpContext;\r
54                 }\r
55 \r
56                 private new ServletWorkerRequest Worker {\r
57                         get { return (ServletWorkerRequest) base.Worker; }\r
58                 }\r
59 \r
60                 /// <summary>\r
61                 /// Returns the current javax.servlet.http.HttpServlet object.\r
62                 /// </summary>\r
63                 public HttpServlet Servlet {\r
64                         get { return Worker.Servlet; }\r
65                 }\r
66 \r
67                 /// <summary>\r
68                 /// Returns the current javax.servlet.http.HttpServletRequest object.\r
69                 /// </summary>\r
70                 public HttpServletRequest ServletRequest {\r
71                         get { return Worker.ServletRequest; }\r
72                 }\r
73 \r
74 \r
75                 /// <summary>\r
76                 /// Returns the current javax.servlet.http.HttpServletResponse object.\r
77                 /// </summary>\r
78                 public HttpServletResponse ServletResponse {\r
79                         get { return Worker.ServletResponse; }\r
80                 }\r
81 \r
82                 /// <summary>\r
83                 /// Returns the javax.servlet.ServletConfig object for the current sevlet.\r
84                 /// </summary>\r
85                 public ServletConfig ServletConfig {\r
86                         get { return Servlet.getServletConfig (); }\r
87                 }\r
88 \r
89                 /// <summary>\r
90                 /// Returns the javax.servlet.ServletContext object for the current application.\r
91                 /// </summary>\r
92                 public ServletContext ServletContext {\r
93                         get { return Servlet.getServletContext (); }\r
94                 }\r
95 \r
96 \r
97                 /// <summary>\r
98                 /// Returns the current servlet name.\r
99                 /// </summary>\r
100                 public string ServletName {\r
101                         get {\r
102                                 return Servlet.getServletName ();\r
103                         }\r
104                 }\r
105         }\r
106 }\r