protected abstract Task<int> OnRunAsync()
Protected MustOverride Function OnRunAsync As Task(Of Integer)
protected: virtual Task<int>^ OnRunAsync() abstract
abstract OnRunAsync : unit -> Task<int>
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.