Skip to content
Docs Try Aspire
Docs Try

CustomResourceSnapshotExtensions Methods

Class Methods 1 member
Provides extension methods for creating updated CustomResourceSnapshot values.
WithHealthReports(CustomResourceSnapshot, ImmutableArray<HealthReportSnapshot>) Section titled WithHealthReports(CustomResourceSnapshot, ImmutableArray<HealthReportSnapshot>) extension CustomResourceSnapshot
Creates a copy of the resource snapshot with the specified health reports.
public static class CustomResourceSnapshotExtensions
{
public static CustomResourceSnapshot WithHealthReports(
this CustomResourceSnapshot snapshot,
ImmutableArray<HealthReportSnapshot> healthReports)
{
// ...
}
}
snapshot CustomResourceSnapshot The resource snapshot to update.
healthReports ImmutableArray<HealthReportSnapshot> The health reports to publish for the resource snapshot.
CustomResourceSnapshot A copy of snapshot with updated health reports.
ArgumentNullException Thrown when snapshot is null.
This method is intended for use with ResourceNotificationService.PublishUpdateAsync and ResourceNotificationService.PublishUpdateAsync. Updating health reports also recomputes CustomResourceSnapshot.HealthStatus based on the snapshot state.