Esempio n. 1
0
        public static ServiceController[] GetServices(string machineName)
        {
            ValidateMachineName(machineName);

            using (ServiceController sc = new ServiceController("dummy", machineName)) {
                ServiceControllerImpl impl = CreateServiceControllerImpl(sc);
                return(impl.GetServices());
            }
        }
Esempio n. 2
0
		public ServiceController (string name, string machineName)
		{
			if (name == null || name.Length == 0)
				throw new ArgumentException (string.Format (CultureInfo.CurrentCulture,
					"Invalid value {0} for parameter name.", name));

			ValidateMachineName (machineName);

			_machineName = machineName;
			_name = name;
			_impl = CreateServiceControllerImpl (this);
		}
Esempio n. 3
0
        public ServiceController(string name, string machineName)
        {
            if (name == null || name.Length == 0)
            {
                throw new ArgumentException(string.Format(CultureInfo.CurrentCulture,
                                                          "Invalid value {0} for parameter name.", name));
            }

            ValidateMachineName(machineName);

            _machineName = machineName;
            _name        = name;
            _impl        = CreateServiceControllerImpl(this);
        }
Esempio n. 4
0
 public ServiceController()
 {
     _machineName = ".";
     _name        = string.Empty;
     _impl        = CreateServiceControllerImpl(this);
 }
Esempio n. 5
0
		public ServiceController ()
		{
			_machineName = ".";
			_name = string.Empty;
			_impl = CreateServiceControllerImpl (this);
		}