void RegisterConfigControls ()
{
PagesSection pages = WebConfigurationManager.GetSection ("system.web/pages") as PagesSection;
if (pages == null)
return;
TagPrefixCollection controls = pages.Controls;
if (controls == null || controls.Count == 0)
return;
IList appCode = BuildManager.CodeAssemblies;
bool haveCodeAssemblies = appCode != null && appCode.Count > 0;
Assembly asm;
foreach (TagPrefixInfo tpi in controls) {
if (!String.IsNullOrEmpty (tpi.TagName))
RegisterFoundry (tpi.TagPrefix, tpi.TagName, tpi.Source, true);
else if (String.IsNullOrEmpty (tpi.Assembly)) {
if (haveCodeAssemblies) {
foreach (object o in appCode) {
asm = o as Assembly;
if (asm == null)
continue;
RegisterFoundry (tpi.TagPrefix, asm, tpi.Namespace, true);
}
}
} else if (!String.IsNullOrEmpty (tpi.Namespace))
RegisterAssemblyFoundry (tpi.TagPrefix,
tpi.Assembly,
tpi.Namespace,
true);
}
}