C# Class PHP.Core.Configuration

Mostra file Open project: jadu/Phalanger Class Usage Examples

Public Properties

Property Type Description
IsBuildTime bool

Private Properties

Property Type Description
Configuration System
GetPathsNoLoad ApplicationConfiguration.PathsSection
IsValidInCurrentScope bool
LoadDefault void

Public Methods

Method Description
Load ( PHP.Core.ApplicationContext appContext ) : void

Loads configuration and returns configuration record.

Reload ( PHP.Core.ApplicationContext appContext, bool reloadFromFile ) : void

Drops the configuration associated with the current thread and loads a new one. Doesn't reload XML data from file (cached configuration records are reused). The libraries listed in the classLibrary section are therefore not loaded into the context.

The current thread may have been reused to serve a different request with different configuration context. Therefore, the configuration associated with the thread needs to be dropped and a new one to be loaded.

Private Methods

Method Description
Configuration ( PHP.Core.GlobalConfiguration global, PHP.Core.LocalConfiguration defaultLocal ) : System
GetPathsNoLoad ( ) : ApplicationConfiguration.PathsSection

We need the paths during configuration load (e.g. in dynamic wrapper generator).

IsValidInCurrentScope ( XmlNode node ) : bool

Returns whether specified node's scope corresponds to the scope defined by IsBuildTime.

LoadDefault ( ) : void

Loads configuration using default ApplicationContext.

Method Details

Load() public static method

Loads configuration and returns configuration record.
Configuration is invalid or incomplete.
public static Load ( PHP.Core.ApplicationContext appContext ) : void
appContext PHP.Core.ApplicationContext
return void

Reload() public static method

Drops the configuration associated with the current thread and loads a new one. Doesn't reload XML data from file (cached configuration records are reused). The libraries listed in the classLibrary section are therefore not loaded into the context.
The current thread may have been reused to serve a different request with different configuration context. Therefore, the configuration associated with the thread needs to be dropped and a new one to be loaded.
public static Reload ( PHP.Core.ApplicationContext appContext, bool reloadFromFile ) : void
appContext PHP.Core.ApplicationContext
reloadFromFile bool
return void

Property Details

IsBuildTime public_oe static_oe property

Whether the application being run is a command line compiler. Influences a scope of configuration options during their load.
public static bool IsBuildTime
return bool