* AssemblyInfo.cs: AssemblyConfiguration and AssemblyTrademark
authorGert Driesen <drieseng@users.sourceforge.net>
Fri, 22 Sep 2006 17:52:55 +0000 (17:52 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Fri, 22 Sep 2006 17:52:55 +0000 (17:52 -0000)
attributes are 1.1 only. Added AssemblyFileVersion, Debuggable and
CompilationRelaxtations attribute for 2.0 profile.
* ServiceProcessInstaller.cs: Added missing ServiceProcessDescription
attribute.
* ServiceAccount.cs: Removed extra Serializable attribute.
* ServiceInstaller.cs: Added ServiceProcessDescriptions.
* ServiceBase.cs: Added descriptions for ServiceProcessDescription
as reported by class status. Modified return type of OnPowerEvent
from void to bool.
* ServiceController.cs: Added description for class-level
ServiceProcessDescription. Added TypeConverter for ServiceName.
* TimeoutException.cs: Added ctor introduced in 2.0 profile.
* System.ServiceProcess.dll.sources: Added ServiceNameConverter.cs.
* ServiceNameConverter.cs: Dummy implementation to fix class status.

svn path=/trunk/mcs/; revision=65823

13 files changed:
mcs/class/System.ServiceProcess/Assembly/AssemblyInfo.cs
mcs/class/System.ServiceProcess/Assembly/ChangeLog
mcs/class/System.ServiceProcess/ChangeLog
mcs/class/System.ServiceProcess/System.ServiceProcess.Design/ChangeLog [new file with mode: 0644]
mcs/class/System.ServiceProcess/System.ServiceProcess.Design/ServiceNameConverter.cs [new file with mode: 0644]
mcs/class/System.ServiceProcess/System.ServiceProcess.dll.sources
mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceAccount.cs
mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceController.cs
mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceProcessInstaller.cs
mcs/class/System.ServiceProcess/System.ServiceProcess/TimeoutException.cs

index 106488e4d4b7df64a9eb2141f2cb56c991b9de8f..c21acd2d984f4aacb60b04073f9d1c4ee8d3cebc 100644 (file)
@@ -29,6 +29,7 @@
 //
 
 using System;
+using System.Diagnostics;
 using System.Reflection;
 using System.Resources;
 using System.Security;
@@ -39,14 +40,12 @@ using System.Runtime.InteropServices;
 
 [assembly: AssemblyVersion (Consts.FxVersion)]
 [assembly: SatelliteContractVersion (Consts.FxVersion)]
-                
+
 [assembly: AssemblyTitle ("System.ServiceProcess.dll")]
 [assembly: AssemblyDescription ("System.ServiceProcess.dll")]
-[assembly: AssemblyConfiguration ("Development version")]
 [assembly: AssemblyCompany ("MONO development team")]
 [assembly: AssemblyProduct ("MONO CLI")]
 [assembly: AssemblyCopyright ("(c) 2003 Various Authors")]
-[assembly: AssemblyTrademark ("")]
 
 [assembly: CLSCompliant (true)]
 [assembly: AssemblyDefaultAlias ("System.ServiceProcess.dll")]
@@ -57,3 +56,12 @@ using System.Runtime.InteropServices;
 
 [assembly: AssemblyDelaySign (true)]
 [assembly: AssemblyKeyFile("../msfinal.pub")]
+
+#if NET_2_0
+[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
+[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
+[assembly: Debuggable (DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
+#else
+[assembly: AssemblyConfiguration ("Development version")]
+[assembly: AssemblyTrademark ("")]
+#endif
index 40923a92125e0a7869472bb0aacfe9e62550a8f4..037cb4bdf175da9a09c42104821befbef2cdb048 100644 (file)
@@ -1,5 +1,11 @@
-2004-04-06  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
+2006-09-22  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * AssemblyInfo.cs: AssemblyConfiguration and AssemblyTrademark 
+       attributes are 1.1 only. Added AssemblyFileVersion, Debuggable and
+       CompilationRelaxtations attribute for 2.0 profile.
+
+2004-04-06  Andreas Nahr  <ClassDevelopment@A-SoftTech.com>
 
        * AssemblyInfo.cs: Added
        * ChangeLog: Added
-       * Locale.cs: Added
\ No newline at end of file
+       * Locale.cs: Added
index 79443b551da6967ddc6a3cef6bd5ebc2699a9d90..69f4cc5b951f2ddf5fd2b77df277c1b1fcc45a16 100644 (file)
@@ -1,3 +1,7 @@
+2006-09-22  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * System.ServiceProcess.dll.sources: Added ServiceNameConverter.cs.
+
 2006-09-14  Gert Driesen  <drieseng@users.sourceforge.net>
 
        * Makefile: Treat warnings as error. Ignore no warnings.
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess.Design/ChangeLog b/mcs/class/System.ServiceProcess/System.ServiceProcess.Design/ChangeLog
new file mode 100644 (file)
index 0000000..a47637b
--- /dev/null
@@ -0,0 +1,3 @@
+2006-09-22  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * ServiceNameConverter.cs: Dummy implementation to fix class status.
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess.Design/ServiceNameConverter.cs b/mcs/class/System.ServiceProcess/System.ServiceProcess.Design/ServiceNameConverter.cs
new file mode 100644 (file)
index 0000000..2a24703
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// System.ServiceProcess.Design.ServiceNameConverter
+//
+// Authors:
+//     Gert Driesen (drieseng@users.sourceforge.net)
+//
+// (C) 2006 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.
+//
+
+using System.ComponentModel;
+using System.Globalization;
+
+namespace System.ServiceProcess.Design
+{
+       internal class ServiceNameConverter : TypeConverter
+       {
+               public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
+               {
+                       if (sourceType == typeof (string))
+                               return true;
+                       return base.CanConvertFrom (sourceType);
+               }
+
+               public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value)
+               {
+                       if (value is string)
+                               return ((string) value);
+                       return base.ConvertFrom (context, culture, value);
+               }
+       }
+}
index 3953b2ac62d4cf161c4dc6f1903e8b0021a30d48..65d2c03e6f15666c0ab05e521b561af3e4abd76d 100644 (file)
@@ -21,3 +21,4 @@ System.ServiceProcess/ServiceControllerPermissionEntry.cs
 System.ServiceProcess/ServiceControllerPermissionEntryCollection.cs
 System.ServiceProcess/UnixServiceController.cs
 System.ServiceProcess/Win32ServiceController.cs
+System.ServiceProcess.Design/ServiceNameConverter.cs
index f2b14ac515cfc58f3c6be55ce6da2e0d05289780..486379b42d0da8c58d6b0956549ece6de1b56c58 100644 (file)
@@ -1,3 +1,16 @@
+2006-09-22  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * ServiceProcessInstaller.cs: Added missing ServiceProcessDescription
+       attribute.
+       * ServiceAccount.cs: Removed extra Serializable attribute.
+       * ServiceInstaller.cs: Added ServiceProcessDescriptions.
+       * ServiceBase.cs: Added descriptions for ServiceProcessDescription
+       as reported by class status. Modified return type of OnPowerEvent
+       from void to bool.
+       * ServiceController.cs: Added description for class-level
+       ServiceProcessDescription. Added TypeConverter for ServiceName.
+       * TimeoutException.cs: Added ctor introduced in 2.0 profile.
+
 2006-09-16  Gert Driesen  <drieseng@users.sourceforge.net>
 
        * ServiceProcessInstaller.cs: Added some missing attributes. Fixes
index d4b45a43db7dd3b46b03cefeb3386ca8d790a057..8451c25deef2befb9c95688aa338c09d625b516e 100644 (file)
 
 namespace System.ServiceProcess
 {
-       [Serializable]
        public enum ServiceAccount {
                LocalService = 0,
-               NetworkService = 1,     
+               NetworkService = 1,
                LocalSystem = 2,
                User = 3
        }
index c13b42425391372549b68f69d65560f4bc4d7d0d..10d3335e4449298df80de033c5514085f1a5d7b5 100644 (file)
@@ -64,7 +64,7 @@ namespace System.ServiceProcess
                }
 
                [DefaultValue (true)]
-               [ServiceProcessDescription ("")]
+               [ServiceProcessDescription ("Whether the service should automatically write to the event log on common events such as Install and Start.")]
                public bool AutoLog {
                        get { return auto_log; }
                        set { auto_log = value; }
@@ -132,7 +132,7 @@ namespace System.ServiceProcess
                        }
                }
 
-               [ServiceProcessDescription ("")]
+               [ServiceProcessDescription ("The name by which the service is identified to the system.")]
                [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
                public string ServiceName {
                        get { return service_name; }
@@ -170,8 +170,9 @@ namespace System.ServiceProcess
                {
                }
 
-               protected virtual void OnPowerEvent (PowerBroadcastStatus powerStatus)
+               protected virtual bool OnPowerEvent (PowerBroadcastStatus powerStatus)
                {
+                       return true;
                }
 
                protected virtual void OnShutdown ()
index d4a974b2e188bdba2644445f120f3e4f8470bdff..700f736a657d9ed84e244d126aadfa37653fbe94 100644 (file)
@@ -36,13 +36,16 @@ using System.Globalization;
 #if NET_2_0
 using System.Runtime.InteropServices;
 #endif
+using System.ServiceProcess.Design;
 using System.Threading;
 
 namespace System.ServiceProcess
 {
        [Designer("System.ServiceProcess.Design.ServiceControllerDesigner, " + Consts.AssemblySystem_Design)]
        [MonoTODO ("No unix implementation")]
-       [ServiceProcessDescription ("")]
+#if NET_2_0
+       [ServiceProcessDescription ("Provides the ability to connect to, query, and manipulate running or stopped Windows services.")]
+#endif
        public class ServiceController : Component
        {
                private string _name;
@@ -190,6 +193,7 @@ namespace System.ServiceProcess
                [ReadOnly (true)]
                [RecommendedAsConfigurable (true)]
                [ServiceProcessDescription ("The short name of the service.")]
+               [TypeConverter (typeof (ServiceNameConverter))]
                public string ServiceName {
                        get {
                                if (_serviceName.Length == 0 && (_displayName.Length > 0 || _name.Length > 0))
index b730061765265a4caedc6cb52baf110dc4eac44d..25ee8c27e8f7d228f4846c54088f5db4ee6f6b93 100644 (file)
@@ -55,7 +55,7 @@ namespace System.ServiceProcess
 
                [ComVisible (false)]
                [DefaultValue ("")]
-               [ServiceProcessDescription ("")]
+               [ServiceProcessDescription ("Indicates the service's description (a brief comment that explains the purpose of the service). ")]
                public string Description {
                        get {
                                return description;
@@ -67,6 +67,9 @@ namespace System.ServiceProcess
 #endif
 
                [DefaultValue("")]
+#if NET_2_0
+               [ServiceProcessDescription ("Indicates the friendly name that identifies the service to the user.")]
+#endif
                public string DisplayName {
                        get {
                                return display_name;
@@ -77,6 +80,9 @@ namespace System.ServiceProcess
                }
 
                [DefaultValue("")]
+#if NET_2_0
+               [ServiceProcessDescription ("Indicates the name used by the system to identify this service.")]
+#endif
                [TypeConverter("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
                public string ServiceName {
                        get {
@@ -89,6 +95,9 @@ namespace System.ServiceProcess
                        }
                }
 
+#if NET_2_0
+               [ServiceProcessDescription ("Indicates the services that must be running in order for this service to run.")]
+#endif
                public string[] ServicesDependedOn {
                        get {
                                return services_depended_on;
@@ -99,6 +108,9 @@ namespace System.ServiceProcess
                }
 
                [DefaultValue (ServiceStartMode.Manual)]
+#if NET_2_0
+               [ServiceProcessDescription ("Indicates how and when this service is started.")]
+#endif
                public ServiceStartMode StartType {
                        get {
                                return start_type;
index d3505401d2f2c8161c41f7cf51abc89a4a6aba6e..f70b7fd8512d534afe757b73bee3f93092ba49fa 100644 (file)
@@ -45,6 +45,9 @@ namespace System.ServiceProcess
                private string username;
 
                [DefaultValue (ServiceAccount.User)]
+#if NET_2_0
+               [ServiceProcessDescription ("Indicates the account type under which the service will run.")]
+#endif
                public ServiceAccount Account {
                        get {
                                return account;
index ad95041bd9e00e8fbcd4e0deb8946e29d27d00e8..dcec3ee2d5c69b815ddad37cd91449767b13c34c 100644 (file)
@@ -43,6 +43,13 @@ namespace System.ServiceProcess
                {
                }
 
+#if NET_2_0
+               public TimeoutException (string message, Exception innerException)
+                       : base (message, innerException)
+               {
+               }
+#endif
+
                protected TimeoutException (SerializationInfo info, StreamingContext context) : base (info, context)
                {
                }