System.Web.Compilation.AspGenerator.GetCompilerFromType C# (CSharp) Method

GetCompilerFromType() private method

private GetCompilerFromType ( ) : BaseCompiler
return BaseCompiler
		BaseCompiler GetCompilerFromType ()
		{
			Type type = tparser.GetType ();
			if (type == typeof (PageParser))
				return new PageCompiler ((PageParser) tparser);

			if (type == typeof (ApplicationFileParser))
				return new GlobalAsaxCompiler ((ApplicationFileParser) tparser);

			if (type == typeof (UserControlParser))
				return new UserControlCompiler ((UserControlParser) tparser);

			if (type == typeof(MasterPageParser))
				return new MasterPageCompiler ((MasterPageParser) tparser);

			throw new Exception ("Got type: " + type);
		}