Author: atsushi
Date: 2007-09-27 15:40:48 -0400 (Thu, 27 Sep 2007)
New Revision: 86532
Added:
trunk/mcs/class/System/System.ComponentModel.Design/ITypeDiscoveryService.cs
Modified:
trunk/mcs/class/System/ChangeLog
trunk/mcs/class/System/System.ComponentModel.Design/ActiveDesignerEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/Changelog
trunk/mcs/class/System/System.ComponentModel.Design/CheckoutException.cs
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangedEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangingEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/ComponentEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/ComponentRenameEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/DesignerEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/DesignerOptionService.cs
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransaction.cs
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventArgs.cs
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventHandler.cs
trunk/mcs/class/System/System.ComponentModel.Design/DesignerVerb.cs
trunk/mcs/class/System/System.ComponentModel.Design/HelpContextType.cs
trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordAttribute.cs
trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordType.cs
trunk/mcs/class/System/System.ComponentModel.Design/MenuCommand.cs
trunk/mcs/class/System/System.ComponentModel.Design/ServiceContainer.cs
trunk/mcs/class/System/System.ComponentModel.Design/StandardCommands.cs
trunk/mcs/class/System/System.dll.sources
Log:
2007-09-27 Atsushi Enomoto <[EMAIL PROTECTED]>
* System.dll.sources : added ITypeDiscoveryService.cs.
* ITypeDiscoveryService.cs : new.
* DesignerTransactionCloseEventArgs.cs : added [Obsolete].
* DesignerVerb.cs : added Description. ToString() contains " : ".
* StandardCommands.cs : added DocumentOutline and ViewCode.
* HelpKeywordAttribute.cs : implemented .ctor(Type).
* ComponentChangedEventHandler.cs, ComponentRenameEventHandler.cs,
ActiveDesignerEventHandler.cs, HelpKeywordType.cs,
DesignerEventHandler.cs, ComponentEventHandler.cs,
DesignerTransactionCloseEventHandler.cs, HelpContextType.cs
ComponentChangingEventHandler.cs : [Serializable] is extra in 2.0.
* ServiceContainer.cs : some members became virtual in 2.0.
Removed finalizer. Added DefaultServices.
* DesignerOptionService.cs : it is abstract. Added attributes.
* CheckoutException.cs : added more 2.0 constructors.
* MenuCommand.cs : added Properties property.
* DesignerTransaction.cs : Fixed .ctor() (public->protected)
Modified: trunk/mcs/class/System/ChangeLog
===================================================================
--- trunk/mcs/class/System/ChangeLog 2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/ChangeLog 2007-09-27 19:40:48 UTC (rev 86532)
@@ -1,3 +1,7 @@
+2007-09-27 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * System.dll.sources : added ITypeDiscoveryService.cs.
+
2007-09-25 Jonathan Pobst <[EMAIL PROTECTED]>
* System_test.dll.sources: Added AsyncOperationManagerTest.cs.
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/ActiveDesignerEventHandler.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/ActiveDesignerEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/ActiveDesignerEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -31,6 +31,8 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
public delegate void ActiveDesignerEventHandler (object sender,
ActiveDesignerEventArgs e);
}
Modified: trunk/mcs/class/System/System.ComponentModel.Design/Changelog
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/Changelog
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/Changelog
2007-09-27 19:40:48 UTC (rev 86532)
@@ -1,3 +1,22 @@
+2007-09-27 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * ITypeDiscoveryService.cs : new.
+ * DesignerTransactionCloseEventArgs.cs : added [Obsolete].
+ * DesignerVerb.cs : added Description. ToString() contains " : ".
+ * StandardCommands.cs : added DocumentOutline and ViewCode.
+ * HelpKeywordAttribute.cs : implemented .ctor(Type).
+ * ComponentChangedEventHandler.cs, ComponentRenameEventHandler.cs,
+ ActiveDesignerEventHandler.cs, HelpKeywordType.cs,
+ DesignerEventHandler.cs, ComponentEventHandler.cs,
+ DesignerTransactionCloseEventHandler.cs, HelpContextType.cs
+ ComponentChangingEventHandler.cs : [Serializable] is extra in 2.0.
+ * ServiceContainer.cs : some members became virtual in 2.0.
+ Removed finalizer. Added DefaultServices.
+ * DesignerOptionService.cs : it is abstract. Added attributes.
+ * CheckoutException.cs : added more 2.0 constructors.
+ * MenuCommand.cs : added Properties property.
+ * DesignerTransaction.cs : Fixed .ctor() (public->protected)
+
2007-08-29 Ivan N. Zlatev <[EMAIL PROTECTED]>
* DefaultSerializationProviderAttribute.cs: implemented.
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/CheckoutException.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/CheckoutException.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/CheckoutException.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -30,10 +30,15 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
using System.Runtime.InteropServices;
+using System.Runtime.Serialization;
namespace System.ComponentModel.Design
{
+#if NET_2_0
+ [Serializable]
+#endif
public class CheckoutException : ExternalException
{
public static readonly CheckoutException Canceled = new
CheckoutException ();
@@ -52,5 +57,17 @@
: base (message, errorCode)
{
}
+
+#if NET_2_0
+ public CheckoutException (string message, Exception
innerException)
+ : base (message, innerException)
+ {
+ }
+
+ protected CheckoutException (SerializationInfo info,
StreamingContext context)
+ : base (info, context)
+ {
+ }
+#endif
}
}
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangedEventHandler.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangedEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangedEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -32,7 +32,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
[ComVisible(true)]
public delegate void ComponentChangedEventHandler (object sender,
ComponentChangedEventArgs e);
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangingEventHandler.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangingEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/ComponentChangingEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -32,7 +32,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
[ComVisible(true)]
public delegate void ComponentChangingEventHandler (object sender,
ComponentChangingEventArgs e);
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/ComponentEventHandler.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/ComponentEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/ComponentEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -32,7 +32,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
[ComVisible(true)]
public delegate void ComponentEventHandler (object sender,
ComponentEventArgs e);
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/ComponentRenameEventHandler.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/ComponentRenameEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/ComponentRenameEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -32,7 +32,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
[ComVisible(true)]
public delegate void ComponentRenameEventHandler (object sender,
ComponentRenameEventArgs e);
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/DesignerEventHandler.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/DesignerEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/DesignerEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -30,7 +30,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
public delegate void DesignerEventHandler (object sender,
DesignerEventArgs e);
}
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/DesignerOptionService.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/DesignerOptionService.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/DesignerOptionService.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -37,9 +37,11 @@
namespace System.ComponentModel.Design
{
- public class DesignerOptionService : IDesignerOptionService
+ public abstract class DesignerOptionService : IDesignerOptionService
{
-
+ [MonoTODO ("implement own TypeConverter")]
+ [TypeConverter (typeof (TypeConverter))]
+ [Editor ("", "System.Drawing.Design.UITypeEditor, " +
Consts.AssemblySystem_Drawing)]
public sealed class DesignerOptionCollection : IList,
ICollection, IEnumerable
{
// PropertyDescriptor objects are taken directly from
the value passed to the CreateOptionCollection method
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransaction.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransaction.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransaction.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -37,12 +37,12 @@
private bool committed;
private bool canceled;
- public DesignerTransaction ()
+ protected DesignerTransaction ()
: this ("")
{
}
- public DesignerTransaction (string description)
+ protected DesignerTransaction (string description)
{
this.description = description;
this.committed = false;
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventArgs.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventArgs.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventArgs.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -47,6 +47,9 @@
last_transaction = lastTransaction;
}
+#if NET_2_0
+ [Obsolete ("Use another constructor that indicates
lastTransaction")]
+#endif
public DesignerTransactionCloseEventArgs (bool commit) : this
(commit, false)
{
}
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventHandler.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventHandler.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/DesignerTransactionCloseEventHandler.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -31,7 +31,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
[ComVisible(true)]
public delegate void DesignerTransactionCloseEventHandler (object
sender, DesignerTransactionCloseEventArgs e);
}
Modified: trunk/mcs/class/System/System.ComponentModel.Design/DesignerVerb.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/DesignerVerb.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/DesignerVerb.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -37,8 +37,10 @@
[ComVisible(true)]
public class DesignerVerb : MenuCommand
{
-
+ private string text;
+#if NET_2_0
private string description;
+#endif
public DesignerVerb (string text, EventHandler handler)
: this (text, handler, StandardCommands.VerbFirst)
@@ -47,18 +49,23 @@
public DesignerVerb (string text, EventHandler handler,
CommandID startCommandID)
: base (handler, startCommandID) {
- this.description = text;
+ this.text = text;
}
public string Text {
- get {
- return this.description;
- }
+ get { return text; }
}
+#if NET_2_0
+ public string Description {
+ get { return description; }
+ set { description = value; }
+ }
+#endif
+
public override string ToString()
{
- return string.Concat (description, base.ToString ());
+ return string.Concat (text, " : ", base.ToString ());
}
}
}
Modified: trunk/mcs/class/System/System.ComponentModel.Design/HelpContextType.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/HelpContextType.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/HelpContextType.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -30,7 +30,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
public enum HelpContextType
{
Ambient = 0,
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordAttribute.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordAttribute.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordAttribute.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -47,9 +47,11 @@
this.keyword = keyword;
}
- [MonoTODO("Not Implemented")]
public HelpKeywordAttribute (Type t)
{
+ if (t == null)
+ throw new ArgumentNullException ("t");
+ this.keyword = t.FullName;
}
public override bool Equals (object other)
Modified: trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordType.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordType.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/HelpKeywordType.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -30,7 +30,9 @@
namespace System.ComponentModel.Design
{
+#if !NET_2_0
[Serializable]
+#endif
public enum HelpKeywordType
{
F1Keyword = 0,
Added:
trunk/mcs/class/System/System.ComponentModel.Design/ITypeDiscoveryService.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel.Design/ITypeDiscoveryService.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++
trunk/mcs/class/System/System.ComponentModel.Design/ITypeDiscoveryService.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -0,0 +1,44 @@
+//
+// ITypeDiscoveryService.cs
+//
+// Author:
+// Atsushi Enomoto <[EMAIL PROTECTED]>
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+using System.Collections;
+using System.Runtime.InteropServices;
+
+namespace System.ComponentModel.Design
+{
+ public interface ITypeDiscoveryService
+ {
+ ICollection GetTypes (Type baseType, bool excludeGlobalTypes);
+ }
+}
+
+#endif
Property changes on:
trunk/mcs/class/System/System.ComponentModel.Design/ITypeDiscoveryService.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/mcs/class/System/System.ComponentModel.Design/MenuCommand.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/MenuCommand.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/MenuCommand.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -30,6 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Collections;
using System.Runtime.InteropServices;
namespace System.ComponentModel.Design
@@ -44,6 +45,9 @@
private bool enabled = true;
private bool issupported = true;
private bool visible = true;
+#if NET_2_0
+ private Hashtable properties;
+#endif
public MenuCommand (EventHandler handler, CommandID command)
{
@@ -91,6 +95,16 @@
}
}
+#if NET_2_0
+ public virtual IDictionary Properties {
+ get {
+ if (properties == null)
+ properties = new Hashtable ();
+ return properties;
+ }
+ }
+#endif
+
public virtual bool Supported {
get {
return issupported;
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/ServiceContainer.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/ServiceContainer.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/ServiceContainer.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -70,7 +70,12 @@
AddService (serviceType, callback, false);
}
- public void AddService (Type serviceType,
+#if NET_2_0
+ public virtual
+#else
+ public
+#endif
+ void AddService (Type serviceType,
object serviceInstance,
bool promote)
{
@@ -85,7 +90,12 @@
services.Add (serviceType, serviceInstance);
}
- public void AddService (Type serviceType,
+#if NET_2_0
+ public virtual
+#else
+ public
+#endif
+ void AddService (Type serviceType,
ServiceCreatorCallback callback,
bool promote)
{
@@ -120,7 +130,12 @@
services.Remove (serviceType);
}
- public object GetService (Type serviceType)
+#if NET_2_0
+ public virtual
+#else
+ public
+#endif
+ object GetService (Type serviceType)
{
object result = services[serviceType];
if (result == null && parentProvider != null){
@@ -137,7 +152,11 @@
return result;
}
-#if NET_2_0
+#if NET_2_0
+ protected virtual Type [] DefaultServices {
+ get { return new Type [] { typeof (IServiceContainer),
typeof (ServiceContainer)}; }
+ }
+
public void Dispose ()
{
this.Dispose (true);
@@ -160,11 +179,6 @@
_disposed = true;
}
}
-
- ~ServiceContainer ()
- {
- Dispose (false);
- }
#endif
}
Modified:
trunk/mcs/class/System/System.ComponentModel.Design/StandardCommands.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel.Design/StandardCommands.cs
2007-09-27 19:08:17 UTC (rev 86531)
+++ trunk/mcs/class/System/System.ComponentModel.Design/StandardCommands.cs
2007-09-27 19:40:48 UTC (rev 86532)
@@ -87,6 +87,10 @@
public static readonly CommandID VertSpaceIncrease;
public static readonly CommandID VertSpaceMakeEqual;
public static readonly CommandID ViewGrid;
+#if NET_2_0
+ public static readonly CommandID DocumentOutline;
+ public static readonly CommandID ViewCode;
+#endif
static StandardCommands()
{
@@ -170,6 +174,11 @@
VertSpaceMakeEqual = new CommandID (guidA, 49);
ViewGrid = new CommandID (guidA, 125);
+
+#if NET_2_0
+ DocumentOutline = new CommandID (guidA, 239);
+ ViewCode = new CommandID (guidA, 333);
+#endif
}
public StandardCommands()
Modified: trunk/mcs/class/System/System.dll.sources
===================================================================
--- trunk/mcs/class/System/System.dll.sources 2007-09-27 19:08:17 UTC (rev
86531)
+++ trunk/mcs/class/System/System.dll.sources 2007-09-27 19:40:48 UTC (rev
86532)
@@ -256,6 +256,7 @@
System.ComponentModel.Design/IServiceContainer.cs
System.ComponentModel.Design/ITreeDesigner.cs
System.ComponentModel.Design/ITypeDescriptorFilterService.cs
+System.ComponentModel.Design/ITypeDiscoveryService.cs
System.ComponentModel.Design/ITypeResolutionService.cs
System.ComponentModel.Design/MenuCommand.cs
System.ComponentModel/DesignOnlyAttribute.cs
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches