Class LocalizationProviderBuilder
Used to configure and build a LocalizationProvider.
Inheritance
System.Object
    LocalizationProviderBuilder
  Namespace: EPiServer.Framework.Localization
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public class LocalizationProviderBuilder : ObjectConstructors
LocalizationProviderBuilder(String, Type)
Initializes a new instance of the LocalizationProviderBuilder class.
Declaration
public LocalizationProviderBuilder(string name, Type providerType)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | |
| System.Type | providerType | 
Properties
Name
Gets the name of the LocalizationProvider.
Declaration
public string Name { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
ProviderType
Gets the type of the LocalizationProvider.
Declaration
public Type ProviderType { get; }Property Value
| Type | Description | 
|---|---|
| System.Type | 
Methods
Build(IServiceProvider)
Builds a new LocalizationProvider instance.
Declaration
public LocalizationProvider Build(IServiceProvider serviceProvider)Parameters
| Type | Name | Description | 
|---|---|---|
| System.IServiceProvider | serviceProvider | The service locatprovideror used to create provider instances. | 
Returns
| Type | Description | 
|---|---|
| LocalizationProvider | A new LocalizationProvider instance. | 
Configure<TProviderOptions>(Action<TProviderOptions>)
Adds a configuration of the provider.
Declaration
public LocalizationProviderBuilder Configure<TProviderOptions>(Action<TProviderOptions> configure)
    where TProviderOptions : class, new()Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<TProviderOptions> | configure | 
Returns
| Type | Description | 
|---|---|
| LocalizationProviderBuilder | 
Type Parameters
| Name | Description | 
|---|---|
| TProviderOptions | 
Create<TProvider>(String)
Factory method for creating a new LocalizationProviderBuilder instance.
Declaration
public static LocalizationProviderBuilder Create<TProvider>(string name = null)
    where TProvider : LocalizationProviderParameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The name of the localization provider. | 
Returns
| Type | Description | 
|---|---|
| LocalizationProviderBuilder | A new LocalizationProviderBuilder instance. | 
Type Parameters
| Name | Description | 
|---|---|
| TProvider | Type of the provider instance. Must implement LocalizationProvider. | 
Remarks
If no name is provided, the provider will be assigned a randomly generated name
