예제 #1
0
        public static Type GetCompiledType(string inputFile, HttpContext context)
        {
#if NET_2_0
            return(BuildManager.GetCompiledType(inputFile));
#else
            string      physPath;
            HttpRequest req = context != null ? context.Request : null;

            if (req != null)
            {
                physPath = req.MapPath(inputFile);
            }
            else             // likely to fail
            {
                physPath = inputFile;
            }

            WebServiceParser parser = new WebServiceParser(context, inputFile, physPath);
            Type             type   = parser.GetCompiledTypeFromCache();
            if (type != null)
            {
                return(type);
            }

            return(WebServiceCompiler.CompileIntoType(parser));
#endif
        }
예제 #2
0
        public static Type GetCompiledType(HttpContext context, string virtualPath, string physicalPath)
        {
            WebHandlerParser parser = new WebHandlerParser(context, virtualPath, physicalPath);
            Type             type   = parser.GetCompiledTypeFromCache();

            if (type != null)
            {
                return(type);
            }

            return(WebServiceCompiler.CompileIntoType(parser));
        }