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

CheckLanguage() private method

private CheckLanguage ( string lang ) : void
lang string
return void
		void CheckLanguage (string lang)
		{
			if (lang == null || lang == "")
				return;

			if (String.Compare (lang, tparser.Language, true, Helpers.InvariantCulture) == 0)
				return;

			CompilationSection section = (CompilationSection) WebConfigurationManager.GetWebApplicationSection ("system.web/compilation");
			if (section.Compilers[tparser.Language] != section.Compilers[lang])
				throw new ParseException (Location,
						String.Format ("Trying to mix language '{0}' and '{1}'.", 
								tparser.Language, lang));
		}