Exemplo n.º 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());
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
//ORIGINAL LINE: public static <T, E extends Exception> ThrowingCapturingSupplier<T,E> compose(final ThrowingSupplier<T,? extends E> input, final ThrowingPredicate<T,? extends E> predicate)
        public static ThrowingCapturingSupplier <T, E> Compose <T, E, T1, T2>(ThrowingSupplier <T1> input, ThrowingPredicate <T2> predicate) where E : Exception where T1 : E where T2 : E
        {
            return(new ThrowingCapturingSupplier <T, E>(input, predicate));
        }
Exemplo n.º 3
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());
        }