private Task OnConnecting() { if (Connecting != null) { return(Connecting.InvokeAllAsync(this, EventArgs.Empty)); } else { return(Task.CompletedTask); } }