protected NtServiceControlDeploymentStep(INtServiceManager ntServiceManager, string machineName, string serviceName, NtServiceControlAction action)
        {
            Guard.NotNull(ntServiceManager, "ntServiceManager");
              Guard.NotNullNorEmpty(machineName, "machineName");
              Guard.NotNullNorEmpty(serviceName, "serviceName");

              _ntServiceManager = ntServiceManager;
              _machineName = machineName;
              _serviceName = serviceName;
              _action = action;
        }
Пример #2
0
        protected NtServiceControlDeploymentStep(INtServiceManager ntServiceManager, string machineName, string serviceName, NtServiceControlAction action)
        {
            Guard.NotNull(ntServiceManager, "ntServiceManager");
            Guard.NotNullNorEmpty(machineName, "machineName");
            Guard.NotNullNorEmpty(serviceName, "serviceName");

            _ntServiceManager = ntServiceManager;
            _machineName      = machineName;
            _serviceName      = serviceName;
            _action           = action;
        }
        protected NtServiceControlDeploymentStep(INtServiceManager ntServiceManager, string machineName, string serviceName, NtServiceControlAction action)
        {
            if (ntServiceManager == null)
              {
            throw new ArgumentNullException("ntServiceManager");
              }

              if (string.IsNullOrEmpty(machineName))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "machineName");
              }

              if (string.IsNullOrEmpty(serviceName))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "serviceName");
              }

              _ntServiceManager = ntServiceManager;
              _machineName = machineName;
              _serviceName = serviceName;
              _action = action;
        }