| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- /**
- * Namespace: System.Web.Util
- * Class: IISVersionInfo
- *
- * Author: Gaurav Vaish
- * Maintainer: [email protected]
- * Contact: <[email protected]>, <[email protected]>
- * Implementation: yes
- * Status: ??%
- *
- * (C) Gaurav Vaish (2001)
- */
- using System;
- using System.Diagnostics;
- using System.Web;
- namespace System.Web.Util
- {
- //FIXME: This is highly Windows/IIS specific code. What about Apache related stuff?
- internal class IISVersionInfo
- {
- private static string isapiVersion;
- private static string mscoreeVersion;
- private static string systemWebVersion;
- private static readonly object lockObj = null;
- public IISVersionInfo()
- {
- }
-
- internal static string IsapiVersion
- {
- get
- {
- if(isapiVersion==null)
- {
- lock(lockObj)
- {
- // Recheck - another thread may have set the value
- // before entering lock / exiting previous lock
- if(isapiVersion==null)
- {
- //FIXME: What about Apache? What dll/shared-object to be loaded?
- isapiVersion = GetLoadedModuleVersion("aspnet_isapi.dll");
- }
- }
- }
- return isapiVersion;
- }
- }
-
- internal static string ClrVersion
- {
- get
- {
- if(mscoreeVersion==null)
- {
- lock(lockObj)
- {
- if(mscoreeVersion==null)
- {
- mscoreeVersion = GetLoadedModuleVersion("mscorlib.dll");
- }
- }
- }
- return mscoreeVersion;
- }
- }
-
- internal static string SystemWebVersion
- {
- get
- {
- if(systemWebVersion == null)
- {
- lock(lockObj)
- {
- if(systemWebVersion==null)
- {
- systemWebVersion = (FileVersionInfo.GetVersionInfo((typeof(HttpRuntime)).Module.FullyQualifiedName)).FileVersion;
- }
- }
- }
- return systemWebVersion;
- }
- }
-
- [MonoTODO]
- internal static string GetLoadedModuleVersion(string modulename)
- {
- //TODO: Load the version information from the module
- // Needs native calls - which ones, since the module will not be .Net aware
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- internal static string GetLoadedModuleFilename(string modulename)
- {
- throw new NotImplementedException();
- }
- }
- }
|