AppDomain.MonitoringIsEnabled Property

Definition

Gets or sets a value that indicates whether CPU and memory monitoring of application domains is enabled for the current process. Once monitoring is enabled for a process, it cannot be disabled.

public:
 static property bool MonitoringIsEnabled { bool get(); void set(bool value); };
public static bool MonitoringIsEnabled { get; set; }
[get: System.Security.SecurityCritical]
[set: System.Security.SecurityCritical]
public static bool MonitoringIsEnabled { get; set; }
member this.MonitoringIsEnabled : bool with get, set
[<get: System.Security.SecurityCritical>]
[<set: System.Security.SecurityCritical>]
member this.MonitoringIsEnabled : bool with get, set
Public Shared Property MonitoringIsEnabled As Boolean

Property Value

Boolean

true if monitoring is enabled; otherwise false.

Attributes

Exceptions

The current process attempted to assign the value false to this property.

Remarks

This static property (Shared property in Visual Basic) controls CPU and memory monitoring of all the application domains in the process.

If you attempt to set this property to false, a ArgumentException exception is thrown, even if the current value of the property is false.

Once monitoring is enabled, you can use the MonitoringSurvivedMemorySize, MonitoringSurvivedProcessMemorySize, MonitoringTotalAllocatedMemorySize, and MonitoringTotalProcessorTime instance properties to monitor CPU and memory use of individual application domains.

Applies to

See also