EncoderServiceCollectionExtensions.AddWebEncoders 方法

定义

重载

AddWebEncoders(IServiceCollection)

HtmlEncoderJavaScriptEncoderUrlEncoder 添加到指定的 services 中。

AddWebEncoders(IServiceCollection, Action<WebEncoderOptions>)

HtmlEncoderJavaScriptEncoderUrlEncoder 添加到指定的 services 中。

AddWebEncoders(IServiceCollection)

Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs

HtmlEncoderJavaScriptEncoderUrlEncoder 添加到指定的 services 中。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddWebEncoders(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebEncoders (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddWebEncoders : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddWebEncoders (services As IServiceCollection) As IServiceCollection

参数

返回

IServiceCollection,以便可以链接其他调用。

适用于

AddWebEncoders(IServiceCollection, Action<WebEncoderOptions>)

Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs
Source:
EncoderServiceCollectionExtensions.cs

HtmlEncoderJavaScriptEncoderUrlEncoder 添加到指定的 services 中。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddWebEncoders(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::WebEncoders::WebEncoderOptions ^> ^ setupAction);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWebEncoders (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.WebEncoders.WebEncoderOptions> setupAction);
static member AddWebEncoders : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.WebEncoders.WebEncoderOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddWebEncoders (services As IServiceCollection, setupAction As Action(Of WebEncoderOptions)) As IServiceCollection

参数

setupAction
Action<WebEncoderOptions>

用于配置所提供的 WebEncoderOptionsAction<T>

返回

IServiceCollection,以便可以链接其他调用。

适用于