Class FileXmlLocalizationProvider

Extends XmlLocalizationProvider with functionality to load resource files.

Inheritance
System.Object
FileXmlLocalizationProvider
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Framework.Localization.XmlResources
Assembly: EPiServer.Framework.AspNet.dll
Version: 11.20.7
Syntax
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

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Finalize()

Releases unmanaged resources and performs other cleanup operations before the FileXmlLocalizationProvider is reclaimed by garbage collection.

Declaration
protected 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.

Overrides
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.

Implements

System.IDisposable

Extension Methods