Class FileXmlLocalizationProvider
Extends XmlLocalizationProvider with functionality to load resource files.
Implements
Inherited Members
Namespace: EPiServer.Framework.Localization.XmlResources
Assembly: EPiServer.Framework.dll
Version: 8.11.0Syntax
public class FileXmlLocalizationProvider : XmlLocalizationProvider, IDisposable
Constructors
FileXmlLocalizationProvider()
Initializes a new instance of the FileXmlLocalizationProvider class.
Declaration
public FileXmlLocalizationProvider()
FileXmlLocalizationProvider(VirtualPathProvider, IFileSystemWatcher, IHostingEnvironment)
Initializes a new instance of the FileXmlLocalizationProvider class.
Declaration
public FileXmlLocalizationProvider(VirtualPathProvider virtualPathProvider, IFileSystemWatcher fileSystemWatcher, IHostingEnvironment hostingEnvironment)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Hosting.VirtualPathProvider | virtualPathProvider | The virtual path provider. |
IFileSystemWatcher | fileSystemWatcher | The file system watcher to use |
IHostingEnvironment | hostingEnvironment | The hosting environment. |
Fields
FileSystemWatchPathKey
The configKey that should be used if provider should set up a FileSystemWatcher for a physical directory path.
Declaration
public static readonly string FileSystemWatchPathKey
Field Value
Type | Description |
---|---|
System.String |
PhysicalPathKey
The configKey that should be used if provider is to be used with a physical folder.
Declaration
public static readonly string PhysicalPathKey
Field Value
Type | Description |
---|---|
System.String |
VirtualPathKey
The configKey that should be used if provider is to be used with a System.Web.Hosting.VirtualPathProvider
Declaration
public static readonly string VirtualPathKey
Field Value
Type | Description |
---|---|
System.String |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
Finalize()
Releases unmanaged resources and performs other cleanup operations before the FileXmlLocalizationProvider is reclaimed by garbage collection.
Declaration
protected override void Finalize()
Initialize(String, NameValueCollection)
Reads the resource xml files from the location specified in config values.
Declaration
public override void Initialize(string name, NameValueCollection config)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The friendly name of the provider. |
System.Collections.Specialized.NameValueCollection | config | A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider. |
Remarks
If the resource files are served by a System.Web.Hosting.VirtualPathProvider then the config value must include key 'virtualPath'. If the resource files are located in a physical folder then the config value must include key 'physicalPath'.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The name of the provider is null. |
System.ArgumentException | The name of the provider has a length of zero. |
System.InvalidOperationException | An attempt is made to call System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection) on a provider after the provider has already been initialized. |
System.Configuration.ConfigurationErrorsException | A required configuration key was missing or faulty. |