2002-03-16 Gaurav Vaish <gvaish@iitk.ac.in>
authorGaurav Vaish <gvaish@mono-cvs.ximian.com>
Sat, 16 Mar 2002 00:33:53 +0000 (00:33 -0000)
committerGaurav Vaish <gvaish@mono-cvs.ximian.com>
Sat, 16 Mar 2002 00:33:53 +0000 (00:33 -0000)
* Stubbed some methods: FormatResourceString(...) in compliance with
    several forms of String.Format(...) available.

svn path=/trunk/mcs/; revision=3137

mcs/class/System.Web/System.Web/HttpRuntime.cs

index 167a65d94a6f32176f68d28a1c212c35dd1e7f8d..4dcf4621a675e11191b1407d88b8830166d1a632 100644 (file)
@@ -1,11 +1,11 @@
 /**\r
  * Namespace: System.Web\r
  * Class:     HttpRuntime\r
- * \r
+ *\r
  * Author:  Gaurav Vaish\r
  * Contact: <gvaish@iitk.ac.in>\r
  * Status:  ?%\r
- * \r
+ *\r
  * (C) Gaurav Vaish (2001)\r
  */\r
 \r
@@ -25,14 +25,14 @@ namespace System.Web
                private static bool        initialized;\r
                private static string      installDir;\r
                private static HttpRuntime runtime;\r
-               \r
+\r
                /// <summary>\r
                /// Loading of ISAPI\r
                /// </summary>\r
                private static bool        isapiLoaded;\r
-               \r
+\r
                private Cache cache;\r
-               \r
+\r
                // Security permission helper objects\r
                private static IStackWalk appPathDiscoveryStackWalk;\r
                private static IStackWalk ctrlPrincipalStackWalk;\r
@@ -40,14 +40,14 @@ namespace System.Web
                private static IStackWalk unmgdCodeStackWalk;\r
                private static IStackWalk unrestrictedStackWalk;\r
                private static IStackWalk reflectionStackWalk;\r
-                               \r
+\r
                private string appDomainAppPath;\r
                private string appDomainAppVirtualPath;\r
-               \r
+\r
                private FileChangesMonitor fcm;\r
-               \r
+\r
                private Exception initErrorException;\r
-               \r
+\r
                static HttpRuntime()\r
                {\r
                        autogenKeys = new byte[88];\r
@@ -59,14 +59,14 @@ namespace System.Web
                        sensitiveInfoStackWalk    = null;\r
                        unmgdCodeStackWalk        = null;\r
                        unrestrictedStackWalk     = null;\r
-                       \r
+\r
                        if(!DesignTimeParseData.InDesigner)\r
                                Initialize();\r
                        runtime     = new HttpRuntime();\r
                        if(!DesignTimeParseData.InDesigner)\r
                                runtime.Init();\r
                }\r
-               \r
+\r
                //FIXME: IIS specific code. Need information on what to do for Apache?\r
                internal static void Initialize()\r
                {\r
@@ -115,7 +115,7 @@ namespace System.Web
                                initialized = true;\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO("Init")]\r
                private void Init()\r
                {\r
@@ -136,12 +136,11 @@ namespace System.Web
                        }\r
                }\r
 \r
-               [MonoTODO("FormatResourceString(string, string, string)")]\r
-               internal static string FormatResourceString(string key, string arg0, string type)\r
+               internal static string FormatResourceString(string key)\r
                {\r
-                       throw new NotImplementedException();\r
+                       return GetResourceString(key);\r
                }\r
-               \r
+\r
                internal static string FormatResourceString(string key, string arg0)\r
                {\r
                        string format = GetResourceString(key);\r
@@ -149,23 +148,39 @@ namespace System.Web
                                return null;\r
                        return String.Format(format, arg0);\r
                }\r
