CustomResourceSnapshotExtensions Methods
ClassMethods1 member
Provides extension methods for creating updated
CustomResourceSnapshot values. WithHealthReports(CustomResourceSnapshot, ImmutableArray<HealthReportSnapshot>)Section titled WithHealthReports(CustomResourceSnapshot, ImmutableArray<HealthReportSnapshot>)extensionCustomResourceSnapshot 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
snapshotCustomResourceSnapshotThe resource snapshot to update.healthReportsImmutableArray<HealthReportSnapshot>The health reports to publish for the resource snapshot.Returns
CustomResourceSnapshotA 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.