2002-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 12 Jul 2002 19:19:55 +0000 (19:19 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Fri, 12 Jul 2002 19:19:55 +0000 (19:19 -0000)
* System.Web.build: removed some more excludes.

* System.Web.Hosting/AppDomainFactory.cs:
* System.Web.Hosting/IAppDomainFactory.cs:
* System.Web.Hosting/IISAPIRuntime.cs:
* System.Web.Hosting/ISAPIRuntime.cs: make them compile.

* System.Web.UI/AttributeCollection.cs: added CssStyleCollection.

* System.Web.UI/CssStyleCollection.cs: use a StateBag instead of a
Hashtable. Added internal .ctor.

* System.Web.UI/DataBinding.cs: propertyType is a Type. Implemented
Equals and GetHashCode.

* System.Web.UI/DataBoundLiteralControl.cs:
(LoadViewState):
(SaveViewState): implemented.

* System.Web.UI/Page.cs: FileDependencies is not public.

* System.Web.UI/ParseChildrenAttribute.cs: give a value to Default.
(GetHashCode):
(Equals):
(IsDefaultAttribute): implemented.

svn path=/trunk/mcs/; revision=5743

14 files changed:
mcs/class/System.Web/ChangeLog
mcs/class/System.Web/System.Web.Hosting/AppDomainFactory.cs
mcs/class/System.Web/System.Web.Hosting/ChangeLog
mcs/class/System.Web/System.Web.Hosting/IAppDomainFactory.cs
mcs/class/System.Web/System.Web.Hosting/IISAPIRuntime.cs
mcs/class/System.Web/System.Web.Hosting/ISAPIRuntime.cs
mcs/class/System.Web/System.Web.UI/AttributeCollection.cs
mcs/class/System.Web/System.Web.UI/ChangeLog
mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs
mcs/class/System.Web/System.Web.UI/DataBinding.cs
mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs
mcs/class/System.Web/System.Web.UI/Page.cs
mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs
mcs/class/System.Web/System.Web.build

index af2b7d0f5f586ddccca5a6b39e81e998224ac54a..677d6afa69cb6d69b2174fc88a0652c3cfcbadea 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * System.Web.build: removed some more excludes.
+
 2002-07-05  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * list: updated. Currently mcs cannot compile System.Web because it
index 7cf5b14a9c1e4ec8defbe1814df9ba720ef6b3da..22627136694d93c791061a5073d9aa23ebdff894 100644 (file)
@@ -3,8 +3,10 @@
 //
 // Author:
 //   Bob Smith <bob@thestuff.net>
+//   Gonzalo Paniagua (gonzalo@ximian.com)
 //
 // (C) Bob Smith
+// (c) 2002 Ximian, Inc. (http://www.ximian.com)
 //
 
 using System;
@@ -13,7 +15,21 @@ namespace System.Web.Hosting
 {
         public sealed class AppDomainFactory : IAppDomainFactory
         {
-                public AppDomainFactory();
-                public object Create(string module, string typeName, string appId, string appPath, string strUrlOfAppOrigin, int iZone);
+               [MonoTODO]
+                public AppDomainFactory ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+                public object Create (string module,
+                                     string typeName,
+                                     string appId,
+                                     string appPath,
+                                     string strUrlOfAppOrigin,
+                                     int iZone)
+               {
+                       throw new NotImplementedException ();
+               }
         }
 }
index 31f38df52c3ea12bc726b731780a16b0a50769bb..d85bab3216a212c5c298c1a0706c7513611f6372 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * System.Web.Hosting/AppDomainFactory.cs:
+       * System.Web.Hosting/IAppDomainFactory.cs:
+       * System.Web.Hosting/IISAPIRuntime.cs:
+       * System.Web.Hosting/ISAPIRuntime.cs: make them compile.
+
 2002-04-10  Patrik Torstensson <patrik.torstensson@labs2.com>
 
         * ApplicationHost.cs: Test implementation to support testing.
index 1317ccc6c54ac68410bab65f25d1cfc3f551a59e..2067260c4f4faad72a647fbeac04fd309c1825b7 100644 (file)
@@ -13,6 +13,12 @@ namespace System.Web.Hosting
 {
         public interface IAppDomainFactory
         {
-                object Create(in string module, in string typeName, in string appId, in string appPath, in string strUrlOfAppOrigin, in int iZone);
+                object Create (string module,
+                              string typeName,
+                              string appId,
+                              string appPath,
+                              string strUrlOfAppOrigin,
+                              int iZone);
         }
 }
+
index bad6cc4ef8045f333bd3d4cc6bf9e758f61b4765..cf4d7bf6937d55819f35ab88e35731113294ec9e 100644 (file)
@@ -13,9 +13,9 @@ namespace System.Web.Hosting
 {
         public interface IISAPIRuntime
         {
-                void DoGCCollect();
-                int ProcessRequest(in IntPtr ecb, in int useProcessModel);
-                void StartProcessing();
-                void StopProcessing();
+                void DoGCCollect ();
+                int ProcessRequest (IntPtr ecb, int useProcessModel);
+                void StartProcessing ();
+                void StopProcessing ();
         }
 }
index c419344ad259b53fdec8bf842be46d8571ca3a62..ac43100c95c54f76a94daa00687ff623d4a1cc4f 100644 (file)
@@ -3,8 +3,10 @@
 //
 // Author:
 //   Bob Smith <bob@thestuff.net>
+//   Gonzalo Paniagua (gonzalo@ximian.com)
 //
 // (C) Bob Smith
+// (c) 2002 Ximian, Inc. (http://www.ximian.com)
 //
 
 using System;
@@ -13,10 +15,34 @@ namespace System.Web.Hosting
 {
         public sealed class ISAPIRuntime : IISAPIRuntime
         {
-                public ISAPIRuntime();
-                public void DoGCCollect();
-                public int ProcessRequest(IntPtr ecb, int iWRType);
-                public void StartProcessing();
-                public void StopProcessing();
+               [MonoTODO]
+                public ISAPIRuntime ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+                public void DoGCCollect ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+                public int ProcessRequest (IntPtr ecb, int iWRType)
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+                public void StartProcessing ()
+               {
+                       throw new NotImplementedException ();
+               }
+               
+               [MonoTODO]
+                public void StopProcessing ()
+               {
+                       throw new NotImplementedException ();
+               }
         }
 }
index 8f4df42b9ef48f74f9b972ae431650b550960fd9..4eff31ecedeca799baaee61e79dee6ea1b535fd9 100755 (executable)
@@ -1,9 +1,11 @@
 //
 // System.Web.UI.AttributeCollection.cs
 //
-// Duncan Mak  (duncan@ximian.com)
+// Authors:
+//     Duncan Mak  (duncan@ximian.com)
+//     Gonzalo Paniagua (gonzalo@ximian.com)
 //
-// (C) Ximian, Inc.
+// (C) 2002 Ximian, Inc. (http://www.ximian.com
 //
 
 using System;
@@ -14,6 +16,7 @@ namespace System.Web.UI {
        public sealed class AttributeCollection
        {
                private StateBag bag;
+               private CssStyleCollection styleCollection;
                
                public AttributeCollection (StateBag bag)
                {
@@ -24,9 +27,12 @@ namespace System.Web.UI {
                        get { return bag.Count; }
                }
 
-               [MonoTODO]
                public CssStyleCollection CssStyle {
-                       get { return null; }
+                       get {
+                               if (styleCollection == null)
+                                       styleCollection = new CssStyleCollection (bag);
+                               return styleCollection;
+                       }
                }
 
                public string this [string key] {
index 941d8c2efdd3f3c30f0c43f8777182fe4bcc8b7d..8184cc695dbc077faf5d5c2520f61737619158b6 100644 (file)
@@ -1,3 +1,24 @@
+2002-07-12  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * System.Web.UI/AttributeCollection.cs: added CssStyleCollection.
+
+       * System.Web.UI/CssStyleCollection.cs: use a StateBag instead of a
+       Hashtable. Added internal .ctor.
+
+       * System.Web.UI/DataBinding.cs: propertyType is a Type. Implemented
+       Equals and GetHashCode.
+
+       * System.Web.UI/DataBoundLiteralControl.cs:
+       (LoadViewState):
+       (SaveViewState): implemented.
+
+       * System.Web.UI/Page.cs: FileDependencies is not public.
+
+       * System.Web.UI/ParseChildrenAttribute.cs: give a value to Default.
+       (GetHashCode):
+       (Equals):
+       (IsDefaultAttribute): implemented.
+
 2002-07-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * Control.cs: fixed Visible property.
index bcf88bbc4361a3da0ec51380263b3db7b3cdec9d..63ef8e138f6e63d604152ec51508876caa2b7190 100755 (executable)
@@ -1,9 +1,11 @@
 //
 // System.Web.UI.CssStyleCollection.cs
 //
-// Duncan Mak  (duncan@ximian.com)
+// Authors:
+//     Duncan Mak  (duncan@ximian.com)
+//     Gonzalo Paniagua (gonzalo@ximian.com)
 //
-// (C) Ximian, Inc.
+// (C) 2002 Ximian, Inc. (http://www.ximian.com)
 //
 
 using System;
@@ -13,36 +15,42 @@ namespace System.Web.UI {
 
        public sealed class CssStyleCollection
        {
-               Hashtable list = new Hashtable ();
+               private StateBag bag;
 
+               internal CssStyleCollection (StateBag bag)
+               {
+                       this.bag = bag;
+               }
+               
                public int Count {
-                       get { return list.Count; }
+                       get { return bag.Count; }
                }
 
                public string this [string key] {
 
-                       get { return list [key] as string; }
+                       get { return bag [key] as string; }
 
-                       set { list [key] = value; }
+                       set { bag [key] = value; }
                }
 
                public ICollection Keys {
-                       get { return list.Keys; }
+                       get { return bag.Keys; }
                }
 
                public void Add (string key, string value)
                {
-                       list.Add (key, value);
+                       bag.Add (key, value);
                }
 
                public void Clear ()
                {
-                       list.Clear ();
+                       bag.Clear ();
                }
 
                public void Remove (string key)
                {
-                       list.Remove (key);
+                       bag.Remove (key);
                }
        }
 }
+
index 4acf0b8a0880da93efb9c13704403e14d99ff8d3..cf0c8a07d495d9aca0525e95ba3f9c4685379342 100755 (executable)
@@ -1,9 +1,11 @@
 //
 // System.Web.UI.DataBinding.cs
 //
-// Duncan Mak  (duncan@ximian.com)
+// Authors:
+//     Duncan Mak  (duncan@ximian.com)
+//     Gonzalo Paniagua Javier (gonzalo@ximian.com)
 //
-// (C) Ximian, Inc.
+// (C) 2002 Ximian, Inc. (http://www.ximian.com)
 //
 
 using System;
@@ -13,10 +15,10 @@ namespace System.Web.UI {
        public sealed class DataBinding
        {
                string propertyName;
-               string propertyType;
+               Type propertyType;
                string expression;
 
-               public DataBinding (string propertyName, string propertyType,
+               public DataBinding (string propertyName, Type propertyType,
                                    string expression)
                {
                        this.propertyName = propertyName;
@@ -26,27 +28,33 @@ namespace System.Web.UI {
 
                public string Expression {
                        get { return expression; }
+                       set { expression = value; }
                }
 
                public string PropertyName {
                        get { return propertyName; }
                }
 
-               public string PropertyType {
+               public Type PropertyType {
                        get { return propertyType; }
                }
 
                public override bool Equals (object obj)
                {
-                       if (((DataBinding) obj).PropertyName == this.PropertyName)
-                               return true;
-                       else
+                       if (!(obj is DataBinding))
                                return false;
+                       
+                       DataBinding o = (DataBinding) obj;
+                       return (o.Expression == expression &&
+                               o.PropertyName == propertyName &&
+                               o.PropertyType == propertyType);
                }
 
                public override int GetHashCode ()
                {
-                       return propertyName.GetHashCode ();
+                       return propertyName.GetHashCode () +
+                              (propertyType.GetHashCode () << 1) +
+                              (expression.GetHashCode () << 2) ;
                }
        }
 }
index 0eae61eb1a21400da942aa979fe87168bbde5554..33374d4a0bc677aa9a4bf8164209274bef150380 100755 (executable)
@@ -48,10 +48,10 @@ namespace System.Web.UI {
                        return new EmptyControlCollection (this);
                }
 
-               [MonoTODO]
                protected override void LoadViewState (object savedState)
                {
-                       throw new NotImplementedException ();
+                       if (savedState != null)
+                               dataBoundLiterals = (string []) savedState;
                }
 
                protected override void Render (HtmlTextWriter output)
@@ -59,10 +59,11 @@ namespace System.Web.UI {
                        output.Write (Text);
                }
 
-               [MonoTODO]
                protected override object SaveViewState ()
                {
-                       throw new NotImplementedException ();
+                       if (dataBoundLiterals.Length == 0)
+                               return null;
+                       return dataBoundLiterals;
                }
 
                public void SetDataBoundString (int index, string s)
index 1f80ae2d4a58a08915af4799e76cb584e72b6d3d..2ad046af5c3104f2ee3be32272629b506816899a 100755 (executable)
@@ -129,7 +129,7 @@ public class Page : TemplateControl, IHttpHandler
                set { _errorPage = value; }
        }
 
-       public ArrayList FileDependencies
+       ArrayList FileDependencies
        {
                set { _fileDependencies = value; }
        }
index 4a41b4f51a3d882506653bd82f412d08641cfc68..95b621a801516c9f053351e9d36221edcfe424a5 100755 (executable)
@@ -1,9 +1,11 @@
 //
 // System.Web.UI.ParseChildrenAttribute.cs
 //
-// Duncan Mak  (duncan@ximian.com)
+// Authors:
+//     Duncan Mak  (duncan@ximian.com)
+//     Gonzalo Paniagua (gonzalo@ximian.com)
 //
-// (C) Ximian, Inc.
+// (C) 2002 Ximian, Inc. (http://www.ximian.com
 //
 
 using System;
@@ -15,6 +17,7 @@ namespace System.Web.UI {
        {
                bool childrenAsProperties;
                string defaultProperty;
+               public static readonly ParseChildrenAttribute Default = new ParseChildrenAttribute ();
 
                // LAMESPEC
                public ParseChildrenAttribute ()
@@ -33,11 +36,10 @@ namespace System.Web.UI {
                                               string defaultProperty)
                {
                        this.childrenAsProperties = childrenAsProperties;
-                       this.defaultProperty = defaultProperty;
+                       if (childrenAsProperties)
+                               this.defaultProperty = defaultProperty;
                }
 
-               public static readonly ParseChildrenAttribute Default;
-
                public bool ChildrenAsProperties {
 
                        get { return childrenAsProperties; }
@@ -51,22 +53,28 @@ namespace System.Web.UI {
                        set { defaultProperty = value; }
                }
 
-               [MonoTODO]
                public override bool Equals (object obj)
                {
+                       if (!(obj is ParseChildrenAttribute))
+                               return false;
+
+                       ParseChildrenAttribute o = (ParseChildrenAttribute) obj;
+                       if (childrenAsProperties == o.childrenAsProperties){
+                               if (childrenAsProperties == false)
+                                       return true;
+                               return (defaultProperty == o.DefaultProperty);
+                       }
                        return false;
                }
 
-               [MonoTODO]
                public override int GetHashCode ()
                {
-                       return 42;
+                       return base.GetHashCode ();
                }
 
-               [MonoTODO]
                public override bool IsDefaultAttribute ()
                {
-                       return false;
+                       return Equals (Default);
                }
        }
 }
index c8132c028e4dd8e69df1c2f48946363a5a489208..942bc9a63135e1cfa14abb9b59c5313c63ac499c 100644 (file)
                        <sources>
                                <includes name="**/*.cs"/> 
                                <excludes name="Test/**"/>
-                               <includes name="System.Web.Hosting/ApplicationHost.cs"/> 
-                               <includes name="System.Web.Hosting/SimpleWorkerRequest.cs.cs"/> 
-                               <excludes name="System.Web.Hosting/ISAPIRuntime.cs"/>
-                               <excludes name="System.Web.Hosting/IISAPIRuntime.cs"/>
-                               <excludes name="System.Web.Hosting/IAppDomainFactory.cs"/>
-                               <excludes name="System.Web.Hosting/AppDomainFactory.cs"/>
+                               <!--<excludes name="System.Web.Hosting/ISAPIRuntime.cs"/>-->
+                               <!--<excludes name="System.Web.Hosting/IISAPIRuntime.cs"/>-->
+                               <!--<excludes name="System.Web.Hosting/IAppDomainFactory.cs"/>-->
+                               <!--<excludes name="System.Web.Hosting/AppDomainFactory.cs"/>-->
                                <!--<excludes name="System.Web.UI/**"/>-->
                                <!--<excludes name="System.Web.UI.HtmlControls/**"/>-->
                                <!--<excludes name="System.Web.UI.WebControls/**"/>-->