public MethodsThatHaveEquivalentAsynchronousMethodCalledInConstructors(int i)
        {
            var @object = new ClassWithAsyncEquivalentsValueTask();

            @object.SaveChanges();
            @object.Abort();
            @object.AcceptSocket();
            @object.AcceptTcpClient();
            @object.AccessFailed();
        }
Esempio n. 2
0
        public void InstanceMethodsHaveAsynchronousEquivalentsValueTask()
        {
            var @object = new ClassWithAsyncEquivalentsValueTask();

            @object.SaveChanges();
            @object.Abort();
            @object.AcceptSocket();
            @object.AcceptTcpClient();
            @object.AccessFailed();
        }
        public IEnumerable <int> InstanceMethodsHaveAsynchronousEquivalentsValueTask()
        {
            var @object = new ClassWithAsyncEquivalentsValueTask();

            for (int i = 0; i < 100; i++)
            {
                @object.SaveChanges();
                @object.Abort();
                @object.AcceptSocket();
                @object.AcceptTcpClient();
                @object.AccessFailed();

                yield return(i);
            }

            yield break;
        }
Esempio n. 4
0
 public static bool AccessFailed(this ClassWithAsyncEquivalentsValueTask @object) => true;
Esempio n. 5
0
 public static ValueTask <bool> AcceptTcpClientAsync(this ClassWithAsyncEquivalentsValueTask @object) => new ValueTask <bool>(true);