C# Класс PHP.Core.PhpConfigurationContext

Configuration context used when loading configuration from XML files.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
LoadLibrariesNoLock void
LoadLibrary bool
ParseSection void
PhpConfigurationContext System
PhpConfigurationContext System
ValidateNoLock void

Открытые методы

Метод Описание
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).

Приватные методы

Метод Описание
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.

Описание методов

EnsureApplicationConfig() публичный Метод

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.
Результат void

EnsureMachineConfig() публичный Метод

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.
Результат void

GetSealingLocation() публичный Метод

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.
Результат string

IsMachineConfig() публичный Метод

Checks whether the context is associated with the Machine.config file.
public IsMachineConfig ( ) : bool
Результат bool

IsOptionSealed() публичный Метод

Checks whether a specified option ha been sealed.
public IsOptionSealed ( string name ) : bool
name string A name of the option.
Результат bool

IsSubApplicationConfig() публичный Метод

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
Результат bool

SealOption() публичный Метод

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.
Результат void