public async void InstanceMethodsHaveAsynchronousEquivalentsWithLocalFunctionYielding() { var @object = new ClassWithAsyncEquivalents(); @object.SaveChanges(); @object.Abort(); @object.AcceptSocket(); @object.AcceptTcpClient(); @object.AccessFailed(); YieldSomething(); IEnumerable <int> YieldSomething() { for (int i = 0; i < 100; i++) { @object.SaveChanges(); @object.Abort(); @object.AcceptSocket(); @object.AcceptTcpClient(); @object.AccessFailed(); yield return(i); } yield break; } }
public async void InstanceMethodsHaveAsynchronousEquivalents() { var @object = new ClassWithAsyncEquivalents(); @object.SaveChanges(); @object.Abort(); @object.AcceptSocket(); @object.AcceptTcpClient(); @object.AccessFailed(); }