protected virtual void SetServerState(ServerState state)
{
lock (m_lock)
{
if (ServiceResult.IsBad(ServerError))
{
throw new ServiceResultException(ServerError);
}
if (m_serverInternal == null)
{
throw new ServiceResultException(StatusCodes.BadServerHalted);
}
m_serverInternal.CurrentState = state;
}
}