ResilienceHttpClientBuilderExtensions.AddStandardResilienceHandler 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddStandardResilienceHandler(IHttpClientBuilder) |
添加一个标准复原处理程序,该处理程序使用具有默认选项的多个复原策略来发送请求并处理任何暂时性错误。 |
AddStandardResilienceHandler(IHttpClientBuilder, IConfigurationSection) |
添加一个标准复原处理程序,该处理程序使用具有默认选项的多个复原策略来发送请求并处理任何暂时性错误。 |
AddStandardResilienceHandler(IHttpClientBuilder, Action<HttpStandardResilienceOptions>) |
添加一个标准复原处理程序,该处理程序使用具有默认选项的多个复原策略来发送请求并处理任何暂时性错误。 |
AddStandardResilienceHandler(IHttpClientBuilder)
添加一个标准复原处理程序,该处理程序使用具有默认选项的多个复原策略来发送请求并处理任何暂时性错误。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Http::Resilience::IHttpStandardResiliencePipelineBuilder ^ AddStandardResilienceHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder);
public static Microsoft.Extensions.Http.Resilience.IHttpStandardResiliencePipelineBuilder AddStandardResilienceHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder);
static member AddStandardResilienceHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder -> Microsoft.Extensions.Http.Resilience.IHttpStandardResiliencePipelineBuilder
<Extension()>
Public Function AddStandardResilienceHandler (builder As IHttpClientBuilder) As IHttpStandardResiliencePipelineBuilder
参数
- builder
- IHttpClientBuilder
生成器实例。
返回
builder
的值。
注解
复原管道将基于特定于 HttpStandardResilienceOptions HTTP 的选项配置的多个策略与建议的默认值组合在一起。 有关此方法配置的单个复原策略的详细信息,请参阅 HttpStandardResilienceOptions 。
适用于
AddStandardResilienceHandler(IHttpClientBuilder, IConfigurationSection)
添加一个标准复原处理程序,该处理程序使用具有默认选项的多个复原策略来发送请求并处理任何暂时性错误。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Http::Resilience::IHttpStandardResiliencePipelineBuilder ^ AddStandardResilienceHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Microsoft::Extensions::Configuration::IConfigurationSection ^ section);
public static Microsoft.Extensions.Http.Resilience.IHttpStandardResiliencePipelineBuilder AddStandardResilienceHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Microsoft.Extensions.Configuration.IConfigurationSection section);
static member AddStandardResilienceHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Extensions.Http.Resilience.IHttpStandardResiliencePipelineBuilder
<Extension()>
Public Function AddStandardResilienceHandler (builder As IHttpClientBuilder, section As IConfigurationSection) As IHttpStandardResiliencePipelineBuilder
参数
- builder
- IHttpClientBuilder
生成器实例。
- section
- IConfigurationSection
选项将绑定到的节。
返回
builder
的值。
注解
复原管道将基于特定于 HttpStandardResilienceOptions HTTP 的选项配置的多个策略与建议的默认值组合在一起。 有关此方法配置的单个复原策略的详细信息,请参阅 HttpStandardResilienceOptions 。
适用于
AddStandardResilienceHandler(IHttpClientBuilder, Action<HttpStandardResilienceOptions>)
添加一个标准复原处理程序,该处理程序使用具有默认选项的多个复原策略来发送请求并处理任何暂时性错误。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Http::Resilience::IHttpStandardResiliencePipelineBuilder ^ AddStandardResilienceHandler(Microsoft::Extensions::DependencyInjection::IHttpClientBuilder ^ builder, Action<Microsoft::Extensions::Http::Resilience::HttpStandardResilienceOptions ^> ^ configure);
public static Microsoft.Extensions.Http.Resilience.IHttpStandardResiliencePipelineBuilder AddStandardResilienceHandler (this Microsoft.Extensions.DependencyInjection.IHttpClientBuilder builder, Action<Microsoft.Extensions.Http.Resilience.HttpStandardResilienceOptions> configure);
static member AddStandardResilienceHandler : Microsoft.Extensions.DependencyInjection.IHttpClientBuilder * Action<Microsoft.Extensions.Http.Resilience.HttpStandardResilienceOptions> -> Microsoft.Extensions.Http.Resilience.IHttpStandardResiliencePipelineBuilder
<Extension()>
Public Function AddStandardResilienceHandler (builder As IHttpClientBuilder, configure As Action(Of HttpStandardResilienceOptions)) As IHttpStandardResiliencePipelineBuilder
参数
- builder
- IHttpClientBuilder
生成器实例。
- configure
- Action<HttpStandardResilienceOptions>
配置选项的回调。
返回
builder
的值。
注解
复原管道将基于特定于 HttpStandardResilienceOptions HTTP 的选项配置的多个策略与建议的默认值组合在一起。 有关此方法配置的单个复原策略的详细信息,请参阅 HttpStandardResilienceOptions 。