copying the latest Sys.Web.Services from trunk.
[mono.git] / mcs / class / System.ServiceProcess / System.ServiceProcess / ServiceInstaller.cs
1 //
2 // System.ServiceProcess.ServiceInstaller.cs
3 //
4 // Authors:
5 //      Geoff Norton (gnorton@customerdna.com)
6 //
7 // (C) 2005, Geoff Norton
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31
32 using System;
33 using System.Collections;
34 using System.ComponentModel;
35 using System.Configuration.Install;
36
37 namespace System.ServiceProcess
38 {
39         public class ServiceInstaller : System.Configuration.Install.ComponentInstaller
40         {
41                 public ServiceInstaller () {}
42
43                 private string display_name;
44                 private string service_name;
45                 private string[] services_depended_on;
46                 private ServiceStartMode start_type;
47
48                 public string DisplayName {
49                         get {
50                                 return display_name;
51                         }
52                         set {
53                                 display_name = value;
54                         }
55                 }
56
57                 public string ServiceName {
58                         get {
59                                 return service_name;
60                         }
61                         set {
62                                 if (value == null || value.Length == 0 || value.Length > 256)
63                                         throw new ArgumentException ();
64                                 service_name = value;
65                         }
66                 }
67
68                 public string[] ServicesDependedOn {
69                         get {
70                                 return services_depended_on;
71                         }
72                         set {
73                                 services_depended_on = value;
74                         }
75                 }
76
77                 public ServiceStartMode StartType {
78                         get {
79                                 return start_type;
80                         }
81                         set {
82                                 start_type = value;
83                         }
84                 }
85
86                 public override void CopyFromComponent (IComponent component) {
87                         if (!component.GetType ().IsSubclassOf (typeof (ServiceBase)))
88                                 throw new ArgumentException ();
89                 }
90
91                 public override void Install (IDictionary stateSaver) {
92                         throw new NotImplementedException ();
93                 }
94         
95                 public override bool IsEquivalentInstaller (ComponentInstaller otherInstaller) {
96                         throw new NotImplementedException ();
97                 }
98
99                 public override void Rollback (IDictionary savedState) {
100                         throw new NotImplementedException ();
101                 }
102
103                 public override void Uninstall (IDictionary savedState) {
104                         throw new NotImplementedException ();
105                 }
106         }
107 }