+ public void RegisterAssemblyFoundry (string foundryName,
+ string assemblyName,
+ string nameSpace,
+ bool fromConfig)
+ {
+ AssemblyFoundry foundry = new AssemblyFoundry (assemblyName, nameSpace);
+ foundry.FromConfig = fromConfig;
+ InternalRegister (foundryName, foundry, fromConfig);
+ }
+
+ void RegisterConfigControls ()
+ {
+ PagesSection pages = WebConfigurationManager.GetWebApplicationSection ("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);
+ }
+ }
+
+ void InternalRegister (string foundryName, Foundry foundry, bool fromConfig)