.NET Framework Class Library
AppDomain..::.MonitoringIsEnabled Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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)
Syntax

Visual Basic (Declaration)
Public Shared Property MonitoringIsEnabled As Boolean
    Get
    Set
Visual Basic (Usage)
Dim value As Boolean

value = AppDomain.MonitoringIsEnabled

AppDomain.MonitoringIsEnabled = value
C#
public static bool MonitoringIsEnabled { get; set; }
Visual C++
public:
static property bool MonitoringIsEnabled {
    bool get ();
    void set (bool value);
}
F#
static member MonitoringIsEnabled : bool with get, set

Property Value

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

ExceptionCondition
ArgumentException

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.

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4
See Also

Reference

Page view tracker