I currently use this
The problem is that the service is quite complex and can has to be stopped politely. Usually this takes less then five seconds, sometimes up to 20 seconds.
From what I understand Service.Stop does not return anything. I am currently dealing with this in a rather ugly loop. Stop the service -> check to see if the service is stopped --> if not loop for another five seconds --> and so forth until the service is reported stopped.
Is there a better way of doing this?
BTW, I am new to this forum and SuF 7. My searching skills are not yet what they should be.
Code:
Service.Stop("Myservic", "",5);
From what I understand Service.Stop does not return anything. I am currently dealing with this in a rather ugly loop. Stop the service -> check to see if the service is stopped --> if not loop for another five seconds --> and so forth until the service is reported stopped.
Is there a better way of doing this?
BTW, I am new to this forum and SuF 7. My searching skills are not yet what they should be.
Comment