protected override void Dispose(bool disposing) { if (disposing) { this.WebHost?.Dispose(); this.WebHost = null; } base.Dispose(disposing); } }