共用方式為


PolicyHttpMessageHandler 建構函式

定義

多載

PolicyHttpMessageHandler(IAsyncPolicy<HttpResponseMessage>)

建立新的 PolicyHttpMessageHandler

PolicyHttpMessageHandler(Func<HttpRequestMessage,IAsyncPolicy<HttpResponseMessage>>)

建立新的 PolicyHttpMessageHandler

PolicyHttpMessageHandler(IAsyncPolicy<HttpResponseMessage>)

建立新的 PolicyHttpMessageHandler

public:
 PolicyHttpMessageHandler(Polly::IAsyncPolicy<System::Net::Http::HttpResponseMessage ^> ^ policy);
public PolicyHttpMessageHandler (Polly.IAsyncPolicy<System.Net.Http.HttpResponseMessage> policy);
new Microsoft.Extensions.Http.PolicyHttpMessageHandler : Polly.IAsyncPolicy<System.Net.Http.HttpResponseMessage> -> Microsoft.Extensions.Http.PolicyHttpMessageHandler
Public Sub New (policy As IAsyncPolicy(Of HttpResponseMessage))

參數

policy
IAsyncPolicy<HttpResponseMessage>

原則。

適用於

PolicyHttpMessageHandler(Func<HttpRequestMessage,IAsyncPolicy<HttpResponseMessage>>)

建立新的 PolicyHttpMessageHandler

public:
 PolicyHttpMessageHandler(Func<System::Net::Http::HttpRequestMessage ^, Polly::IAsyncPolicy<System::Net::Http::HttpResponseMessage ^> ^> ^ policySelector);
public PolicyHttpMessageHandler (Func<System.Net.Http.HttpRequestMessage,Polly.IAsyncPolicy<System.Net.Http.HttpResponseMessage>> policySelector);
new Microsoft.Extensions.Http.PolicyHttpMessageHandler : Func<System.Net.Http.HttpRequestMessage, Polly.IAsyncPolicy<System.Net.Http.HttpResponseMessage>> -> Microsoft.Extensions.Http.PolicyHttpMessageHandler
Public Sub New (policySelector As Func(Of HttpRequestMessage, IAsyncPolicy(Of HttpResponseMessage)))

參數

policySelector
Func<HttpRequestMessage,IAsyncPolicy<HttpResponseMessage>>

可以為指定的 HttpRequestMessage 選取所需原則的函式。

適用於