initial implementation of 'unify request'
[mono.git] / mcs / class / System.Web / System.Web / ProcessModelInfo.cs
index 53fe94d93ba5806e96fb042824df5ad96b8526f2..2afd1f77c7259818b319684a2498d6cd34c6f67b 100644 (file)
@@ -1,14 +1,39 @@
 // \r
-// System.Web.ProcessModelInfo\r
+// System.Web.ProcessModelInfo.cs\r
 //\r
 // Author:\r
 //   Tim Coleman (tim@timcoleman.com)\r
 //\r
 // Copyright (C) Tim Coleman, 2002\r
+// 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
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 \r
-using System;\r
+using System.Security.Permissions;
 \r
 namespace System.Web {\r
+
+       // CAS
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public class ProcessModelInfo {\r
 \r
                #region Fields\r
@@ -26,23 +51,23 @@ namespace System.Web {
                #region Properties\r
 \r
                [MonoTODO ("Retrieve appropriate variables from worker")]\r
+               [AspNetHostingPermission (SecurityAction.Demand, Level = AspNetHostingPermissionLevel.High)]
                public static ProcessInfo GetCurrentProcessInfo ()\r
                {\r
-                       HttpContext httpContext;\r
-                       DateTime startTime;\r
-                       TimeSpan age;\r
-                       int processID;\r
-                       int requestCount;\r
-                       ProcessStatus status;\r
-                       ProcessShutdownReason shutdownReason;\r
-                       int peakMemoryUsed;\r
-\r
-                       httpContext = HttpContext.Current;\r
+                       DateTime startTime = DateTime.Now;\r
+                       TimeSpan age = TimeSpan.Zero;\r
+                       int processID = 0;\r
+                       int requestCount = 0;\r
+                       ProcessStatus status = ProcessStatus.Terminated;\r
+                       ProcessShutdownReason shutdownReason = ProcessShutdownReason.None;\r
+                       int peakMemoryUsed = 0;\r
+\r
                        return new ProcessInfo (startTime, age, processID, requestCount, status, shutdownReason, peakMemoryUsed);\r
                }\r
 \r
                [MonoTODO ("Retrieve process information.")]\r
-               public static ProcessInfo[] GetHistory ()\r
+               [AspNetHostingPermission (SecurityAction.Demand, Level = AspNetHostingPermissionLevel.High)]
+               public static ProcessInfo[] GetHistory (int numRecords)\r
                {\r
                        throw new NotImplementedException ();\r
                }\r