GSF.ServiceProcess.ServiceHelper.AddProcess C# (CSharp) Method

AddProcess() public method

Adds a new ServiceProcess to the ServiceHelper.
public AddProcess ( object[]>.Action processExecutionMethod, string processName, object processArguments ) : bool
processExecutionMethod object[]>.Action The to be invoked the is started.
processName string Name of the being added.
processArguments object Arguments to be passed in to the during execution.
return bool
        public bool AddProcess(Action<string, object[]> processExecutionMethod, string processName, object[] processArguments)
        {
            processName = processName.Trim();

            if ((object)FindProcess(processName) != null)
                return false;

            ServiceProcess process = new ServiceProcess(processExecutionMethod, processName, processArguments);

            process.StateChanged += Process_StateChanged;

            lock (m_processes)
            {
                m_processes.Add(process);
            }

            return true;
        }

Same methods

ServiceHelper::AddProcess ( object[]>.Action processExecutionMethod, string processName ) : bool
ServiceHelper