CustomResourceSnapshotExtensions Methods
ClassMethods1 member
Provides extension methods for creating updated
CustomResourceSnapshot values. WithHealthReports(CustomResourceSnapshot, ImmutableArray<HealthReportSnapshot>) Section titled WithHealthReports(CustomResourceSnapshot, ImmutableArray<HealthReportSnapshot>)extensionCustom 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) { // ... }}Parameters
snapshotCustomhealthReports ImmutableArray<HealthReportSnapshot> The health reports to publish for the resource snapshot.Returns
CustomResourceSnapshot A copy of snapshot with updated health reports.Exceptions
ArgumentNullExceptionThrown when snapshot is null.Remarks
This method is intended for use with
ResourceNotificationService.PublishUpdateAsync and ResourceNotificationService.PublishUpdateAsync . Updating health reports also recomputes CustomResourceSnapshot.HealthStatus based on the snapshot state.