public IEnumerable <int> InstanceMethodsHaveAsynchronousEquivalents() { var @object = new ClassWithAsyncEquivalents(); for (int i = 0; i < 100; i++) { @object.SaveChanges(); @object.Abort(); @object.AcceptSocket(); @object.AcceptTcpClient(); @object.AccessFailed(); yield return(i); } yield break; }
public static bool AccessFailed(this ClassWithAsyncEquivalents @object) => true;
public static Task <bool> AcceptTcpClientAsync(this ClassWithAsyncEquivalents @object) => new Task <bool>(() => true);