System.Web.UI.SimpleWebHandlerParser.SimpleWebHandlerParser C# (CSharp) Method

SimpleWebHandlerParser() private method

private SimpleWebHandlerParser ( HttpContext context, string virtualPath, string physicalPath, TextReader reader ) : System.CodeDom.Compiler
context System.Web.HttpContext
virtualPath string
physicalPath string
reader TextReader
return System.CodeDom.Compiler
		internal SimpleWebHandlerParser (HttpContext context, string virtualPath, string physicalPath, TextReader reader)
		{
#if NET_2_0
			this.reader = reader;
#endif
			cachedType = CachingCompiler.GetTypeFromCache (physicalPath);
			if (cachedType != null)
				return; // We don't need anything else.

			// context is obsolete in 2.0+ - MSDN recommends passing null, so we need to
			// take that into account
			if (context != null)
				this.context = context;
			else
				this.context = HttpContext.Current;
			
			this.vPath = virtualPath;
			AddDependency (virtualPath);
			
			// physicalPath is obsolete in 2.0+ - same note what for context applies here
			if (physicalPath != null && physicalPath.Length > 0)
				this.physPath = physicalPath;
			else {
				HttpRequest req = this.context != null ? context.Request : null;
				if (req != null)
					this.physPath = req.MapPath (virtualPath);
			}

			assemblies = new ArrayList ();
			string location = Context.ApplicationInstance.AssemblyLocation;
			if (location != typeof (TemplateParser).Assembly.Location)
				appAssemblyIndex = assemblies.Add (location);

#if NET_2_0
			bool addAssembliesInBin = false;
			foreach (AssemblyInfo info in CompilationConfig.Assemblies) {
				if (info.Assembly == "*")
					addAssembliesInBin = true;
				else
					AddAssemblyByName (info.Assembly, null);
			}
			if (addAssembliesInBin)
				AddAssembliesInBin ();
#else
			assemblies.AddRange (CompilationConfig.Assemblies);
			if (CompilationConfig.AssembliesInBin)
				AddAssembliesInBin ();
#endif

			language = CompilationConfig.DefaultLanguage;

			GetDirectivesAndContent ();
		}

Same methods

SimpleWebHandlerParser::SimpleWebHandlerParser ( HttpContext context, string virtualPath, string physicalPath ) : System.CodeDom.Compiler