-               \r
-               internal static string FormatResourceString(string key)\r
+\r
+               [MonoTODO("FormatResourceString(string, string, string)")]\r
+               internal static string FormatResourceString(string key, string arg0, string type)\r
                {\r
-                       return GetResourceString(key);\r
+                       // String.Format(string, object, object);\r
+                       throw new NotImplementedException();\r
+               }\r
+\r
+               [MonoTODO("FormatResourceString(string, string, string, string)")]\r
+               internal static string FormatResourceString(string key, string arg0, string arg1, string arg2)\r
+               {\r
+                       // String.Format(string, object, object, object);\r
+                       throw new NotImplementedException();\r
                }\r
-               \r
+\r
+               [MonoTODO("FormatResourceString(string, string[]")]\r
+               internal static string FormatResourceString(string key, string[] args)\r
+               {\r
+                       // String.Format(string, object[]);\r
+                       throw new NotImplementedException();\r
+               }\r
+\r
                private static string GetResourceString(string key)\r
                {\r
                        return runtime.GetResourceStringFromResourceManager(key);\r
                }\r
-               \r
+\r
                [MonoTODO("GetResourceStringFromResourceManager(string)")]\r
                private string GetResourceStringFromResourceManager(string key)\r
                {\r
                        throw new NotImplementedException();\r
                }\r
-               \r
+\r
                public static Cache Cache\r
                {\r
                        get\r
@@ -173,7 +188,7 @@ namespace System.Web
                                return runtime.cache;\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string AppDomainAppId\r
                {\r
@@ -182,7 +197,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string AppDomainAppPath\r
                {\r
@@ -191,7 +206,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string AppDomainAppVirtualPath\r
                {\r
@@ -200,7 +215,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string AppDomainId\r
                {\r
@@ -209,7 +224,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string AspInstallDirectory\r
                {\r
@@ -218,7 +233,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string BinDirectory\r
                {\r
@@ -227,7 +242,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string ClrInstallDirectory\r
                {\r
@@ -236,7 +251,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string CodegenDir\r
                {\r
@@ -245,7 +260,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static bool IsOnUNCShare\r
                {\r
@@ -254,7 +269,7 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static string MachineConfigurationDirectory\r
                {\r
@@ -263,13 +278,13 @@ namespace System.Web
                                throw new NotImplementedException();\r
                        }\r
                }\r
-               \r
+\r
                [MonoTODO]\r
                public static void Close()\r
                {\r
                        throw new NotImplementedException();\r
                }\r
-               \r
+\r
                internal static IStackWalk AppPathDiscovery\r
                {\r
                        get\r
@@ -281,7 +296,7 @@ namespace System.Web
                                return appPathDiscoveryStackWalk;\r
                        }\r
                }\r
-               \r
+\r
                internal static IStackWalk ControlPrincipal\r
                {\r
                        get\r
@@ -293,7 +308,7 @@ namespace System.Web
                                return ctrlPrincipalStackWalk;\r
                        }\r
                }\r
-               \r
+\r
                internal static IStackWalk Reflection\r
                {\r
                        get\r
@@ -305,7 +320,7 @@ namespace System.Web
                                return reflectionStackWalk;\r
                        }\r
                }\r
-               \r
+\r
                internal static IStackWalk SensitiveInformation\r
                {\r
                        get\r
@@ -317,7 +332,7 @@ namespace System.Web
                                return sensitiveInfoStackWalk;\r
                        }\r
                }\r
-               \r
+\r
                internal static IStackWalk UnmanagedCode\r
                {\r
                        get\r
@@ -329,7 +344,7 @@ namespace System.Web
                                return unmgdCodeStackWalk;\r
                        }\r
                }\r
-               \r
+\r
                internal static IStackWalk Unrestricted\r
                {\r
                        get\r
@@ -341,12 +356,12 @@ namespace System.Web
                                return unrestrictedStackWalk;\r
                        }\r
                }\r
-                               \r
+\r
                internal static IStackWalk FileReadAccess(string file)\r
                {\r
                        return new FileIOPermission(FileIOPermissionAccess.Read, file);\r
                }\r
-               \r
+\r
                internal static IStackWalk PathDiscoveryAccess(string path)\r
                {\r
                        return new FileIOPermission(FileIOPermissionAccess.PathDiscovery, path);\r