From c65072d25828339715ef40d6a11c7081c8301f65 Mon Sep 17 00:00:00 2001 From: Gaurav Vaish Date: Sat, 16 Mar 2002 00:33:53 +0000 Subject: [PATCH 1/1] 2002-03-16 Gaurav Vaish * Stubbed some methods: FormatResourceString(...) in compliance with several forms of String.Format(...) available. svn path=/trunk/mcs/; revision=3137 --- .../System.Web/System.Web/HttpRuntime.cs | 97 +++++++++++-------- 1 file changed, 56 insertions(+), 41 deletions(-) diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs index 167a65d94a6..4dcf4621a67 100644 --- a/mcs/class/System.Web/System.Web/HttpRuntime.cs +++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs @@ -1,11 +1,11 @@ /** * Namespace: System.Web * Class: HttpRuntime - * + * * Author: Gaurav Vaish * Contact: * Status: ?% - * + * * (C) Gaurav Vaish (2001) */ @@ -25,14 +25,14 @@ namespace System.Web private static bool initialized; private static string installDir; private static HttpRuntime runtime; - + /// /// Loading of ISAPI /// private static bool isapiLoaded; - + private Cache cache; - + // Security permission helper objects private static IStackWalk appPathDiscoveryStackWalk; private static IStackWalk ctrlPrincipalStackWalk; @@ -40,14 +40,14 @@ namespace System.Web private static IStackWalk unmgdCodeStackWalk; private static IStackWalk unrestrictedStackWalk; private static IStackWalk reflectionStackWalk; - + private string appDomainAppPath; private string appDomainAppVirtualPath; - + private FileChangesMonitor fcm; - + private Exception initErrorException; - + static HttpRuntime() { autogenKeys = new byte[88]; @@ -59,14 +59,14 @@ namespace System.Web sensitiveInfoStackWalk = null; unmgdCodeStackWalk = null; unrestrictedStackWalk = null; - + if(!DesignTimeParseData.InDesigner) Initialize(); runtime = new HttpRuntime(); if(!DesignTimeParseData.InDesigner) runtime.Init(); } - + //FIXME: IIS specific code. Need information on what to do for Apache? internal static void Initialize() { @@ -115,7 +115,7 @@ namespace System.Web initialized = true; } } - + [MonoTODO("Init")] private void Init() { @@ -136,12 +136,11 @@ namespace System.Web } } - [MonoTODO("FormatResourceString(string, string, string)")] - internal static string FormatResourceString(string key, string arg0, string type) + internal static string FormatResourceString(string key) { - throw new NotImplementedException(); + return GetResourceString(key); } - + internal static string FormatResourceString(string key, string arg0) { string format = GetResourceString(key); @@ -149,23 +148,39 @@ namespace System.Web return null; return String.Format(format, arg0); } - - internal static string FormatResourceString(string key) + + [MonoTODO("FormatResourceString(string, string, string)")] + internal static string FormatResourceString(string key, string arg0, string type) { - return GetResourceString(key); + // String.Format(string, object, object); + throw new NotImplementedException(); + } + + [MonoTODO("FormatResourceString(string, string, string, string)")] + internal static string FormatResourceString(string key, string arg0, string arg1, string arg2) + { + // String.Format(string, object, object, object); + throw new NotImplementedException(); } - + + [MonoTODO("FormatResourceString(string, string[]")] + internal static string FormatResourceString(string key, string[] args) + { + // String.Format(string, object[]); + throw new NotImplementedException(); + } + private static string GetResourceString(string key) { return runtime.GetResourceStringFromResourceManager(key); } - + [MonoTODO("GetResourceStringFromResourceManager(string)")] private string GetResourceStringFromResourceManager(string key) { throw new NotImplementedException(); } - + public static Cache Cache { get @@ -173,7 +188,7 @@ namespace System.Web return runtime.cache; } } - + [MonoTODO] public static string AppDomainAppId { @@ -182,7 +197,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string AppDomainAppPath { @@ -191,7 +206,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string AppDomainAppVirtualPath { @@ -200,7 +215,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string AppDomainId { @@ -209,7 +224,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string AspInstallDirectory { @@ -218,7 +233,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string BinDirectory { @@ -227,7 +242,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string ClrInstallDirectory { @@ -236,7 +251,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string CodegenDir { @@ -245,7 +260,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static bool IsOnUNCShare { @@ -254,7 +269,7 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static string MachineConfigurationDirectory { @@ -263,13 +278,13 @@ namespace System.Web throw new NotImplementedException(); } } - + [MonoTODO] public static void Close() { throw new NotImplementedException(); } - + internal static IStackWalk AppPathDiscovery { get @@ -281,7 +296,7 @@ namespace System.Web return appPathDiscoveryStackWalk; } } - + internal static IStackWalk ControlPrincipal { get @@ -293,7 +308,7 @@ namespace System.Web return ctrlPrincipalStackWalk; } } - + internal static IStackWalk Reflection { get @@ -305,7 +320,7 @@ namespace System.Web return reflectionStackWalk; } } - + internal static IStackWalk SensitiveInformation { get @@ -317,7 +332,7 @@ namespace System.Web return sensitiveInfoStackWalk; } } - + internal static IStackWalk UnmanagedCode { get @@ -329,7 +344,7 @@ namespace System.Web return unmgdCodeStackWalk; } } - + internal static IStackWalk Unrestricted { get @@ -341,12 +356,12 @@ namespace System.Web return unrestrictedStackWalk; } } - + internal static IStackWalk FileReadAccess(string file) { return new FileIOPermission(FileIOPermissionAccess.Read, file); } - + internal static IStackWalk PathDiscoveryAccess(string path) { return new FileIOPermission(FileIOPermissionAccess.PathDiscovery, path); -- 2.25.1