Merge branch 'master' of github.com:mono/mono
[mono.git] / mcs / class / System.Web / System.Web.UI / UserControlParser.cs
index 05cfb841c1d27bf60c13fce69502916db23d0247..b93e19fb57a74edfa84275451e6cc3357057512b 100644 (file)
@@ -29,6 +29,7 @@
 //
 using System;
 using System.Collections;
+using System.Collections.Generic;
 using System.IO;
 using System.Web;
 using System.Web.Compilation;
@@ -39,14 +40,15 @@ namespace System.Web.UI
        internal class UserControlParser : TemplateControlParser
        {
                string masterPage;
-
-
+#if NET_4_0
+               string providerName;
+#endif
                internal UserControlParser (VirtualPath virtualPath, string inputFile, HttpContext context)
                        : this (virtualPath, inputFile, context, null)
                {
                }
 
-               internal UserControlParser (VirtualPath virtualPath, string inputFile, ArrayList deps, HttpContext context)
+               internal UserControlParser (VirtualPath virtualPath, string inputFile, List <string> deps, HttpContext context)
                        : this (virtualPath, inputFile, context, null)
                {
                        this.Dependencies = deps;
@@ -109,7 +111,7 @@ namespace System.Web.UI
                        return ucp.CompileIntoType ();
                }
                
-               internal static Type GetCompiledType (string virtualPath, string inputFile, ArrayList deps, HttpContext context)
+               internal static Type GetCompiledType (string virtualPath, string inputFile, List <string> deps, HttpContext context)
                {
                        UserControlParser ucp = new UserControlParser (new VirtualPath (virtualPath), inputFile, deps, context);
 
@@ -123,13 +125,13 @@ namespace System.Web.UI
                        return ucp.CompileIntoType ();
                }
 
-               protected override Type CompileIntoType ()
+               internal override Type CompileIntoType ()
                {
                        AspGenerator generator = new AspGenerator (this);
                        return generator.GetCompiledType ();
                }
 
-               internal override void ProcessMainAttributes (Hashtable atts)
+               internal override void ProcessMainAttributes (IDictionary atts)
                {
                        masterPage = GetString (atts, "MasterPageFile", null);
                        if (masterPage != null)
@@ -137,7 +139,23 @@ namespace System.Web.UI
 
                        base.ProcessMainAttributes (atts);
                }
+#if NET_4_0
+               internal override void ProcessOutputCacheAttributes (IDictionary atts)
+               {
+                       providerName = GetString (atts, "ProviderName", null);
+                       base.ProcessOutputCacheAttributes (atts);
+               }
 
+               internal override Type DefaultBaseType {
+                       get {
+                               Type ret = PageParser.DefaultUserControlBaseType;
+                               if (ret == null)
+                                       return base.DefaultBaseType;
+
+                               return ret;
+                       }
+               }
+#endif
                internal override string DefaultBaseTypeName {
                        get { return PagesConfig.UserControlBaseType; }
                }
@@ -149,6 +167,11 @@ namespace System.Web.UI
                internal string MasterPageFile {
                        get { return masterPage; }
                }
+#if NET_4_0
+               internal string ProviderName {
+                       get { return providerName; }
+               }
+#endif
        }
 }