Merge pull request #4540 from kumpera/android-changes-part1
[mono.git] / mcs / class / System.Web / System.Web.SessionState_2.0 / HttpSessionState.cs
index 9e65355d77e7e1d5af93966527124728e31eaf01..f2b6e54b8e7b83ba8294de642d2466ce807707da 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
 using System.Collections;
 using System.Collections.Specialized;
 using System.Security.Permissions;
+using System.Web;
 
 namespace System.Web.SessionState {
 
@@ -57,6 +57,15 @@ public sealed class HttpSessionState : ICollection, IEnumerable
                get { return this; }
        }
 
+       public HttpCookieMode CookieMode {
+               get {
+                       if (IsCookieless)
+                               return HttpCookieMode.UseUri;
+                       else
+                               return HttpCookieMode.UseCookies;
+               }
+       }
+
        public int Count {
                get { return container.Count; }
        }
@@ -77,9 +86,9 @@ public sealed class HttpSessionState : ICollection, IEnumerable
                get { return container.IsSynchronized; }
        }
 
-       public object this [string key] {
-               get { return container [key]; }
-               set { container [key] = value; }
+       public object this [string name] {
+               get { return container [name]; }
+               set { container [name] = value; }
        }
 
        public object this [int index] {
@@ -158,4 +167,3 @@ public sealed class HttpSessionState : ICollection, IEnumerable
        }
 }
 }
-#endif