ServiceBase.OnContinue Método

Definição

Quando implementado em uma classe derivada, OnContinue() é executado quando o comando Continuar é enviado para o serviço pelo SCM (Gerenciador de Controle de Serviço).When implemented in a derived class, OnContinue() runs when a Continue command is sent to the service by the Service Control Manager (SCM). Especifica as ações a serem tomadas quando um serviço retoma o funcionamento normal após estar em pausa.Specifies actions to take when a service resumes normal functioning after being paused.

protected:
 virtual void OnContinue();
protected virtual void OnContinue ();
abstract member OnContinue : unit -> unit
override this.OnContinue : unit -> unit
Protected Overridable Sub OnContinue ()

Comentários

Implemente OnContinue para espelhar a resposta do seu aplicativo ao OnPause .Implement OnContinue to mirror your application's response to OnPause. Quando você continua o serviço (por meio do console de serviços ou de forma programática), o OnContinue processamento é executado e o serviço se torna ativo novamente.When you continue the service (either through the Services console or programmatically), the OnContinue processing runs, and the service becomes active again.

OnContinue deve ser substituído quando a CanPauseAndContinue propriedade é true .OnContinue is expected to be overridden when the CanPauseAndContinue property is true.

Se CanPauseAndContinue for false , o SCM não passará as solicitações Pause ou continue para o serviço, de modo que os OnPause OnContinue métodos e não serão chamados mesmo se forem implementados.If CanPauseAndContinue is false, the SCM will not pass Pause or Continue requests to the service, so the OnPause and OnContinue methods will not be called even if they are implemented. No SCM, os Pause controles e Continue são desabilitados quando o CanPauseAndContinue é false .In the SCM, the Pause and Continue controls are disabled when CanPauseAndContinue is false.

Aplica-se a

Confira também