Modified:
trunk/mcs/class/System/System.ComponentModel/AsyncOperationManager.cs
trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs
trunk/mcs/class/System/System.ComponentModel/BackgroundWorker.cs
trunk/mcs/class/System/System.ComponentModel/BindingList.cs
trunk/mcs/class/System/System.ComponentModel/CategoryAttribute.cs
trunk/mcs/class/System/System.ComponentModel/ChangeLog
trunk/mcs/class/System/System.ComponentModel/Component.cs
trunk/mcs/class/System/System.ComponentModel/DataObjectFieldAttribute.cs
trunk/mcs/class/System/System.ComponentModel/DefaultValueAttribute.cs
trunk/mcs/class/System/System.ComponentModel/DescriptionAttribute.cs
trunk/mcs/class/System/System.ComponentModel/EventDescriptorCollection.cs
trunk/mcs/class/System/System.ComponentModel/IComNativeDescriptorHandler.cs
trunk/mcs/class/System/System.ComponentModel/IListSource.cs
trunk/mcs/class/System/System.ComponentModel/ListSortDescriptionCollection.cs
trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs
trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs
trunk/mcs/class/System/System.ComponentModel/SyntaxCheck.cs
trunk/mcs/class/System/System.ComponentModel/ToolboxItemFilterAttribute.cs
Log:
2007-05-31 Atsushi Enomoto <ats...@ximian.com>
* AsyncOperationManager.cs AttributeCollection.cs
BackgroundWorker.cs BindingList.cs CategoryAttribute.cs
Component.cs DataObjectFieldAttribute.cs DefaultValueAttribute.cs
DescriptionAttribute.cs EventDescriptorCollection.cs
IComNativeDescriptorHandler.cs IListSource.cs
ListSortDescriptionCollection.cs MemberDescriptor.cs
PropertyDescriptor.cs SyntaxCheck.cs ToolboxItemFilterAttribute.cs:
2.0 profile updates.
Modified: trunk/mcs/class/System/System.ComponentModel/AsyncOperationManager.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/AsyncOperationManager.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/AsyncOperationManager.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -44,6 +44,7 @@
current_context = default_context;
}
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
public static SynchronizationContext SynchronizationContext {
get { return current_context; }
[SecurityPermission (SecurityAction.LinkDemand)]
Modified: trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/AttributeCollection.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -47,7 +47,11 @@
attrList = attributes;
}
+#if NET_2_0
+ public AttributeCollection (params Attribute[] attributes)
+#else
public AttributeCollection (Attribute[] attributes)
+#endif
{
if (attributes != null)
for (int i = 0; i < attributes.Length; i++)
Modified: trunk/mcs/class/System/System.ComponentModel/BackgroundWorker.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/BackgroundWorker.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/BackgroundWorker.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -33,6 +33,7 @@
namespace System.ComponentModel
{
+ [DefaultEvent ("DoWork")]
public class BackgroundWorker : Component
{
public BackgroundWorker ()
Modified: trunk/mcs/class/System/System.ComponentModel/BindingList.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/BindingList.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/BindingList.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -333,6 +333,18 @@
get { return SortPropertyCore; }
}
+ bool IBindingList.AllowEdit {
+ get { return AllowEdit; }
+ }
+
+ bool IBindingList.AllowNew {
+ get { return AllowNew; }
+ }
+
+ bool IBindingList.AllowRemove {
+ get { return AllowRemove; }
+ }
+
bool IBindingList.SupportsChangeNotification {
get { return SupportsChangeNotificationCore; }
}
Modified: trunk/mcs/class/System/System.ComponentModel/CategoryAttribute.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/CategoryAttribute.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/CategoryAttribute.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -42,6 +42,9 @@
static volatile CategoryAttribute action, appearance, behaviour, data, def;
static volatile CategoryAttribute design, drag_drop, focus, format, key;
static volatile CategoryAttribute layout, mouse, window_style;
+#if NET_2_0
+ static volatile CategoryAttribute async;
+#endif
static object lockobj = new object ();
@@ -82,6 +85,21 @@
}
}
+#if NET_2_0
+ public static CategoryAttribute Asynchronous {
+ get {
+ if (behaviour != null)
+ return behaviour;
+
+ lock (lockobj) {
+ if (async == null)
+ async = new CategoryAttribute ("Asynchrinous");
+ }
+ return async;
+ }
+ }
+#endif
+
public static CategoryAttribute Behavior {
get {
if (behaviour != null)
Modified: trunk/mcs/class/System/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-05-31 09:42:25 UTC (rev 78306)
@@ -1,3 +1,14 @@
+2007-05-31 Atsushi Enomoto <ats...@ximian.com>
+
+ * AsyncOperationManager.cs AttributeCollection.cs
+ BackgroundWorker.cs BindingList.cs CategoryAttribute.cs
+ Component.cs DataObjectFieldAttribute.cs DefaultValueAttribute.cs
+ DescriptionAttribute.cs EventDescriptorCollection.cs
+ IComNativeDescriptorHandler.cs IListSource.cs
+ ListSortDescriptionCollection.cs MemberDescriptor.cs
+ PropertyDescriptor.cs SyntaxCheck.cs ToolboxItemFilterAttribute.cs:
+ 2.0 profile updates.
+
2007-05-15 Adar Wesley <ad...@mainsoft.com>
* AttributeCollection.cs: added missing method FromExisting.
Modified: trunk/mcs/class/System/System.ComponentModel/Component.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/Component.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/Component.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -32,10 +32,15 @@
using System;
using System.ComponentModel;
+using System.Runtime.InteropServices;
namespace System.ComponentModel {
[DesignerCategory ("Component")]
+#if NET_2_0
+ [ComVisible (true)]
+ [ClassInterface (ClassInterfaceType.AutoDispatch)]
+#endif
public class Component : MarshalByRefObject, IComponent, IDisposable
{
@@ -48,6 +53,12 @@
event_handlers = null;
}
+#if NET_2_0
+ protected virtual bool CanRaiseEvents {
+ get { return false; }
+ }
+#endif
+
[Browsable (false), DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public IContainer Container {
get {
Modified: trunk/mcs/class/System/System.ComponentModel/DataObjectFieldAttribute.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/DataObjectFieldAttribute.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/DataObjectFieldAttribute.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -63,7 +63,23 @@
is_nullable = isNullable;
this.length = length;
}
-
+
+ public bool IsIdentity {
+ get { return is_identity; }
+ }
+
+ public bool IsNullable {
+ get { return is_nullable; }
+ }
+
+ public int Length {
+ get { return length; }
+ }
+
+ public bool PrimaryKey {
+ get { return primary_key; }
+ }
+
public override bool Equals (object obj)
{
DataObjectFieldAttribute other = obj as DataObjectFieldAttribute;
Modified: trunk/mcs/class/System/System.ComponentModel/DefaultValueAttribute.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/DefaultValueAttribute.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/DefaultValueAttribute.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -99,7 +99,11 @@
} catch { }
}
+#if NET_2_0
+ public virtual object Value {
+#else
public object Value {
+#endif
get { return DefaultValue; }
}
Modified: trunk/mcs/class/System/System.ComponentModel/DescriptionAttribute.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/DescriptionAttribute.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/DescriptionAttribute.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -82,6 +82,13 @@
{
return desc.GetHashCode ();
}
+
+#if NET_2_0
+ public override bool IsDefaultAttribute ()
+ {
+ return this == Default;
+ }
+#endif
}
}
Modified: trunk/mcs/class/System/System.ComponentModel/EventDescriptorCollection.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/EventDescriptorCollection.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/EventDescriptorCollection.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -39,7 +39,7 @@
public class EventDescriptorCollection : IList, ICollection, IEnumerable
{
private ArrayList eventList = new ArrayList ();
-
+ private bool isReadOnly;
public static readonly EventDescriptorCollection Empty = new EventDescriptorCollection ();
private EventDescriptorCollection ()
@@ -52,7 +52,16 @@
}
public EventDescriptorCollection (EventDescriptor[] events)
+ : this (events, false)
{
+ }
+
+#if NET_2_0
+ public
+#endif
+ EventDescriptorCollection (EventDescriptor[] events, bool readOnly)
+ {
+ this.isReadOnly = readOnly;
if (events == null)
return;
@@ -60,15 +69,22 @@
this.Add (events[i]);
}
- public int Add (EventDescriptor value) {
+ public int Add (EventDescriptor value)
+ {
+ if (isReadOnly)
+ throw new InvalidOperationException ("The collection is read-only");
return eventList.Add (value);
}
- void IList.Clear () {
+ void IList.Clear ()
+ {
Clear ();
}
- public void Clear () {
+ public void Clear ()
+ {
+ if (isReadOnly)
+ throw new InvalidOperationException ("The collection is read-only");
eventList.Clear ();
}
@@ -97,19 +113,29 @@
return eventList.IndexOf (value);
}
- public void Insert (int index, EventDescriptor value) {
+ public void Insert (int index, EventDescriptor value)
+ {
+ if (isReadOnly)
+ throw new InvalidOperationException ("The collection is read-only");
eventList.Insert (index, value);
}
- public void Remove (EventDescriptor value) {
+ public void Remove (EventDescriptor value)
+ {
+ if (isReadOnly)
+ throw new InvalidOperationException ("The collection is read-only");
eventList.Remove (value);
}
- void IList.RemoveAt (int index) {
+ void IList.RemoveAt (int index)
+ {
RemoveAt (index);
}
- public void RemoveAt (int index) {
+ public void RemoveAt (int index)
+ {
+ if (isReadOnly)
+ throw new InvalidOperationException ("The collection is read-only");
eventList.RemoveAt (index);
}
@@ -243,6 +269,8 @@
return eventList[index];
}
set {
+ if (isReadOnly)
+ throw new InvalidOperationException ("The collection is read-only");
eventList[index] = value;
}
}
Modified: trunk/mcs/class/System/System.ComponentModel/IComNativeDescriptorHandler.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/IComNativeDescriptorHandler.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/IComNativeDescriptorHandler.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -32,6 +32,9 @@
namespace System.ComponentModel
{
+#if NET_2_0
+ [Obsolete ("Use TypeDescriptionProvider and TypeDescriptor.ComObjectType instead")]
+#endif
public interface IComNativeDescriptorHandler
{
AttributeCollection GetAttributes(object component);
Modified: trunk/mcs/class/System/System.ComponentModel/IListSource.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/IListSource.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/IListSource.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -35,6 +35,13 @@
/// <summary>
/// Provides functionality to an object to return a list that can be bound to a data source.
/// </summary>
+#if NET_2_0
+ [MergableProperty (false)]
+ [TypeConverter ("System.Windows.Forms.Design.DataSourceConverter, " + Consts.AssemblySystem_Design)]
+ // disable it until winforms guys have this internal class or some alternatives implemented.
+// [Editor (EditorTypeName = "System.Windows.Forms.Design.DataSourceListEditor, " + AssemblySystem_Design,
+// EditorBaseTypeName = "System.Drawing.Design.UITypeEditor, " + AssemblySystem_Drawing)]
+#endif
public interface IListSource
{
IList GetList ();
Modified: trunk/mcs/class/System/System.ComponentModel/ListSortDescriptionCollection.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ListSortDescriptionCollection.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/ListSortDescriptionCollection.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -42,7 +42,7 @@
list = new ArrayList();
}
- public virtual int Count {
+ public int Count {
get { return list.Count; }
}
Modified: trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/MemberDescriptor.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -220,6 +220,9 @@
return null;
}
+//#if NET_2_0 // uncomment when it is implemented
+// [Obsolete ("Use GetInvocationTarget")]
+//#endif
protected static object GetInvokee(Type componentClass, object component)
{
if (component is IComponent) {
Modified: trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/PropertyDescriptor.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -98,6 +98,12 @@
public abstract Type PropertyType { get; }
+#if NET_2_0
+ public virtual bool SupportsChangeEvents {
+ get { return false; }
+ }
+#endif
+
public DesignerSerializationVisibility SerializationVisibility {
get {
foreach (Attribute attr in AttributeArray) {
@@ -159,6 +165,18 @@
}
#if NET_2_0
+ [MonoNotSupported ("")]
+ protected override void FillAttributes (IList attributeList)
+ {
+ throw new NotImplementedException ();
+ }
+
+ [MonoNotSupported ("")]
+ protected override Object GetInvocationTarget (Type type, object instance)
+ {
+ throw new NotImplementedException ();
+ }
+
[MonoNotSupported("")]
protected internal EventHandler GetValueChangedHandler (object component)
{
Modified: trunk/mcs/class/System/System.ComponentModel/SyntaxCheck.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/SyntaxCheck.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/SyntaxCheck.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -33,13 +33,15 @@
namespace System.ComponentModel
{
#if NET_2_0
- sealed
+ static
#endif
public class SyntaxCheck
{
+#if !NET_2_0
private SyntaxCheck ()
{
}
+#endif
public static bool CheckMachineName (string value)
{
Modified: trunk/mcs/class/System/System.ComponentModel/ToolboxItemFilterAttribute.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ToolboxItemFilterAttribute.cs 2007-05-31 09:10:45 UTC (rev 78305)
+++ trunk/mcs/class/System/System.ComponentModel/ToolboxItemFilterAttribute.cs 2007-05-31 09:42:25 UTC (rev 78306)
@@ -84,5 +84,13 @@
return false;
return ((ToolboxItemFilterAttribute) obj).FilterString == Filter;
}
+
+#if NET_2_0
+ [MonoTODO]
+ public override string ToString ()
+ {
+ return base.ToString ();
+ }
+#endif
}
}