Share via


AppResourceGroupInfoWatcherEventArgs.AppDiagnosticInfos Property

Definition

Gets diagnostic info for the resource group.

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)

Property Value

The diagnostic info for the apps associated with the AppResourceGroupInfo for the current event.

Windows requirements

App capabilities
appDiagnostics

Examples

// 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);
    }
}

Remarks

Typically there will only be one app associated with the AppResourceGroupInfo, but there can be more.

Applies to