Author: miguel
Date: 2007-06-14 10:01:13 -0400 (Thu, 14 Jun 2007)
New Revision: 79547
Modified:
trunk/olive/class/agclr/Internal.cs
Log:
Sync this with the collection changes
Modified: trunk/olive/class/agclr/Internal.cs
===================================================================
--- trunk/olive/class/agclr/Internal.cs 2007-06-14 14:00:33 UTC (rev 79546)
+++ trunk/olive/class/agclr/Internal.cs 2007-06-14 14:01:13 UTC (rev 79547)
@@ -53,12 +53,11 @@
public void Add (T t)
{
- unsafe {
- Value v = DependencyObject.GetAsValue (t);
- void *p = &v;
-
- NativeMethods.collection_add (native, (IntPtr)
p);
- }
+ DependencyObject dob = t as DependencyObject;
+ if (dob != null)
+ NativeMethods.collection_add (native,
dob.native);
+ else
+ throw new Exception ("The collection only
supports DependencyObjects");
}
protected internal override Kind GetKind ()
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches