Inheritance: BaseTemplateParser
        /*
         * Compile a template control (aspx or ascx) file and return its Type
         */
        private Type GetReferencedType(TemplateControlParser parser, string virtualPath)
        {
            // Make sure the page is never treated as a Trivial Page (ASURT bugs 8903,42166,73887)
            parser._fAlwaysCompile = true;

            string fullVirtualPath = UrlPath.Combine(BaseVirtualDir, virtualPath);

            parser.InputFile = MapPath(fullVirtualPath, false /*allowCrossAppMapping*/);

            parser.CurrentVirtualPath = fullVirtualPath; // To get correct config settings

            parser.Context = Context;
            parser._circularReferenceChecker = _circularReferenceChecker; // To fix ASURT 30990

            // Perform the compilation
            ParserCacheItem cacheItem = parser.GetParserCacheItemWithNewConfigPath();

            Debug.Assert(cacheItem.type != null);

            // Add a dependency on the created Type
            AddTypeDependency(cacheItem.type);

            // Add a dependency on the cache sources used to cache the created Type
            AddSourceDependencies(parser.SourceDependencies);

            return(cacheItem.type);
        }
Example #2
0
		public TemplateControlCompiler (TemplateControlParser parser)
			: base (parser)
		{
			this.parser = parser;
		}
 internal TemplateControlCodeDomTreeGenerator(TemplateControlParser tcParser) : base(tcParser)
 {
     this._tcParser = tcParser;
 }