Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Norton <grompf@sublimeintervention.com>2005-01-23 10:58:57 +0300
committerGeoff Norton <grompf@sublimeintervention.com>2005-01-23 10:58:57 +0300
commit20e91be152492a8683dc14ffe6b5b1317a66b64d (patch)
treecf8e7ece4c1c15aab9e443103b521e321c79c099
parent67f3d5f1270bf785f11f4d2264a374ae17900227 (diff)
2005-01-23 Geoff Norton <gnorton@customerdna.com>
* ServiceBase.cs: Implement missing virtuals. * ServiceInstaller.cs: Initial Implementation. * ServiceProcessInstaller.cs: Initial Implementation. svn path=/trunk/mcs/; revision=39373
-rw-r--r--mcs/class/System.ServiceProcess/ChangeLog5
-rw-r--r--mcs/class/System.ServiceProcess/Makefile2
-rw-r--r--mcs/class/System.ServiceProcess/System.ServiceProcess.dll.sources2
-rw-r--r--mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog6
-rw-r--r--mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs10
-rw-r--r--mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs107
-rw-r--r--mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceProcessInstaller.cs93
7 files changed, 224 insertions, 1 deletions
diff --git a/mcs/class/System.ServiceProcess/ChangeLog b/mcs/class/System.ServiceProcess/ChangeLog
index 33f28ba3b54..d6aeaffa9a8 100644
--- a/mcs/class/System.ServiceProcess/ChangeLog
+++ b/mcs/class/System.ServiceProcess/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-23 Geoff Norton <gnorton@customerdna.com>
+
+ * System.ServiceProcess.dll.sources: Add ServiceInstaller and
+ ServiceProcessInstaller to the build.
+
2004-09-11 Sebastien Pouliot <sebastien@ximian.com>
* Makefile: Updated to include unit tests.
diff --git a/mcs/class/System.ServiceProcess/Makefile b/mcs/class/System.ServiceProcess/Makefile
index a2c502f85ad..9153893b1f0 100644
--- a/mcs/class/System.ServiceProcess/Makefile
+++ b/mcs/class/System.ServiceProcess/Makefile
@@ -3,7 +3,7 @@ SUBDIRS =
include ../../build/rules.make
LIBRARY = System.ServiceProcess.dll
-LIB_MCS_FLAGS = /r:System.dll
+LIB_MCS_FLAGS = /r:System.dll /r:System.Configuration.Install.dll
EXTRA_DISTFILES =
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess.dll.sources b/mcs/class/System.ServiceProcess/System.ServiceProcess.dll.sources
index a8cc937f979..9a087de9e94 100644
--- a/mcs/class/System.ServiceProcess/System.ServiceProcess.dll.sources
+++ b/mcs/class/System.ServiceProcess/System.ServiceProcess.dll.sources
@@ -5,6 +5,8 @@ System.ServiceProcess/PowerBroadcastStatus.cs
System.ServiceProcess/ServiceAccount.cs
System.ServiceProcess/ServiceControllerPermissionAccess.cs
System.ServiceProcess/ServiceControllerStatus.cs
+System.ServiceProcess/ServiceInstaller.cs
+System.ServiceProcess/ServiceProcessInstaller.cs
System.ServiceProcess/ServiceStartMode.cs
System.ServiceProcess/ServiceType.cs
System.ServiceProcess/ServiceBase.cs
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog b/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
index c9822f91fae..01ceca70be7 100644
--- a/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
+++ b/mcs/class/System.ServiceProcess/System.ServiceProcess/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-23 Geoff Norton <gnorton@customerdna.com>
+
+ * ServiceBase.cs: Implement missing virtuals.
+ * ServiceInstaller.cs: Initial Implementation.
+ * ServiceProcessInstaller.cs: Initial Implementation.
+
2004-09-11 Sebastien Pouliot <sebastien@ximian.com>
* ChangeLog: New.
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
index 233b37e79a1..1dfe04b442c 100644
--- a/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
+++ b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceBase.cs
@@ -138,6 +138,16 @@ namespace System.ServiceProcess
protected virtual void OnStart (string [] args) { }
protected virtual void OnStop () { }
+
+ protected virtual void OnContinue () { }
+
+ protected virtual void OnCustomCommand () { }
+
+ protected virtual void OnPause () { }
+
+ protected virtual void OnPowerEvent () { }
+
+ protected virtual void OnShutdown () { }
public static void Run (ServiceBase service) { }
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
new file mode 100644
index 00000000000..6d90b7e39ca
--- /dev/null
+++ b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceInstaller.cs
@@ -0,0 +1,107 @@
+//
+// System.ServiceProcess.ServiceInstaller.cs
+//
+// Authors:
+// Geoff Norton (gnorton@customerdna.com)
+//
+// (C) 2005, Geoff Norton
+//
+
+//
+// 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;
+using System.Collections;
+using System.ComponentModel;
+using System.Configuration.Install;
+
+namespace System.ServiceProcess
+{
+ public class ServiceInstaller : System.Configuration.Install.ComponentInstaller
+ {
+ public ServiceInstaller () {}
+
+ private string display_name;
+ private string service_name;
+ private string[] services_depended_on;
+ private ServiceStartMode start_type;
+
+ public string DisplayName {
+ get {
+ return display_name;
+ }
+ set {
+ display_name = value;
+ }
+ }
+
+ public string ServiceName {
+ get {
+ return service_name;
+ }
+ set {
+ if (value == null || value.Length == 0 || value.Length > 256)
+ throw new ArgumentException ();
+ service_name = value;
+ }
+ }
+
+ public string[] ServicesDependedOn {
+ get {
+ return services_depended_on;
+ }
+ set {
+ services_depended_on = value;
+ }
+ }
+
+ public ServiceStartMode StartType {
+ get {
+ return start_type;
+ }
+ set {
+ start_type = value;
+ }
+ }
+
+ public override void CopyFromComponent (IComponent component) {
+ if (!component.GetType ().IsSubclassOf (typeof (ServiceBase)))
+ throw new ArgumentException ();
+ }
+
+ public override void Install (IDictionary stateSaver) {
+ throw new NotImplementedException ();
+ }
+
+ public override bool IsEquivalentInstaller (ComponentInstaller otherInstaller) {
+ throw new NotImplementedException ();
+ }
+
+ public override void Rollback (IDictionary savedState) {
+ throw new NotImplementedException ();
+ }
+
+ public override void Uninstall (IDictionary savedState) {
+ throw new NotImplementedException ();
+ }
+ }
+}
diff --git a/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceProcessInstaller.cs b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceProcessInstaller.cs
new file mode 100644
index 00000000000..ec404a26a04
--- /dev/null
+++ b/mcs/class/System.ServiceProcess/System.ServiceProcess/ServiceProcessInstaller.cs
@@ -0,0 +1,93 @@
+//
+// System.ServiceProcess.ServiceProcessInstaller.cs
+//
+// Authors:
+// Geoff Norton (gnorton@customerdna.com)
+//
+// (C) 2005, Geoff Norton
+//
+
+//
+// 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;
+using System.Collections;
+using System.ComponentModel;
+using System.Configuration.Install;
+
+namespace System.ServiceProcess
+{
+ public class ServiceProcessInstaller : System.Configuration.Install.ComponentInstaller
+ {
+ public ServiceProcessInstaller () {}
+
+ private ServiceAccount account;
+ private string password;
+ private string username;
+
+ public ServiceAccount Account {
+ get {
+ return account;
+ }
+ set {
+ account = value;
+ }
+ }
+
+ public override string HelpText {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public string Password {
+ get {
+ return password;
+ }
+ set {
+ password = value;
+ }
+ }
+
+ public string Username {
+ get {
+ return username;
+ }
+ set {
+ username = value;
+ }
+ }
+
+ public override void CopyFromComponent (IComponent component) {
+ if (!component.GetType ().IsSubclassOf (typeof (ServiceBase)))
+ throw new ArgumentException ();
+ }
+
+ public override void Install (IDictionary stateSaver) {
+ throw new NotImplementedException ();
+ }
+
+ public override void Rollback (IDictionary savedState) {
+ throw new NotImplementedException ();
+ }
+ }
+}