4using Microsoft.AspNetCore.SignalR.Client;
37 if (retryContext ==
null)
38 throw new ArgumentNullException(nameof(retryContext));
40 if (retryContext.PreviousRetryCount == 0)
async ValueTask< bool > RefreshToken(CancellationToken cancellationToken)
Attempt to refresh the stored Bearer token in Headers.
A IRetryPolicy that attempts to refresh a given apiClient's token on the first disconnect.
TimeSpan? NextRetryDelay(RetryContext retryContext)
async void AttemptTokenRefresh()
Attempt to refresh the apiClients token asynchronously.
readonly ApiClient apiClient
The backing ApiClient.
ApiClientTokenRefreshRetryPolicy(ApiClient apiClient, IRetryPolicy wrappedPolicy)
Initializes a new instance of the ApiClientTokenRefreshRetryPolicy class.
readonly IRetryPolicy wrappedPolicy
The wrapped IRetryPolicy.