10 references to GetPolicyExecutionContext
Microsoft.Extensions.Http.Polly (1)
PolicyHttpMessageHandler.cs (1)
119
var context = request.
GetPolicyExecutionContext
();
Microsoft.Extensions.Http.Polly.Tests (9)
HttpRequestMessageExtensionsTest.cs (3)
25
var actual = request.
GetPolicyExecutionContext
();
38
var actual = request.
GetPolicyExecutionContext
();
56
var actual = request.
GetPolicyExecutionContext
();
PolicyHttpMessageHandlerTest.cs (6)
284
Assert.Same(context, req.
GetPolicyExecutionContext
());
295
Assert.Null(request.
GetPolicyExecutionContext
()); // We clean up the context if it was generated by the handler rather than caller supplied.
314
Assert.Same(c, req.
GetPolicyExecutionContext
());
326
Assert.Same(expectedContext, request.
GetPolicyExecutionContext
()); // We don't clean up the context if the caller or earlier delegating handlers had supplied it.
348
Assert.Null(request.
GetPolicyExecutionContext
()); // We do clean up a context we generated, when the policy selector throws.
375
Assert.Null(request.
GetPolicyExecutionContext
()); // We do clean up a context we generated, when the execution throws.