public static void StopService() { lock (typeof(RestService)) { _service.Dispose(); _service = null; } }