public async Task SendAsync() { if (numberOfTimes++ <= 3) { await Task.Delay(1000); throw new InvalidOperationException(); } } }