From af60097c8a5d8d45319bfc405a1a01cbcea502fa Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Tue, 2 Apr 2024 10:20:28 +0200 Subject: [PATCH] Add [SupportedOSPlatform] to the HealthChecks.System.approved.txt --- .../HealthChecks.System.approved.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/HealthChecks.System.Tests/HealthChecks.System.approved.txt b/test/HealthChecks.System.Tests/HealthChecks.System.approved.txt index 52b1fee702..6e87ad8c67 100644 --- a/test/HealthChecks.System.Tests/HealthChecks.System.approved.txt +++ b/test/HealthChecks.System.Tests/HealthChecks.System.approved.txt @@ -56,6 +56,7 @@ namespace HealthChecks.System public ProcessHealthCheck(string processName, System.Func predicate) { } public System.Threading.Tasks.Task CheckHealthAsync(Microsoft.Extensions.Diagnostics.HealthChecks.HealthCheckContext context, System.Threading.CancellationToken cancellationToken = default) { } } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] public class WindowsServiceHealthCheck : Microsoft.Extensions.Diagnostics.HealthChecks.IHealthCheck { public WindowsServiceHealthCheck(string serviceName, System.Func predicate, string? machineName = null) { } @@ -74,7 +75,8 @@ namespace Microsoft.Extensions.DependencyInjection public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddProcessAllocatedMemoryHealthCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, int maximumMegabytesAllocated, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddProcessHealthCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string processName, System.Func predicate, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddVirtualMemorySizeHealthCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, long maximumMemoryBytes, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } + [System.Runtime.Versioning.SupportedOSPlatform("windows")] public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddWindowsServiceHealthCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, string serviceName, System.Func predicate, string? machineName = null, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } public static Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder AddWorkingSetHealthCheck(this Microsoft.Extensions.DependencyInjection.IHealthChecksBuilder builder, long maximumMemoryBytes, string? name = null, Microsoft.Extensions.Diagnostics.HealthChecks.HealthStatus? failureStatus = default, System.Collections.Generic.IEnumerable? tags = null, System.TimeSpan? timeout = default) { } } -} \ No newline at end of file +}