<appDomainResourceMonitoring > 元素<appDomainResourceMonitoring> Element

針對處理序存留期間,指示執行階段收集處理序中所有應用程式網域的統計資料。Instructs the runtime to collect statistics on all application domains in the process for the life of the process.

<configuration> <configuration>
    <runtime >   <runtime>
     <appDomainResourceMonitoring >    <appDomainResourceMonitoring>



屬性和項目Attributes and Elements

下列各節描述屬性、子項目和父項目。The following sections describe attributes, child elements, and parent elements.


屬性Attribute 描述Description
enabled 必要屬性。Required attribute.

指定執行時間是否收集應用程式域資源監視的統計資料。Specifies whether the runtime collects statistics for application domain resource monitoring.

啟用屬性enabled Attribute

Value 描述Description
true 系統會收集應用程式域資源監視的統計資料。Statistics for application domain resource monitoring are collected.
false 不會收集應用程式域資源監視的統計資料。Statistics for application domain resource monitoring are not collected.

子項目Child Elements


父項目Parent Elements

項目Element 描述Description
configuration 通用語言執行平台和 .NET Framework 應用程式所使用之每個組態檔中的根項目。The root element in every configuration file used by the common language runtime and .NET Framework applications.
runtime 包含有關組件繫結和記憶體回收的資訊。Contains information about assembly binding and garbage collection.


應用程式域資源監視可透過受控應用程式域類別、裝載ICLRAppDomainResourceMonitor介面和 Windows 事件追蹤(ETW)來取得。Application domain resource monitoring is available through the managed application domain class, the hosting ICLRAppDomainResourceMonitor interface, and event tracing for Windows (ETW). 啟用監視時,會針對進程中的所有應用程式域收集統計資料。When monitoring is enabled, statistics are collected for all application domains in the process for the life of the process.

若要從 managed 程式碼啟用監視,請使用 MonitoringIsEnabled 屬性。To enable monitoring from managed code, use the MonitoringIsEnabled property.

此 configuration 元素僅適用于 .NET Framework 4 和更新版本。This configuration element is available only in the .NET Framework 4 and later.


下列範例顯示如何啟用應用程式域資源監視。The following example shows how to enable application domain resource monitoring.

      <appDomainResourceMonitoring enabled="true"/>  

請參閱See also