#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")]
+#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;
private ServiceController [] _dependentServices;
private ServiceController [] _servicesDependedOn;
- [MonoTODO ("No unix implementation")]
public ServiceController ()
{
_machineName = ".";
_impl = CreateServiceControllerImpl (this);
}
- [MonoTODO ("No unix implementation")]
public ServiceController (string name) : this (name, ".")
{
}
- [MonoTODO ("No unix implementation")]
public ServiceController (string name, string machineName)
{
if (name == null || name.Length == 0)
_impl = CreateServiceControllerImpl (this);
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("Whether this service recognizes the Pause and Continue commands.")]
public bool CanPauseAndContinue {
get {
#if NET_2_0
}
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("Whether this service can respond to a system shutdown.")]
public bool CanShutdown {
get
{
}
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("Whether this service can be stopped.")]
public bool CanStop {
get
{
}
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("The services that depend on this service in order to run.")]
public ServiceController [] DependentServices {
get
{
}
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[ReadOnly (true)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("The descriptive name of the service.")]
public string DisplayName {
get {
if (_displayName.Length == 0 && (_serviceName.Length > 0 || _name.Length > 0))
}
}
- [MonoTODO ("No unix implementation")]
[Browsable (false)]
[DefaultValue (".")]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [RecommendedAsConfigurable (true)]
+ [ServiceProcessDescription ("The name of the machine on which this service resides.")]
public string MachineName {
get {
return _machineName;
}
}
- [MonoTODO ("No unix implementation")]
[DefaultValue ("")]
[ReadOnly (true)]
[RecommendedAsConfigurable (true)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("The short name of the service.")]
+ [TypeConverter (typeof (ServiceNameConverter))]
public string ServiceName {
get {
if (_serviceName.Length == 0 && (_displayName.Length > 0 || _name.Length > 0))
}
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("Services that must be started in order for this one to start.")]
public ServiceController [] ServicesDependedOn {
get
{
}
#endif
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("The type of this service.")]
public ServiceType ServiceType {
get
{
}
}
- [MonoTODO ("No unix implementation")]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- [ServiceProcessDescription ("")]
+ [ServiceProcessDescription ("The status of the service, e.g., Running or Stopped.")]
public ServiceControllerStatus Status {
get
{
}
}
- [MonoTODO ("No unix implementation")]
public void Close ()
{
_impl.Close ();
}
- [MonoTODO ("No unix implementation")]
public void Continue ()
{
#if NET_2_0
_impl.Continue ();
}
- [MonoTODO ("No unix implementation")]
protected override void Dispose (bool disposing)
{
_impl.Dispose (disposing);
base.Dispose (disposing);
}
- [MonoTODO ("No unix implementation")]
public void ExecuteCommand (int command)
{
#if NET_2_0
_impl.ExecuteCommand (command);
}
- [MonoTODO ("No unix implementation")]
public static ServiceController[] GetDevices ()
{
return GetDevices (".");
}
- [MonoTODO ("No unix implementation")]
public static ServiceController[] GetDevices (string machineName)
{
ValidateMachineName (machineName);
}
}
- [MonoTODO ("No unix implementation")]
public static ServiceController[] GetServices ()
{
return GetServices (".");
}
- [MonoTODO ("No unix implementation")]
public static ServiceController[] GetServices (string machineName)
{
ValidateMachineName (machineName);
}
}
- [MonoTODO ("No unix implementation")]
public void Pause ()
{
#if NET_2_0
_impl.Pause ();
}
- [MonoTODO ("No unix implementation")]
public void Refresh ()
{
// MSDN: this method also sets the ServicesDependedOn and
_impl.Refresh ();
}
- [MonoTODO ("No unix implementation")]
public void Start ()
{
Start (new string [0]);
}
- [MonoTODO ("No unix implementation")]
public void Start (string [] args)
{
#if NET_2_0
_impl.Start (args);
}
- [MonoTODO ("No unix implementation")]
public void Stop ()
{
#if NET_2_0
_impl.Stop ();
}
- [MonoTODO ("No unix implementation")]
public void WaitForStatus (ServiceControllerStatus desiredStatus)
{
WaitForStatus (desiredStatus, TimeSpan.MaxValue);
}
- [MonoTODO ("No unix implementation")]
public void WaitForStatus (ServiceControllerStatus desiredStatus, TimeSpan timeout)
{
#if NET_2_0