LocalizationServiceCollectionExtensions.AddLocalization 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AddLocalization(IServiceCollection) |
添加应用程序本地化所需的服务。 |
AddLocalization(IServiceCollection, Action<LocalizationOptions>) |
添加应用程序本地化所需的服务。 |
AddLocalization(IServiceCollection)
添加应用程序本地化所需的服务。
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>)
添加应用程序本地化所需的服务。
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>
用于配置 LocalizationOptions 的 Action<T>。
返回
IServiceCollection,以便可以链接其他调用。