C# Class PHP.Core.PhpConfigurationContext

Configuration context used when loading configuration from XML files.
Afficher le fichier Open project: jadu/Phalanger Class Usage Examples

Private Properties

Свойство Type Description
LoadLibrariesNoLock void
LoadLibrary bool
ParseSection void
PhpConfigurationContext System
PhpConfigurationContext System
ValidateNoLock void

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat void

EnsureMachineConfig() public méthode

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.
Résultat void

GetSealingLocation() public méthode

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.
Résultat string

IsMachineConfig() public méthode

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

IsOptionSealed() public méthode

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

IsSubApplicationConfig() public méthode

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
Résultat bool

SealOption() public méthode

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.
Résultat void