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