LocalizationServiceCollectionExtensions.AddLocalization 方法

定义

重载

AddLocalization(IServiceCollection)

添加应用程序本地化所需的服务。

AddLocalization(IServiceCollection, Action<LocalizationOptions>)

添加应用程序本地化所需的服务。

AddLocalization(IServiceCollection)

Source:
LocalizationServiceCollectionExtensions.cs
Source:
LocalizationServiceCollectionExtensions.cs

添加应用程序本地化所需的服务。

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

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

返回

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

适用于

AddLocalization(IServiceCollection, Action<LocalizationOptions>)

Source:
LocalizationServiceCollectionExtensions.cs
Source:
LocalizationServiceCollectionExtensions.cs

添加应用程序本地化所需的服务。

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

参数

services
IServiceCollection

要向其中添加服务的 IServiceCollection

setupAction
Action<LocalizationOptions>

用于配置 LocalizationOptionsAction<T>

返回

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

适用于