Class ConfigSourceReplacer
Class that includes configSource-Files into the webConfig in the memory
Inheritance
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.Configuration.dll
Version: 8.11.0Syntax
public class ConfigSourceReplacer
Constructors
ConfigSourceReplacer(String)
Constructor that takes the path to web.config
Declaration
public ConfigSourceReplacer(string WebConfigPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | WebConfigPath | Path to web.config |
ConfigSourceReplacer(String, String)
Constructor that takes the path to web.config and a document containing the web.config content
Declaration
public ConfigSourceReplacer(string WebConfigPath, string WebConfigContent)
Parameters
Type | Name | Description |
---|---|---|
System.String | WebConfigPath | Path to web.config |
System.String | WebConfigContent | The web.config document |
Remarks
This constructor can be used when the web.config has been configurated in memory before calling this class
Properties
WebConfig
Declaration
public XmlDocument WebConfig { get; }
Property Value
Type | Description |
---|---|
System.Xml.XmlDocument |
Methods
LoadConfigSourceFiles()
Load all configSource-files into the webconfig file in the memory
Declaration
public void LoadConfigSourceFiles()
RemoveConfigSourceAttributes()
Removes the ConfigSource attributes from the configuration file.
Declaration
public void RemoveConfigSourceAttributes()
Remarks
If this method has been run, the SaveConfigSourceFiles method will save one big config file on disc and all configSource files will be removed.
SaveConfigSourceFiles()
Saves all external configuration files (refered from web.config) and set web.config to point at these files
Declaration
public void SaveConfigSourceFiles()
Events
ConfigSourceIncluded
Event gets trigged when a configSource-file is found in webConfig
Declaration
public event EventHandler<ConfigSourceIncludedEventArgs> ConfigSourceIncluded
Event Type
Type | Description |
---|---|
System.EventHandler<ConfigSourceIncludedEventArgs> |