HttpResiliencePipelineBuilderExtensions.SelectPipelineBy 方法

定义

指示基础生成器通过自定义选择器选择管道实例。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Http::Resilience::IHttpResiliencePipelineBuilder ^ SelectPipelineBy(Microsoft::Extensions::Http::Resilience::IHttpResiliencePipelineBuilder ^ builder, Func<IServiceProvider ^, Func<System::Net::Http::HttpRequestMessage ^, System::String ^> ^> ^ selectorFactory);
public static Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder SelectPipelineBy (this Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder builder, Func<IServiceProvider,Func<System.Net.Http.HttpRequestMessage,string>> selectorFactory);
static member SelectPipelineBy : Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder * Func<IServiceProvider, Func<System.Net.Http.HttpRequestMessage, string>> -> Microsoft.Extensions.Http.Resilience.IHttpResiliencePipelineBuilder
<Extension()>
Public Function SelectPipelineBy (builder As IHttpResiliencePipelineBuilder, selectorFactory As Func(Of IServiceProvider, Func(Of HttpRequestMessage, String))) As IHttpResiliencePipelineBuilder

参数

builder
IHttpResiliencePipelineBuilder

生成器实例。

selectorFactory
Func<IServiceProvider,Func<HttpRequestMessage,String>>

返回密钥选择器的工厂。

返回

builder 的值。

注解

管道密钥用于指标和日志,因此不要返回任何敏感值。

适用于