Inheritance: System.Web.UI.TemplateParser
		public GlobalAsaxCompiler (ApplicationFileParser parser)
			: base (parser)
		{
			applicationObjectTags.Clear ();
			sessionObjectTags.Clear ();
			this.parser = parser;
		}
Beispiel #2
0
		internal static Type GetCompiledApplicationType (string inputFile, HttpContext context)
		{
			ApplicationFileParser parser = new ApplicationFileParser (inputFile, context);
			AspGenerator generator = new AspGenerator (parser);
			Type type = generator.GetCompiledType ();
			dependencies = parser.Dependencies;
			return type;
		}
        internal static Type GetCompiledApplicationType(string inputFile, HttpContext context)
        {
            ApplicationFileParser parser    = new ApplicationFileParser(inputFile, context);
            AspGenerator          generator = new AspGenerator(parser);
            Type type = generator.GetCompiledType();

            dependencies = parser.Dependencies;
            return(type);
        }
        /*
         * Compile an .aspx file into an HttpApplication Type
         */
        internal static Type GetCompiledApplicationType(string inputFile, HttpContext context,
                                                        out ApplicationFileParser parser)
        {
            parser = new ApplicationFileParser();
            parser.CurrentVirtualPath = UrlPath.Combine(context.Request.ApplicationPath,
                                                        HttpApplicationFactory.applicationFileName);
            parser.InputFile = inputFile;
            parser.Context   = context;

            // Never use trivial pages for global.asax (ASURT 32420)
            parser._fAlwaysCompile = true;

            ParserCacheItem cacheItem = parser.GetParserCacheItem();

            Debug.Assert(cacheItem.type != null);
            return(cacheItem.type);
        }
		public static Type CompileApplicationType (ApplicationFileParser parser)
		{
			AspGenerator generator = new AspGenerator (parser);
			return generator.GetCompiledType ();
		}
 private void GetAppStateByParsingGlobalAsax()
 {
     using (new ApplicationImpersonationContext())
     {
         if (FileUtil.FileExists(this._appFilename))
         {
             ApplicationFileParser parser = new ApplicationFileParser();
             AssemblySet referencedAssemblies = Util.GetReferencedAssemblies(this._theApplicationType.Assembly);
             referencedAssemblies.Add(typeof(string).Assembly);
             VirtualPath virtualPath = HttpRuntime.AppDomainAppVirtualPathObject.SimpleCombine("global.asax");
             parser.Parse(referencedAssemblies, virtualPath);
             this._state = new HttpApplicationState(parser.ApplicationObjects, parser.SessionObjects);
         }
     }
 }
        private void GetAppStateByParsingGlobalAsax() {
            using (new ApplicationImpersonationContext()) {
                // It may not exist if the app is precompiled
                if (FileUtil.FileExists(_appFilename)) {
                    ApplicationFileParser parser;

                    parser = new ApplicationFileParser();
                    AssemblySet referencedAssemblies = System.Web.UI.Util.GetReferencedAssemblies(
                        _theApplicationType.Assembly);
                    referencedAssemblies.Add(typeof(string).Assembly);
                    VirtualPath virtualPath = HttpRuntime.AppDomainAppVirtualPathObject.SimpleCombine(
                        applicationFileName);
                    parser.Parse(referencedAssemblies, virtualPath);

                    // Create app state
                    _state = new HttpApplicationState(parser.ApplicationObjects, parser.SessionObjects);
                }
            }
        }
 internal ApplicationFileCodeDomTreeGenerator(ApplicationFileParser appParser) : base(appParser) {
     _appParser = appParser;
 }