From: Gonzalo Paniagua Javier Date: Fri, 12 Jul 2002 19:19:55 +0000 (-0000) Subject: 2002-07-12 Gonzalo Paniagua Javier X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=8f35dc38edeec0001979331ca7655de94022dc85;p=mono.git 2002-07-12 Gonzalo Paniagua Javier * 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 --- diff --git a/mcs/class/System.Web/ChangeLog b/mcs/class/System.Web/ChangeLog index af2b7d0f5f5..677d6afa69c 100644 --- a/mcs/class/System.Web/ChangeLog +++ b/mcs/class/System.Web/ChangeLog @@ -1,3 +1,7 @@ +2002-07-12 Gonzalo Paniagua Javier + + * System.Web.build: removed some more excludes. + 2002-07-05 Gonzalo Paniagua Javier * list: updated. Currently mcs cannot compile System.Web because it diff --git a/mcs/class/System.Web/System.Web.Hosting/AppDomainFactory.cs b/mcs/class/System.Web/System.Web.Hosting/AppDomainFactory.cs index 7cf5b14a9c1..22627136694 100644 --- a/mcs/class/System.Web/System.Web.Hosting/AppDomainFactory.cs +++ b/mcs/class/System.Web/System.Web.Hosting/AppDomainFactory.cs @@ -3,8 +3,10 @@ // // Author: // Bob Smith +// 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 (); + } } } diff --git a/mcs/class/System.Web/System.Web.Hosting/ChangeLog b/mcs/class/System.Web/System.Web.Hosting/ChangeLog index 31f38df52c3..d85bab3216a 100644 --- a/mcs/class/System.Web/System.Web.Hosting/ChangeLog +++ b/mcs/class/System.Web/System.Web.Hosting/ChangeLog @@ -1,3 +1,10 @@ +2002-07-12 Gonzalo Paniagua Javier + + * 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 * ApplicationHost.cs: Test implementation to support testing. diff --git a/mcs/class/System.Web/System.Web.Hosting/IAppDomainFactory.cs b/mcs/class/System.Web/System.Web.Hosting/IAppDomainFactory.cs index 1317ccc6c54..2067260c4f4 100644 --- a/mcs/class/System.Web/System.Web.Hosting/IAppDomainFactory.cs +++ b/mcs/class/System.Web/System.Web.Hosting/IAppDomainFactory.cs @@ -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); } } + diff --git a/mcs/class/System.Web/System.Web.Hosting/IISAPIRuntime.cs b/mcs/class/System.Web/System.Web.Hosting/IISAPIRuntime.cs index bad6cc4ef80..cf4d7bf6937 100644 --- a/mcs/class/System.Web/System.Web.Hosting/IISAPIRuntime.cs +++ b/mcs/class/System.Web/System.Web.Hosting/IISAPIRuntime.cs @@ -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 (); } } diff --git a/mcs/class/System.Web/System.Web.Hosting/ISAPIRuntime.cs b/mcs/class/System.Web/System.Web.Hosting/ISAPIRuntime.cs index c419344ad25..ac43100c95c 100644 --- a/mcs/class/System.Web/System.Web.Hosting/ISAPIRuntime.cs +++ b/mcs/class/System.Web/System.Web.Hosting/ISAPIRuntime.cs @@ -3,8 +3,10 @@ // // Author: // Bob Smith +// 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 (); + } } } diff --git a/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs b/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs index 8f4df42b9ef..4eff31ecede 100755 --- a/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs +++ b/mcs/class/System.Web/System.Web.UI/AttributeCollection.cs @@ -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] { diff --git a/mcs/class/System.Web/System.Web.UI/ChangeLog b/mcs/class/System.Web/System.Web.UI/ChangeLog index 941d8c2efdd..8184cc695db 100644 --- a/mcs/class/System.Web/System.Web.UI/ChangeLog +++ b/mcs/class/System.Web/System.Web.UI/ChangeLog @@ -1,3 +1,24 @@ +2002-07-12 Gonzalo Paniagua Javier + + * 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 * Control.cs: fixed Visible property. diff --git a/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs b/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs index bcf88bbc436..63ef8e138f6 100755 --- a/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs +++ b/mcs/class/System.Web/System.Web.UI/CssStyleCollection.cs @@ -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); } } } + diff --git a/mcs/class/System.Web/System.Web.UI/DataBinding.cs b/mcs/class/System.Web/System.Web.UI/DataBinding.cs index 4acf0b8a088..cf0c8a07d49 100755 --- a/mcs/class/System.Web/System.Web.UI/DataBinding.cs +++ b/mcs/class/System.Web/System.Web.UI/DataBinding.cs @@ -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) ; } } } diff --git a/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs b/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs index 0eae61eb1a2..33374d4a0bc 100755 --- a/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs +++ b/mcs/class/System.Web/System.Web.UI/DataBoundLiteralControl.cs @@ -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) diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs index 1f80ae2d4a5..2ad046af5c3 100755 --- a/mcs/class/System.Web/System.Web.UI/Page.cs +++ b/mcs/class/System.Web/System.Web.UI/Page.cs @@ -129,7 +129,7 @@ public class Page : TemplateControl, IHttpHandler set { _errorPage = value; } } - public ArrayList FileDependencies + ArrayList FileDependencies { set { _fileDependencies = value; } } diff --git a/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs b/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs index 4a41b4f51a3..95b621a8015 100755 --- a/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs +++ b/mcs/class/System.Web/System.Web.UI/ParseChildrenAttribute.cs @@ -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); } } } diff --git a/mcs/class/System.Web/System.Web.build b/mcs/class/System.Web/System.Web.build index c8132c028e4..942bc9a6313 100644 --- a/mcs/class/System.Web/System.Web.build +++ b/mcs/class/System.Web/System.Web.build @@ -24,12 +24,10 @@ - - - - - - + + + +