Export (0) Print
Expand All

AppDomain.MonitoringIsEnabled Property

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.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static bool MonitoringIsEnabled { get; set; }

Property Value

Type: System.Boolean
true if monitoring is enabled; otherwise false.

ExceptionCondition
ArgumentException

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

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

  • SecurityCriticalAttribute 

    Requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft