public async IAsyncEnumerable <int> InstanceMethodsHaveAsynchronousEquivalentsWithLocalFunctionYielding() { var @object = new ClassWithAsyncEquivalents(); @object.SaveChanges(); @object.Abort(); @object.AcceptSocket(); @object.AcceptTcpClient(); @object.AccessFailed(); yield return(0); 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 IAsyncEnumerable <int> InstanceMethodsHaveAsynchronousEquivalents() { var @object = new ClassWithAsyncEquivalents(); @object.SaveChanges(); @object.Abort(); @object.AcceptSocket(); @object.AcceptTcpClient(); @object.AccessFailed(); yield return(0); }