HttpClientHedgingResiliencePredicates.IsTransient Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IsTransient(Outcome<HttpResponseMessage>) |
Determines whether an outcome should be treated by hedging as a transient failure. |
IsTransient(Outcome<HttpResponseMessage>, CancellationToken) |
Determines whether an HttpResponseMessage should be treated by hedging as a transient failure. |
IsTransient(Outcome<HttpResponseMessage>)
Determines whether an outcome should be treated by hedging as a transient failure.
public:
static bool IsTransient(Polly::Outcome<System::Net::Http::HttpResponseMessage ^> outcome);
public static bool IsTransient (Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome);
static member IsTransient : Polly.Outcome<System.Net.Http.HttpResponseMessage> -> bool
Public Shared Function IsTransient (outcome As Outcome(Of HttpResponseMessage)) As Boolean
Parameters
- outcome
- Polly.Outcome<HttpResponseMessage>
The outcome of the user-specified callback.
Returns
true
if outcome is transient, false
if not.
Applies to
IsTransient(Outcome<HttpResponseMessage>, CancellationToken)
Determines whether an HttpResponseMessage should be treated by hedging as a transient failure.
public:
static bool IsTransient(Polly::Outcome<System::Net::Http::HttpResponseMessage ^> outcome, System::Threading::CancellationToken cancellationToken);
public static bool IsTransient (Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome, System.Threading.CancellationToken cancellationToken);
[System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public static bool IsTransient (Polly.Outcome<System.Net.Http.HttpResponseMessage> outcome, System.Threading.CancellationToken cancellationToken);
static member IsTransient : Polly.Outcome<System.Net.Http.HttpResponseMessage> * System.Threading.CancellationToken -> bool
[<System.Diagnostics.CodeAnalysis.Experimental("EXTEXP0001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
static member IsTransient : Polly.Outcome<System.Net.Http.HttpResponseMessage> * System.Threading.CancellationToken -> bool
Public Shared Function IsTransient (outcome As Outcome(Of HttpResponseMessage), cancellationToken As CancellationToken) As Boolean
Parameters
- outcome
- Polly.Outcome<HttpResponseMessage>
The outcome of the user-specified callback.
- cancellationToken
- CancellationToken
The CancellationToken associated with the execution.
Returns
true
if outcome is transient, false
if not.
- Attributes
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for