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