* System.Web20.csproj: added ObjectInputStream.cs and ObjectOutputStream.cs
[mono.git] / mcs / class / System.Web / System.Web.UI / DesignTimeParseData.cs
index 379501b1b55af1d1b1249dd8f533e01c7fc1cc4f..bf7dc787f7e8dbb9f63df80ae99f6ffb101b8bb4 100644 (file)
@@ -1,14 +1,13 @@
 //
-// System.Web.UI.DesignTimeParseData.cs
+// System.Web.DesignTimeParseData class
 //
-// Authors:
-//   Gaurav Vaish (gvaish@iitk.ac.in)
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-// (C) 2001 Gaurav Vaish
-// (C) 2003 Andreas Nahr
+// 
+// Author:
+//     Miguel de Icaza (miguel@novell.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.
 //
-\r
-using System;
-using System.Web;
+
+using System.Collections;
 using System.ComponentModel.Design;
-\r
-namespace System.Web.UI
-{
-       public sealed class DesignTimeParseData
-       {
-               private static bool inDesigner = false;
-               private EventHandler dataBindingHandler;
-               private IDesignerHost designerHost;
-               private string documentUrl;
-               private string parseText;
-\r
-               public DesignTimeParseData(IDesignerHost designerHost, string parseText)
-               {
-                       if (parseText == null)
-                               throw new ArgumentNullException("parseText");
-                       if (parseText.Length == 0)
-                               throw new ArgumentException("parseText cannot be an empty string.", "parseText");
+using System.Security.Permissions;
 
-                       DesignTimeParseData.inDesigner = true;
-                       this.designerHost = designerHost;
-                       this.parseText = parseText;
-                       this.documentUrl = string.Empty;
-               } 
+namespace System.Web.UI {
+
+       // CAS - no InheritanceDemand here as the class is sealed
+       [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
+       public sealed class DesignTimeParseData {
+               EventHandler db_handler;
+               string text;
+               IDesignerHost host;
+               string durl;
+#if NET_2_0
+               string filter;
+               bool theme;
+               ICollection collection;
+#endif
+               
+               public DesignTimeParseData (IDesignerHost designerHost, string parseText)
+               {
+                       host = designerHost;
+                       text = parseText;
+               }
+#if NET_2_0
+               public DesignTimeParseData (IDesignerHost designerHost, string parseText, string filter)
+                       : this (designerHost, parseText)
+               {
+                       this.filter = filter;
+               }
+#endif
 
                public EventHandler DataBindingHandler {
-                       get {return dataBindingHandler;} 
-                       set {dataBindingHandler = value;}
+                       get {
+                               return db_handler;
+                       }
+
+                       set {
+                               db_handler = value;
+                       }
                }
 
                public IDesignerHost DesignerHost {
-                       get {return designerHost;}
+                       get {
+                               return host;
+                       }
                }
 
                public string DocumentUrl {
-                       get {return documentUrl;}
+                       get {
+                               return durl;
+                       }
+
                        set {
-                               if (value == null)
-                                       documentUrl = string.Empty;
-                               else
-                                       documentUrl = value;
+                               durl = value;
                        }
                }
 
                public string ParseText {
-                       get {return parseText;}
+                       get {
+                               return text;
+                       }
+               }
+#if NET_2_0
+               public string Filter {
+                       get { return filter; }
+               }
+
+               public bool ShouldApplyTheme {
+                       get { return theme; }
+                       set { theme = value; }
                }
 
-               internal static bool InDesigner {
-                       get {return inDesigner;}
+               // FIXME: there's probably a way to set this somewhere...
+               public ICollection UserControlRegisterEntries {
+                       get { return collection; }
                }
+#endif
        }
-}\r
+}