merge -r 58784:58785
[mono.git] / mcs / class / System.Web / System.Web.UI / TemplateParser.cs
index a25a6a8c58d7784c64304ea7dabae3d681082606..8a82aca3bbfad06f20414100410a2327c214b2dd 100644 (file)
@@ -6,8 +6,7 @@
 //     Gonzalo Paniagua Javier (gonzalo@ximian.com)
 //
 // (C) 2002,2003 Ximian, Inc. (http://www.ximian.com)
-//
-
+// Copyright (C) 2005 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
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-using System;
+
 using System.CodeDom.Compiler;
 using System.Collections;
 using System.IO;
 using System.Reflection;
-using System.Web;
+using System.Security.Permissions;
 using System.Web.Compilation;
 using System.Web.Configuration;
 using System.Web.Util;
 
-namespace System.Web.UI
-{
+namespace System.Web.UI {
+
+       // CAS
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public abstract class TemplateParser : BaseParser
        {
                string inputFile;
@@ -429,7 +431,10 @@ namespace System.Web.UI
 
                        string inherits = GetString (atts, "Inherits", null);
 #if NET_2_0
-                       className = inherits;
+                       if (srcAssembly == null)
+                               className = inherits;
+                       else
+                               SetBaseType (inherits);
 #else
                        if (inherits != null)
                                SetBaseType (inherits);