Beispiel #1
0
            public async Task <VostokHealthCheckResult> CheckAsync(CancellationToken cancellationToken)
            {
                var microsoftContext = new MicrosoftHealthCheckContext
                {
                    Registration = registration
                };

                var microsoftResult = await check.CheckHealthAsync(microsoftContext, cancellationToken).ConfigureAwait(false);

                return(new VostokHealthCheckResult(
                           ConvertStatus(microsoftResult.Status),
                           ConvertReason(microsoftResult)));
            }
Beispiel #2
0
            public async Task <MicrosoftHealthCheckResult> CheckHealthAsync(MicrosoftHealthCheckContext context, CancellationToken cancellationToken = new CancellationToken())
            {
                var result = await check.CheckSafeAsync(cancellationToken).ConfigureAwait(false);

                return(new MicrosoftHealthCheckResult(ConvertStatus(result.Status), result.Reason));
            }