Example #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static <TYPE, EXCEPTION extends Exception> TYPE awaitEx(ThrowingSupplier<TYPE,? extends EXCEPTION> supplier, ThrowingPredicate<TYPE, ? extends EXCEPTION> predicate, long timeout, java.util.concurrent.TimeUnit timeoutUnit) throws java.util.concurrent.TimeoutException, EXCEPTION
        public static TYPE AwaitEx <TYPE, EXCEPTION, T1, T2>(ThrowingSupplier <T1> supplier, ThrowingPredicate <T2> predicate, long timeout, TimeUnit timeoutUnit) where EXCEPTION : Exception where T1 : EXCEPTION where T2 : EXCEPTION
        {
            Suppliers.ThrowingCapturingSupplier <TYPE, EXCEPTION> composed = Suppliers.Compose(supplier, predicate);
            AwaitEx(composed, timeout, timeoutUnit);
            return(composed.LastInput());
        }
Example #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static <TYPE, EXCEPTION extends Exception> TYPE awaitEx(ThrowingSupplier<TYPE,EXCEPTION> supplier, ThrowingPredicate<TYPE,EXCEPTION> predicate, long timeout, java.util.concurrent.TimeUnit timeoutUnit, long pollInterval, java.util.concurrent.TimeUnit pollUnit) throws java.util.concurrent.TimeoutException, EXCEPTION
        public static TYPE AwaitEx <TYPE, EXCEPTION>(ThrowingSupplier <TYPE, EXCEPTION> supplier, ThrowingPredicate <TYPE, EXCEPTION> predicate, long timeout, TimeUnit timeoutUnit, long pollInterval, TimeUnit pollUnit) where EXCEPTION : Exception
        {
            Suppliers.ThrowingCapturingSupplier <TYPE, EXCEPTION> composed = Suppliers.Compose(supplier, predicate);
            AwaitEx(composed, timeout, timeoutUnit, pollInterval, pollUnit);
            return(composed.LastInput());
        }