C# Class PHP.Core.PhpConfigurationContext

Configuration context used when loading configuration from XML files.
Mostra file Open project: jadu/Phalanger Class Usage Examples

Private Properties

Property Type Description
LoadLibrariesNoLock void
LoadLibrary bool
ParseSection void
PhpConfigurationContext System
PhpConfigurationContext System
ValidateNoLock void

Public Methods

Method Description
EnsureApplicationConfig ( XmlNode node ) : void

Ensures that the configuration is stated on at least application level since it cannot be used in sub-application one.

EnsureMachineConfig ( XmlNode node ) : void

Ensures that the configuration is stated on the machine level.

GetSealingLocation ( string name ) : string

Gets a virtual path to configuration file where a specified option has been sealed.

IsMachineConfig ( ) : bool

Checks whether the context is associated with the Machine.config file.

IsOptionSealed ( string name ) : bool

Checks whether a specified option ha been sealed.

IsSubApplicationConfig ( ) : bool

Checks whether the context is associated with Web.config file located lower in hierarchy than one on the application level (in the web application virtual directory).

SealOption ( string name ) : void

Makes a specified option sealed (which prevents it to be modified in lower-level Web.config files).

Private Methods

Method Description
LoadLibrariesNoLock ( ) : void

Actually loads libraries specified in librariesList.

LoadLibrary ( string assemblyName, Uri assemblyUrl, string sectionName, XmlNode node ) : bool

Loads a library and adds a new section to the list of sections if available.

ParseSection ( XmlNode node ) : void

Processes library configuration section.

PhpConfigurationContext ( PHP.Core.ApplicationContext applicationContext, string virtualPath ) : System

Creates an empty configuration context used as a root context.

PhpConfigurationContext ( PHP.Core.ApplicationContext applicationContext, string virtualPath, PhpConfigurationContext parent ) : System

Makes a copy (child) of this instance (parent) deeply copying the confgiuration fields.

ValidateNoLock ( ) : void

Finishes and validates the configuration. Creates an array of library configurations and stores it to local and global config records. The first validated configuration is the global one, local ones follows in the order in which the respective libraries has been loaded.

Method Details

EnsureApplicationConfig() public method

Ensures that the configuration is stated on at least application level since it cannot be used in sub-application one.
We are on sub-application level.
public EnsureApplicationConfig ( XmlNode node ) : void
node System.Xml.XmlNode The node.
return void

EnsureMachineConfig() public method

Ensures that the configuration is stated on the machine level.
We are not on machine level.
public EnsureMachineConfig ( XmlNode node ) : void
node System.Xml.XmlNode The node.
return void

GetSealingLocation() public method

Gets a virtual path to configuration file where a specified option has been sealed.
public GetSealingLocation ( string name ) : string
name string A name of the option.
return string

IsMachineConfig() public method

Checks whether the context is associated with the Machine.config file.
public IsMachineConfig ( ) : bool
return bool

IsOptionSealed() public method

Checks whether a specified option ha been sealed.
public IsOptionSealed ( string name ) : bool
name string A name of the option.
return bool

IsSubApplicationConfig() public method

Checks whether the context is associated with Web.config file located lower in hierarchy than one on the application level (in the web application virtual directory).
public IsSubApplicationConfig ( ) : bool
return bool

SealOption() public method

Makes a specified option sealed (which prevents it to be modified in lower-level Web.config files).
public SealOption ( string name ) : void
name string A name of the option.
return void