public static void Load(ApplicationContext/*!*/ appContext)
{
if (current == null)
{
Debug.Assert(!isBeingLoadedToCurrentThread, "Configuration loader triggered next configuration load");
isBeingLoadedToCurrentThread = true;
try
{
PhpConfigurationContext context = ConfigurationSectionHandler.GetConfig(appContext, SectionName);
if (context != null)
{
current = new Configuration(context.Global, context.Local);
}
else
{
// no configuration loaded from .config files:
current = new Configuration(new GlobalConfiguration(), new LocalConfiguration());
}
}
finally
{
isBeingLoadedToCurrentThread = false;
}
}
}