Click or drag to resize

NeonServiceOnRunAsync Method

Called to actually implement the service.

Namespace:  Neon.Service
Assembly:  Neon.Service (in Neon.Service.dll) Version: 2.14.0
protected abstract Task<int> OnRunAsync()

Return Value

Type: TaskInt32
The the progam exit code.

Services should perform any required initialization and then they must call SetRunningAsync to indicate that the service should transition into the Running state. This is very important because the service test fixture requires the service to be in the running state before it allows tests to proceed. This is necessary to avoid unit test race conditions.

This method should return the program exit code or throw a ProgramExitException to exit with the program exit code.

See Also