Partilhar via


ResilienceHttpClientBuilderExtensions.AddResilienceHandler Método

Definição

Sobrecargas

AddResilienceHandler(IHttpClientBuilder, String, Action<ResiliencePipelineBuilder<HttpResponseMessage>,ResilienceHandlerContext>)

Adiciona um manipulador de pipeline de resiliência que usa um pipeline de resiliência embutido nomeado.

AddResilienceHandler(IHttpClientBuilder, String, Action<ResiliencePipelineBuilder<HttpResponseMessage>>)

Adiciona um manipulador de pipeline de resiliência que usa um pipeline de resiliência embutido nomeado.

AddResilienceHandler(IHttpClientBuilder, String, Action<ResiliencePipelineBuilder<HttpResponseMessage>,ResilienceHandlerContext>)

Origem:
ResilienceHttpClientBuilderExtensions.Resilience.cs

Adiciona um manipulador de pipeline de resiliência que usa um pipeline de resiliência embutido nomeado.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Http::Resilience::IHttpResiliencePipelineBuilder ^ AddResilienceHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, System::String ^ pipelineName, Action<Polly::ResiliencePipelineBuilder<System::Net::Http::HttpResponseMessage ^> ^, Microsoft::Extensions::Http::Resilience::ResilienceHandlerContext ^> ^ configure);
public static Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder AddResilienceHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, string pipelineName, Action<Polly.ResiliencePipelineBuilder<System.Net.Http.HttpResponseMessage>,Microsoft.Extensions.Http.Resilience.ResilienceHandlerContext> configure);
static member AddResilienceHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * string * Action<Polly.ResiliencePipelineBuilder<System.Net.Http.HttpResponseMessage>, Microsoft.Extensions.Http.Resilience.ResilienceHandlerContext> -> Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder
<Extension()>
Public Function AddResilienceHandler (builder As IHttpClientBuilder, pipelineName As String, configure As Action(Of ResiliencePipelineBuilder(Of HttpResponseMessage), ResilienceHandlerContext)) As IHttpResiliencePipelineBuilder

Parâmetros

builder
IHttpClientBuilder

A instância do construtor.

pipelineName
String

O identificador personalizado para o pipeline de resiliência, usado no nome do pipeline.

configure
Action<ResiliencePipelineBuilder<HttpResponseMessage>,ResilienceHandlerContext>

O retorno de chamada que configura o pipeline.

Retornos

O valor de builder.

Comentários

O nome final do pipeline é a combinação de Name e pipelineName. Use o identificador de nome do pipeline se o cliente HTTP contiver vários manipuladores de resiliência.

Aplica-se a

AddResilienceHandler(IHttpClientBuilder, String, Action<ResiliencePipelineBuilder<HttpResponseMessage>>)

Origem:
ResilienceHttpClientBuilderExtensions.Resilience.cs

Adiciona um manipulador de pipeline de resiliência que usa um pipeline de resiliência embutido nomeado.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Http::Resilience::IHttpResiliencePipelineBuilder ^ AddResilienceHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, System::String ^ pipelineName, Action<Polly::ResiliencePipelineBuilder<System::Net::Http::HttpResponseMessage ^> ^> ^ configure);
public static Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder AddResilienceHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, string pipelineName, Action<Polly.ResiliencePipelineBuilder<System.Net.Http.HttpResponseMessage>> configure);
static member AddResilienceHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * string * Action<Polly.ResiliencePipelineBuilder<System.Net.Http.HttpResponseMessage>> -> Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder
<Extension()>
Public Function AddResilienceHandler (builder As IHttpClientBuilder, pipelineName As String, configure As Action(Of ResiliencePipelineBuilder(Of HttpResponseMessage))) As IHttpResiliencePipelineBuilder

Parâmetros

builder
IHttpClientBuilder

A instância do construtor.

pipelineName
String

O identificador personalizado para o pipeline de resiliência, usado no nome do pipeline.

configure
Action<ResiliencePipelineBuilder<HttpResponseMessage>>

O retorno de chamada que configura o pipeline.

Retornos

O valor de builder.

Comentários

O nome final do pipeline é a combinação de Name e pipelineName. Use o identificador de nome do pipeline se o cliente HTTP contiver vários manipuladores de resiliência.

Aplica-se a