HostingEnvironment.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. //
  2. // System.Web.Hosting.HostingEnvironment.cs
  3. //
  4. // Author:
  5. // Chris Toshok ([email protected])
  6. // Gonzalo Paniagua Javier ([email protected])
  7. //
  8. //
  9. // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
  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. #if NET_2_0
  31. using System;
  32. using System.Web.Caching;
  33. namespace System.Web.Hosting {
  34. public sealed class HostingEnvironment : MarshalByRefObject
  35. {
  36. public HostingEnvironment ()
  37. {
  38. }
  39. public static string ApplicationID {
  40. get { return HttpRuntime.AppDomainAppId; }
  41. }
  42. public static string ApplicationPhysicalPath {
  43. get { return HttpRuntime.AppDomainAppPath; }
  44. }
  45. public static string ApplicationVirtualPath {
  46. get { return HttpRuntime.AppDomainAppVirtualPath; }
  47. }
  48. public static Cache Cache {
  49. get { return HttpRuntime.Cache; }
  50. }
  51. [MonoTODO]
  52. public static Exception InitializationException {
  53. get { throw new NotImplementedException (); }
  54. }
  55. [MonoTODO] // 'true' if this is inside an ApplicationManager
  56. public static bool IsHosted {
  57. get { throw new NotImplementedException (); }
  58. }
  59. [MonoTODO]
  60. public static ApplicationShutdownReason ShutdownReason {
  61. get { throw new NotImplementedException (); }
  62. }
  63. [MonoTODO]
  64. public static string SiteName {
  65. get { throw new NotImplementedException (); }
  66. }
  67. [MonoTODO]
  68. public static VirtualPathProvider VirtualPathProvider {
  69. get { throw new NotImplementedException (); }
  70. }
  71. [MonoTODO]
  72. public static void DecrementBusyCount ()
  73. {
  74. throw new NotImplementedException ();
  75. }
  76. [MonoTODO]
  77. public static IDisposable Impersonate ()
  78. {
  79. throw new NotImplementedException ();
  80. }
  81. [MonoTODO]
  82. public static IDisposable Impersonate (IntPtr token)
  83. {
  84. throw new NotImplementedException ();
  85. }
  86. [MonoTODO]
  87. public static IDisposable Impersonate (IntPtr userToken, string virtualPath)
  88. {
  89. throw new NotImplementedException ();
  90. }
  91. [MonoTODO]
  92. public static void IncrementBusyCount ()
  93. {
  94. throw new NotImplementedException ();
  95. }
  96. [MonoTODO]
  97. public override object InitializeLifetimeService ()
  98. {
  99. throw new NotImplementedException ();
  100. }
  101. [MonoTODO]
  102. public static void InitiateShutdown ()
  103. {
  104. throw new NotImplementedException ();
  105. }
  106. [MonoTODO]
  107. public static string MapPath (string virtualPath)
  108. {
  109. throw new NotImplementedException ();
  110. }
  111. [MonoTODO]
  112. public static void RegisterObject (IRegisteredObject obj)
  113. {
  114. throw new NotImplementedException ();
  115. }
  116. [MonoTODO]
  117. public static void RegisterVirtualPathProvider (VirtualPathProvider virtualPathProvider)
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. [MonoTODO]
  122. public static IDisposable SetCultures (string virtualPath)
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. [MonoTODO]
  127. public static IDisposable SetCultures ()
  128. {
  129. throw new NotImplementedException ();
  130. }
  131. [MonoTODO]
  132. public static void UnregisterObject (IRegisteredObject obj)
  133. {
  134. throw new NotImplementedException ();
  135. }
  136. }
  137. }
  138. #endif