Share via


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 关联的应用,但可以有更多应用。

适用于