1 |
|
/* |
2 |
|
* DotGNU ASP.GNU Implementation |
3 |
|
* |
4 |
|
* Copyright (C) 2003 DotGNU Project |
5 |
|
* |
6 |
|
* |
7 |
|
* This program is free software; you can redistribute it and/or modify |
8 |
|
* it under the terms of the GNU General Public License as published by |
9 |
|
* the Free Software Foundation; either version 2 of the License, or |
10 |
|
* (at your option) any later version. |
11 |
|
* |
12 |
|
* This program is distributed in the hope that it will be useful, |
13 |
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
|
* GNU General Public License for more details. |
16 |
|
* |
17 |
|
* You should have received a copy of the GNU General Public License |
18 |
|
* along with this program; if not, write to the Free Software |
19 |
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
20 |
|
* |
21 |
|
* $Revision$ $Date$ |
22 |
|
* |
23 |
|
* -------------------------------------------------------------------------- |
24 |
|
* Authors: |
25 |
|
* Chris Smith |
26 |
|
*/ |
27 |
|
|
28 |
|
namespace System.Web |
29 |
|
{ |
30 |
|
using System; |
31 |
|
|
32 |
|
public sealed class HttpContext // : IServiceProvider |
33 |
|
{ |
34 |
|
private DateTime _oTimestamp; |
35 |
|
private HttpApplication _oApplication; |
36 |
|
|
37 |
|
// TODO |
38 |
|
|
39 |
|
private HttpResponse _oResponse; |
40 |
|
private HttpRequest _oRequest; |
41 |
|
|
42 |
|
// private IHttpHandler _Handler; |
43 |
|
// private ArrayList _arrExceptions; |
44 |
|
// private bool _skipauth; |
45 |
|
// private Hashtable _oItems; |
46 |
|
// private IHttpAsyncHandler _AsyncHandler; |
47 |
|
// private IPrincipal _User; |
48 |
|
// private HttpServerUtility _Server; |
49 |
|
// private HttpWorkerRequest _oWorkerRequest; |
50 |
|
|
51 |
|
public HttpContext (HttpRequest Request, HttpResponse Response) |
52 |
|
{ |
53 |
|
Context = this; |
54 |
|
_oRequest = Request; |
55 |
|
_oResponse = Response; |
56 |
|
} |
57 |
|
|
58 |
|
// TODO |
59 |
|
//public HttpContext (HttpWorkerRequest WorkerRequest) |
60 |
|
|
61 |
|
// TODO |
62 |
|
internal static HttpContext Context |
63 |
|
{ |
64 |
|
get { |
65 |
|
throw new NotImplementedException (); |
66 |
|
} |
67 |
|
set { |
68 |
|
throw new NotImplementedException (); |
69 |
|
} |
70 |
|
} |
71 |
|
|
72 |
|
// TODO |
73 |
|
public HttpApplicationState Application |
74 |
|
{ |
75 |
|
get { |
76 |
|
throw new NotImplementedException (); |
77 |
|
} |
78 |
|
} |
79 |
|
|
80 |
|
public HttpApplication ApplicationInstance |
81 |
|
{ |
82 |
|
get { |
83 |
|
return _oApplication; |
84 |
|
} |
85 |
|
set { |
86 |
|
_oApplication = value; |
87 |
|
} |
88 |
|
} |
89 |
|
|
90 |
|
// TODO |
91 |
|
//public Cache Cache |
92 |
|
|
93 |
|
public static HttpContext Current |
94 |
|
{ |
95 |
|
get { |
96 |
|
return Context; |
97 |
|
} |
98 |
|
} |
99 |
|
|
100 |
|
// TODO |
101 |
|
//public IHttpHandler Handler |
102 |
|
|
103 |
|
// TODO |
104 |
|
//internal IHttpAsyncHandler AsyncHandler |
105 |
|
|
106 |
|
// TODO |
107 |
|
// public bool IsCustomErrorEnabled |
108 |
|
|
109 |
|
// TODO |
110 |
|
// public bool IsDebuggingEnabled |
111 |
|
|
112 |
|
// TODO |
113 |
|
// public IDictionary Items |
114 |
|
|
115 |
|
public HttpRequest Request |
116 |
|
{ |
117 |
|
get { |
118 |
|
return _oRequest; |
119 |
|
} |
120 |
|
} |
121 |
|
|
122 |
|
public HttpResponse Response |
123 |
|
{ |
124 |
|
get { |
125 |
|
return _oResponse; |
126 |
|
} |
127 |
|
} |
128 |
|
|
129 |
|
// TODO |
130 |
|
// public HttpServerUtility Server |
131 |
|
|
132 |
|
// TODO |
133 |
|
// public HttpSessionState Session |
134 |
|
|
135 |
|
// TODO |
136 |
|
// public bool SkipAuthorization |
137 |
|
|
138 |
|
public DateTime Timestamp |
139 |
|
{ |
140 |
|
get { |
141 |
|
return _oTimestamp; |
142 |
|
} |
143 |
|
} |
144 |
|
|
145 |
|
// TODO |
146 |
|
// public TraceContext Trace |
147 |
|
|
148 |
|
// TODO |
149 |
|
// public IPrincipal User |
150 |
|
|
151 |
|
// TODO |
152 |
|
// public void AddError (Exception errorInfo) |
153 |
|
|
154 |
|
// TODO |
155 |
|
// public void ClearError () |
156 |
|
|
157 |
|
// TODO |
158 |
|
// public object GetConfig (string name) |
159 |
|
|
160 |
|
// TODO |
161 |
|
// public static object GetAppConfig (string name) |
162 |
|
|
163 |
|
// TODO |
164 |
|
// public void RewritePath (string Path) |
165 |
|
} |
166 |
|
} |
167 |
|
|