X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web.UI%2FDataBindingCollection.cs;h=c919e35af0c8ad5bddde3f53828f8d7a753be797;hb=d49951ccf584ba637afb1dab7fff714478e3174d;hp=1d1ecc00944330493d66029f1b06e0cd4de69c2a;hpb=29f95a7d2392761ca8aa5a0d45f598241b40f947;p=mono.git diff --git a/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs b/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs index 1d1ecc00944..c919e35af0c 100644 --- a/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs +++ b/mcs/class/System.Web/System.Web.UI/DataBindingCollection.cs @@ -71,6 +71,7 @@ namespace System.Web.UI { public void Add (DataBinding binding) { list.Add (binding.PropertyName, binding); + RaiseChanged (); } public void Clear () @@ -80,7 +81,7 @@ namespace System.Web.UI { public void CopyTo (Array array, int index) { - list.CopyTo (array, index); + list.Values.CopyTo (array, index); } public IEnumerator GetEnumerator () @@ -98,6 +99,7 @@ namespace System.Web.UI { { removed.Add (propertyName); list.Remove (propertyName); + RaiseChanged (); } public void Remove (string propertyName, @@ -110,14 +112,21 @@ namespace System.Web.UI { list.Remove (propertyName); } + #if NET_2_0 public bool Contains (string propertyName) { return list.Contains (propertyName); } - [MonoTODO] public event EventHandler Changed; +#else + internal event EventHandler Changed; #endif + internal void RaiseChanged () + { + if (Changed != null) + Changed (this, EventArgs.Empty); + } } }