Type LoadType ()
{
if (type != null)
return type;
HttpContext context = HttpContext.Current;
string vpath;
string realpath;
if (VirtualPathUtility.IsAppRelative (source)) {
vpath = source;
realpath = context.Request.MapPath (source);
} else {
vpath = VirtualPathUtility.ToAppRelative (source);
realpath = source;
}
if ((type = CachingCompiler.GetTypeFromCache (realpath)) != null)
return type;
ArrayList other_deps = new ArrayList ();
type = BuildManager.GetCompiledType (vpath);
if (type != null) {
AspGenerator.AddTypeToCache (other_deps, realpath, type);
BuildManager.AddToReferencedAssemblies (type.Assembly);
}
return type;
}