Merge branch 'master' of github.com:mono/mono
[mono.git] / mcs / class / System.Web / System.Web.UI / WebServiceParser.cs
index ebcddb76b0b4187081e62ecfdf6aa7e905d86696..8a2e62cc805c0d2472f547e2ae4b5aa06a309343 100644 (file)
@@ -5,7 +5,7 @@
 //     Gonzalo Paniagua Javier (gonzalo@ximian.com)
 //
 // (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.IO;
 using System.Security.Permissions;
 using System.Web.Compilation;
 
-namespace System.Web.UI {
-
+namespace System.Web.UI
+{
        // CAS
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public class WebServiceParser : SimpleWebHandlerParser
        {
-               private WebServiceParser (HttpContext context, string virtualPath, string physicalPath)
+               WebServiceParser (HttpContext context, string virtualPath, string physicalPath)
                        : base (context, virtualPath, physicalPath)
                {
                }
 
-               public static Type GetCompiledType (string inputFile, HttpContext context)
+               internal WebServiceParser (HttpContext context, VirtualPath virtualPath, TextReader reader)
+                       : this (context, virtualPath, null, reader)
+               {
+               }
+               
+               internal WebServiceParser (HttpContext context, VirtualPath virtualPath, string physicalPath, TextReader reader)
+                       : base (context, virtualPath.Original, physicalPath, reader)
                {
-                       WebServiceParser parser = new WebServiceParser (context, null, inputFile);
-                       Type type = parser.GetCompiledTypeFromCache ();
-                       if (type != null)
-                               return type;
+               }
 
-                       return WebServiceCompiler.CompileIntoType (parser);
+               public static Type GetCompiledType (string inputFile, HttpContext context)
+               {
+                       return BuildManager.GetCompiledType (inputFile);
                }
 
                protected override string DefaultDirectiveName {