共用方式為


AppResourceGroupInfoWatcherEventArgs.AppDiagnosticInfos 屬性

定義

取得資源群組的診斷資訊。

public:
 property IVectorView<AppDiagnosticInfo ^> ^ AppDiagnosticInfos { IVectorView<AppDiagnosticInfo ^> ^ get(); };
IVectorView<AppDiagnosticInfo> AppDiagnosticInfos();
public IReadOnlyList<AppDiagnosticInfo> AppDiagnosticInfos { get; }
var iVectorView = appResourceGroupInfoWatcherEventArgs.appDiagnosticInfos;
Public ReadOnly Property AppDiagnosticInfos As IReadOnlyList(Of AppDiagnosticInfo)

屬性值

與目前事件 之 AppResourceGroupInfo 相關聯的應用程式診斷資訊。

Windows 需求

應用程式功能
appDiagnostics

範例

// A resource group has been added to the list in the AppDiagnosticInfo.
private void OnResourceGroupAdded(
    AppResourceGroupInfoWatcher sender, AppResourceGroupInfoWatcherEventArgs args)
{
    // A resource group can be associated with multiple apps. The event args here
    // indicate which apps are part of the watched resource group. Otherwise the
    // app has to keep a map between them.
    if (args.AppDiagnosticInfos.Count > 0)
    {
        Debug.WriteLine("ResourceGroup added for {0}", args.AppDiagnosticInfos[0].AppInfo.DisplayInfo);
    }
}

備註

一般而言,只有一個與 AppResourceGroupInfo相關聯的應用程式,但可能會有更多應用程式。

適用於