2 // System.Web.ProcessInfo
\r
5 // Tim Coleman (tim@timcoleman.com)
\r
7 // Copyright (C) Tim Coleman, 2002
\r
8 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 using System.Security.Permissions;
32 namespace System.Web {
\r
35 [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
36 [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
37 public class ProcessInfo {
\r
45 ProcessShutdownReason shutdownReason;
\r
47 ProcessStatus status;
\r
51 #region Constructors
\r
53 public ProcessInfo ()
\r
57 public ProcessInfo (DateTime startTime, TimeSpan age, int processID, int requestCount, ProcessStatus status, ProcessShutdownReason shutdownReason, int peakMemoryUsed)
\r
60 this.peakMemoryUsed = peakMemoryUsed;
\r
61 this.processID = processID;
\r
62 this.requestCount = requestCount;
\r
63 this.shutdownReason = shutdownReason;
\r
64 this.startTime = startTime;
\r
65 this.status = status;
\r
72 public TimeSpan Age {
\r
76 public int PeakMemoryUsed {
\r
77 get { return peakMemoryUsed; }
\r
80 public int ProcessID {
\r
81 get { return processID; }
\r
84 public int RequestCount {
\r
85 get { return requestCount; }
\r
88 public ProcessShutdownReason ShutdownReason {
\r
89 get { return shutdownReason; }
\r
92 public DateTime StartTime {
\r
93 get { return startTime; }
\r
96 public ProcessStatus Status {
\r
97 get { return status; }
\r
100 #endregion // Properties
\r
104 public void SetAll (DateTime startTime, TimeSpan age, int processID, int requestCount, ProcessStatus status, ProcessShutdownReason shutdownReason, int peakMemoryUsed)
\r
107 this.peakMemoryUsed = peakMemoryUsed;
\r
108 this.processID = processID;
\r
109 this.requestCount = requestCount;
\r
110 this.shutdownReason = shutdownReason;
\r
111 this.startTime = startTime;
\r
112 this.status = status;
\r
115 #endregion // Methods
\r