BlueCollar.Service.Service.OnStart C# (CSharp) Method

OnStart() protected method

Executes when a Start command is sent to the service by the Service Control Manager (SCM) or when the operating system starts (for a service that starts automatically). Specifies actions to take when the service starts.
protected OnStart ( string args ) : void
args string Data passed by the start command.
return void
        protected override void OnStart(string[] args)
        {
            IEnumerable<ApplicationElement> applications = GetApplicationElements();

            lock (this.locker)
            {
                this.isRunning = true;
                this.coordinator.StartAndRefresh(applications);
                this.CreateWatcher();
            }
        }