summaryrefslogtreecommitdiff
path: root/slips/src/app/Marina/Web/CurrentHttpContext.cs
blob: 8f3b959e3583dd63784570a4cb747e1fedc7cb10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
using System;
using System.Collections;
using System.Security.Principal;
using System.Web;
using System.Web.Caching;
using System.Web.Profile;
using System.Web.SessionState;

namespace Marina.Web {
	public class CurrentHttpContext : IHttpContext {
		public void AddError( Exception errorInfo ) {
			Current( ).AddError( errorInfo );
		}

		public void ClearError() {
			Current( ).ClearError( );
		}

		public object GetSection( string sectionName ) {
			return Current( ).GetSection( sectionName );
		}

		public void RewritePath( string path ) {
			Current( ).RewritePath( path );
		}

		public void RewritePath( string path, bool rebaseClientPath ) {
			Current( ).RewritePath( path, rebaseClientPath );
		}

		public void RewritePath( string filePath, string pathInfo, string queryString ) {
			Current( ).RewritePath( filePath, pathInfo, queryString );
		}

		public void RewritePath( string filePath, string pathInfo, string queryString, bool setClientFilePath ) {
			Current( ).RewritePath( filePath, pathInfo, queryString, setClientFilePath );
		}

		public HttpApplication ApplicationInstance {
			get { return Current( ).ApplicationInstance; }
			set { Current( ).ApplicationInstance = value; }
		}

		public HttpApplicationState Application {
			get { return Current( ).Application; }
		}

		public IHttpHandler Handler {
			get { return Current( ).Handler; }
			set { Current( ).Handler = value; }
		}

		public IHttpHandler PreviousHandler {
			get { return Current( ).PreviousHandler; }
		}

		public IHttpHandler CurrentHandler {
			get { return Current( ).CurrentHandler; }
		}

		public HttpRequest Request {
			get { return Current( ).Request; }
		}

		public HttpResponse Response {
			get { return Current( ).Response; }
		}

		public TraceContext Trace {
			get { return Current( ).Trace; }
		}

		public IDictionary Items {
			get { return Current( ).Items; }
		}

		public HttpSessionState Session {
			get { return Current( ).Session; }
		}

		public HttpServerUtility Server {
			get { return Current( ).Server; }
		}

		public Exception Error {
			get { return Current( ).Error; }
		}

		public Exception[] AllErrors {
			get { return Current( ).AllErrors; }
		}

		public IPrincipal User {
			get { return Current( ).User; }
			set { Current( ).User = value; }
		}

		public ProfileBase Profile {
			get { return Current( ).Profile; }
		}

		public bool SkipAuthorization {
			get { return Current( ).SkipAuthorization; }
			set { Current( ).SkipAuthorization = value; }
		}

		public bool IsDebuggingEnabled {
			get { return Current( ).IsDebuggingEnabled; }
		}

		public bool IsCustomErrorEnabled {
			get { return Current( ).IsCustomErrorEnabled; }
		}

		public DateTime Timestamp {
			get { return Current( ).Timestamp; }
		}

		public Cache Cache {
			get { return Current( ).Cache; }
		}

		public RequestNotification CurrentNotification {
			get { return Current( ).CurrentNotification; }
		}

		public bool IsPostNotification {
			get { return Current( ).IsPostNotification; }
		}

		private HttpContext Current() {
			return HttpContext.Current;
		}
	}
}