[System] UriKind.RelativeOrAbsolute workaround.
[mono.git] / mcs / class / System.Web.Abstractions / System.Web / HttpSessionStateWrapper.cs
1 //
2 // HttpSessionStateWrapper.cs
3 //
4 // Author:
5 //      Atsushi Enomoto <atsushi@ximian.com>
6 //
7 // Copyright (C) 2008 Novell Inc. http://novell.com
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 using System;
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
34 using System.Globalization;
35 using System.IO;
36 using System.Runtime.CompilerServices;
37 using System.Security.Permissions;
38 using System.Security.Principal;
39 using System.Web.Caching;
40 using System.Web.SessionState;
41
42 namespace System.Web
43 {
44         [TypeForwardedFrom ("System.Web.Abstractions, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
45         [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
46         [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
47         public class HttpSessionStateWrapper : HttpSessionStateBase
48         {
49                 HttpSessionState w;
50
51                 public HttpSessionStateWrapper (HttpSessionState httpSessionState)
52                 {
53                         if (httpSessionState == null)
54                                 throw new ArgumentNullException ("httpSessionState");
55                         w = httpSessionState;
56                 }
57
58                 public override int CodePage {
59                         get { return w.CodePage; }
60                         set { w.CodePage = value; }
61                 }
62
63                 public override HttpSessionStateBase Contents {
64                         get { throw new NotImplementedException (); }
65                 }
66
67                 [MonoTODO]
68                 public override HttpCookieMode CookieMode {
69                         //get { return w.CookieMode; }
70                         get { throw new NotImplementedException (); }
71                 }
72
73                 public override int Count {
74                         get { return w.Count; }
75                 }
76
77                 public override bool IsCookieless {
78                         get { return w.IsCookieless; }
79                 }
80
81                 public override bool IsNewSession {
82                         get { return w.IsNewSession; }
83                 }
84
85                 public override bool IsReadOnly {
86                         get { return w.IsReadOnly; }
87                 }
88
89                 public override bool IsSynchronized {
90                         get { return w.IsSynchronized; }
91                 }
92
93                 public override object this [int index] {
94                         get { return w [index]; }
95                         set { w [index] = value; }
96                 }
97
98                 public override object this [string name] {
99                         get { return w [name]; }
100                         set { w [name] = value; }
101                 }
102
103                 public override NameObjectCollectionBase.KeysCollection Keys {
104                         get { return w.Keys; }
105                 }
106
107                 public override int LCID {
108                         get { return w.LCID; }
109                         set { w.LCID = value; }
110                 }
111
112                 public override SessionStateMode Mode {
113                         get { return w.Mode; }
114                 }
115
116                 public override string SessionID {
117                         get { return w.SessionID; }
118                 }
119
120                 public override HttpStaticObjectsCollectionBase StaticObjects {
121                         get { throw new NotImplementedException (); }
122                 }
123
124                 public override object SyncRoot {
125                         get { return w.SyncRoot; }
126                 }
127
128                 public override int Timeout {
129                         get { return w.Timeout; }
130                         set { w.Timeout = value; }
131                 }
132
133                 public override void Abandon ()
134                 {
135                         w.Abandon ();
136                 }
137
138                 public override void Add (string name, object value)
139                 {
140                         w.Add (name, value);
141                 }
142
143                 public override void Clear ()
144                 {
145                         w.Clear ();
146                 }
147
148                 public override void CopyTo (Array array, int index)
149                 {
150                         w.CopyTo (array, index);
151                 }
152
153                 public override IEnumerator GetEnumerator ()
154                 {
155                         return w.GetEnumerator ();
156                 }
157
158                 public override void Remove (string name)
159                 {
160                         w.Remove (name);
161                 }
162
163                 public override void RemoveAll ()
164                 {
165                         w.RemoveAll ();
166                 }
167
168                 public override void RemoveAt (int index)
169                 {
170                         w.RemoveAt (index);
171                 }
172         }
173 }