2 // HttpSessionStateWrapper.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
7 // Copyright (C) 2008 Novell Inc. http://novell.com
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:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
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.
31 using System.Collections;
32 using System.Collections.Generic;
33 using System.Collections.Specialized;
34 using System.Globalization;
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;
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
51 public HttpSessionStateWrapper (HttpSessionState httpSessionState)
53 if (httpSessionState == null)
54 throw new ArgumentNullException ("httpSessionState");
58 public override int CodePage {
59 get { return w.CodePage; }
60 set { w.CodePage = value; }
63 public override HttpSessionStateBase Contents {
64 get { throw new NotImplementedException (); }
68 public override HttpCookieMode CookieMode {
69 //get { return w.CookieMode; }
70 get { throw new NotImplementedException (); }
73 public override int Count {
74 get { return w.Count; }
77 public override bool IsCookieless {
78 get { return w.IsCookieless; }
81 public override bool IsNewSession {
82 get { return w.IsNewSession; }
85 public override bool IsReadOnly {
86 get { return w.IsReadOnly; }
89 public override bool IsSynchronized {
90 get { return w.IsSynchronized; }
93 public override object this [int index] {
94 get { return w [index]; }
95 set { w [index] = value; }
98 public override object this [string name] {
99 get { return w [name]; }
100 set { w [name] = value; }
103 public override NameObjectCollectionBase.KeysCollection Keys {
104 get { return w.Keys; }
107 public override int LCID {
108 get { return w.LCID; }
109 set { w.LCID = value; }
112 public override SessionStateMode Mode {
113 get { return w.Mode; }
116 public override string SessionID {
117 get { return w.SessionID; }
120 public override HttpStaticObjectsCollectionBase StaticObjects {
121 get { throw new NotImplementedException (); }
124 public override object SyncRoot {
125 get { return w.SyncRoot; }
128 public override int Timeout {
129 get { return w.Timeout; }
130 set { w.Timeout = value; }
133 public override void Abandon ()
138 public override void Add (string name, object value)
143 public override void Clear ()
148 public override void CopyTo (Array array, int index)
150 w.CopyTo (array, index);
153 public override IEnumerator GetEnumerator ()
155 return w.GetEnumerator ();
158 public override void Remove (string name)
163 public override void RemoveAll ()
168 public override void RemoveAt (int index)