ServiceController.Continue 메서드

정의

일시 중지한 서비스를 계속합니다.

public:
 void Continue();
public void Continue ();
member this.Continue : unit -> unit
Public Sub Continue ()

예외

시스템 API에 액세스할 때 오류가 발생했습니다.

서비스를 찾을 수 없습니다.

예제

다음 예제에서는 일시 중지된 서비스를 계속하기 위해 메서드를 사용하는 Continue 방법을 보여 줍니다. 이 예제는 클래스에 대해 제공되는 더 큰 예제의 ServiceController 일부입니다.

sc.Continue();
while (sc.Status == ServiceControllerStatus.Paused)
{
    Thread.Sleep(1000);
    sc.Refresh();
}
Console.WriteLine("Status = " + sc.Status);
sc.Continue()
While sc.Status = ServiceControllerStatus.Paused
    Thread.Sleep(1000)
    sc.Refresh()
End While
Console.WriteLine("Status = " + sc.Status.ToString())

설명

서비스를 호출 Continue 할 때 해당 상태가 먼저 ContinuePending 로 변경된 다음 메서드가 Continue 반환되면 해당 상태가 변경됩니다 Running.

서비스 컨트롤러 상태가 Paused될 때까지 서비스를 호출 Continue 할 수 없습니다.

적용 대상

추가 정보