diff options
Diffstat (limited to 'mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs | 98 |
1 files changed, 40 insertions, 58 deletions
diff --git a/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs b/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs index 92de7eda54b..2c26cb35822 100644 --- a/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs +++ b/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs @@ -3,11 +3,10 @@ // // Author: // Chris Toshok (toshok@ximian.com) -// Gonzalo Paniagua Javier (gonzalo@ximian.com) // // -// Copyright (C) 2005,2006 Novell, Inc (http://www.novell.com) +// Copyright (C) 2005 Novell, Inc (http://www.novell.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -32,72 +31,68 @@ #if NET_2_0 using System; -using System.Security.Permissions; -using System.Threading; using System.Web.Caching; -using System.Web.Util; namespace System.Web.Hosting { - [AspNetHostingPermission (SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Medium)] - [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.High)] public sealed class HostingEnvironment : MarshalByRefObject { - static bool is_hosted; - static string site_name; - static ApplicationShutdownReason shutdown_reason; - internal static BareApplicationHost Host; - static VirtualPathProvider vpath_provider = (HttpRuntime.AppDomainAppVirtualPath == null) ? null : - new DefaultVirtualPathProvider (); - static int busy_count; - + [MonoTODO] public HostingEnvironment () { - // The documentation says that this is called once per domain by the ApplicationManager and - // then it throws InvalidOperationException whenever called. - throw new InvalidOperationException (); } + [MonoTODO] public static string ApplicationID { - get { return HttpRuntime.AppDomainAppId; } + get { throw new NotImplementedException (); } } + [MonoTODO] public static string ApplicationPhysicalPath { - get { return HttpRuntime.AppDomainAppPath; } + get { throw new NotImplementedException (); } } + [MonoTODO] public static string ApplicationVirtualPath { - get { return HttpRuntime.AppDomainAppVirtualPath; } + get { throw new NotImplementedException (); } } + [MonoTODO] public static Cache Cache { - get { return HttpRuntime.Cache; } + get { throw new NotImplementedException (); } } + [MonoTODO] public static Exception InitializationException { - get { return HttpApplication.InitializationException; } + get { throw new NotImplementedException (); } } + [MonoTODO] public static bool IsHosted { - get { return is_hosted; } + get { throw new NotImplementedException (); } } + [MonoTODO] public static ApplicationShutdownReason ShutdownReason { - get { return shutdown_reason; } + get { throw new NotImplementedException (); } } [MonoTODO] public static string SiteName { - get { return site_name; } + get { throw new NotImplementedException (); } } +#if notyet + [MonoTODO] public static VirtualPathProvider VirtualPathProvider { - get { return vpath_provider; } + get { throw new NotImplementedException (); } } +#endif + [MonoTODO] public static void DecrementBusyCount () { - Interlocked.Decrement (ref busy_count); + throw new NotImplementedException (); } [MonoTODO] @@ -118,56 +113,43 @@ namespace System.Web.Hosting { throw new NotImplementedException (); } + [MonoTODO] public static void IncrementBusyCount () { - Interlocked.Increment (ref busy_count); + throw new NotImplementedException (); } + [MonoTODO] public override object InitializeLifetimeService () { - return null; + throw new NotImplementedException (); } + [MonoTODO] public static void InitiateShutdown () { - HttpRuntime.UnloadAppDomain (); + throw new NotImplementedException (); } + [MonoTODO] public static string MapPath (string virtualPath) { - if (virtualPath == null || virtualPath == "") - throw new ArgumentNullException ("virtualPath"); - - if (UrlUtils.IsRelativeUrl (virtualPath)) { - string msg = String.Format ("The relative virtual path '{0}', is not allowed here.", virtualPath); - throw new ArgumentException (msg); - } - - HttpContext context = HttpContext.Current; - if (context == null) - return null; - - return context.Request.MapPath (virtualPath); + throw new NotImplementedException (); } + [MonoTODO] public static void RegisterObject (IRegisteredObject obj) { - if (obj == null) - throw new ArgumentNullException ("obj"); - Host.RegisterObject (obj, false); + throw new NotImplementedException (); } +#if notyet + [MonoTODO] public static void RegisterVirtualPathProvider (VirtualPathProvider virtualPathProvider) { - if (HttpRuntime.AppDomainAppVirtualPath == null) - throw new InvalidOperationException (); - - if (virtualPathProvider == null) - throw new ArgumentNullException ("virtualPathProvider"); - - virtualPathProvider.SetPrevious (vpath_provider); - vpath_provider = virtualPathProvider; + throw new NotImplementedException (); } +#endif [MonoTODO] public static IDisposable SetCultures (string virtualPath) @@ -181,13 +163,13 @@ namespace System.Web.Hosting { throw new NotImplementedException (); } + [MonoTODO] public static void UnregisterObject (IRegisteredObject obj) { - if (obj == null) - throw new ArgumentNullException ("obj"); - Host.UnregisterObject (obj); + throw new NotImplementedException (); } } + } #endif |