Show / Hide Table of Contents

    Class TesterFuncUtility

    This utility class is designed to handle those rare scenarios where you have knowledge about potential exceptions that can be safely ignored.

    Inheritance
    System.Object
    TesterFuncUtility
    Namespace: Cuemon
    Assembly: Cuemon.Core.dll
    Syntax
    public static class TesterFuncUtility

    Methods

    | Improve this Doc

    TryExecuteAction(Action)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteAction(Action method)
    Parameters
    Type Name Description
    System.Action method

    The delegate to invoke.

    Returns
    Type Description
    System.Boolean

    true if the delegate method was invoked without triggering an exception; otherwise false.

    | Improve this Doc

    TryExecuteAction<T>(Action<T>, T)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteAction<T>(Action<T> method, T arg)
    Parameters
    Type Name Description
    System.Action<T> method

    The delegate to invoke.

    T arg

    The first parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if the delegate method was invoked without triggering an exception; otherwise false.

    Type Parameters
    Name Description
    T

    The type of the parameter of the method.

    | Improve this Doc

    TryExecuteAction<T1, T2>(Action<T1, T2>, T1, T2)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteAction<T1, T2>(Action<T1, T2> method, T1 arg1, T2 arg2)
    Parameters
    Type Name Description
    System.Action<T1, T2> method

    The delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if the delegate method was invoked without triggering an exception; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    | Improve this Doc

    TryExecuteAction<T1, T2, T3>(Action<T1, T2, T3>, T1, T2, T3)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteAction<T1, T2, T3>(Action<T1, T2, T3> method, T1 arg1, T2 arg2, T3 arg3)
    Parameters
    Type Name Description
    System.Action<T1, T2, T3> method

    The delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if the delegate method was invoked without triggering an exception; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    | Improve this Doc

    TryExecuteAction<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, T1, T2, T3, T4)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteAction<T1, T2, T3, T4>(Action<T1, T2, T3, T4> method, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
    Parameters
    Type Name Description
    System.Action<T1, T2, T3, T4> method

    The delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    T4 arg4

    The fourth parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if the delegate method was invoked without triggering an exception; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    T4

    The type of the fourth parameter of the method.

    | Improve this Doc

    TryExecuteAction<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteAction<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> method, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
    Parameters
    Type Name Description
    System.Action<T1, T2, T3, T4, T5> method

    The delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    T4 arg4

    The fourth parameter of the method.

    T5 arg5

    The fifth parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if the delegate method was invoked without triggering an exception; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    T4

    The type of the fourth parameter of the method.

    T5

    The type of the fifth parameter of the method.

    | Improve this Doc

    TryExecuteFunction<TResult>(Func<TResult>, out TResult)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<TResult>(Func<TResult> method, out TResult result)
    Parameters
    Type Name Description
    System.Func<TResult> method

    The function delegate to invoke to try and get the TResult.

    TResult result

    When this method returns, contains the TResult from method, or default(TResult) if an exception is thrown.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    TResult

    The type of the return value of the method.

    | Improve this Doc

    TryExecuteFunction<T, TResult>(Func<T, TResult>, T)

    Returns a value that indicates whether the specified method was invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T, TResult>(Func<T, TResult> method, T arg)
    Parameters
    Type Name Description
    System.Func<T, TResult> method

    The function delegate to invoke.

    T arg

    The parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T

    The type of the parameter of the method.

    TResult

    The type of the return value of the method that you explicitly have chosen to ignore.

    | Improve this Doc

    TryExecuteFunction<T, TResult>(Func<T, TResult>, T, out TResult)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T, TResult>(Func<T, TResult> method, T arg, out TResult result)
    Parameters
    Type Name Description
    System.Func<T, TResult> method

    The function delegate to invoke to try and get the TResult.

    T arg

    The first parameter of the method.

    TResult result

    When this method returns, contains the TResult from method, or default(TResult) if an exception is thrown.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T

    The type of the first parameter of the method.

    TResult

    The type of the return value of the method.

    | Improve this Doc

    TryExecuteFunction<T1, T2, TResult>(Func<T1, T2, TResult>, T1, T2)

    Returns a value that indicates whether the specified method was invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, TResult>(Func<T1, T2, TResult> method, T1 arg1, T2 arg2)
    Parameters
    Type Name Description
    System.Func<T1, T2, TResult> method

    The function delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    TResult

    The type of the return value of the method that you explicitly have chosen to ignore.

    | Improve this Doc

    TryExecuteFunction<T1, T2, TResult>(Func<T1, T2, TResult>, T1, T2, out TResult)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, TResult>(Func<T1, T2, TResult> method, T1 arg1, T2 arg2, out TResult result)
    Parameters
    Type Name Description
    System.Func<T1, T2, TResult> method

    The function delegate to invoke to try and get the TResult.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    TResult result

    When this method returns, contains the TResult from method, or default(TResult) if an exception is thrown.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    TResult

    The type of the return value of the method.

    | Improve this Doc

    TryExecuteFunction<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, T1, T2, T3)

    Returns a value that indicates whether the specified method was invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> method, T1 arg1, T2 arg2, T3 arg3)
    Parameters
    Type Name Description
    System.Func<T1, T2, T3, TResult> method

    The function delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    TResult

    The type of the return value of the method that you explicitly have chosen to ignore.

    | Improve this Doc

    TryExecuteFunction<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, T1, T2, T3, out TResult)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> method, T1 arg1, T2 arg2, T3 arg3, out TResult result)
    Parameters
    Type Name Description
    System.Func<T1, T2, T3, TResult> method

    The function delegate to invoke to try and get the TResult.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    TResult result

    When this method returns, contains the TResult from method, or default(TResult) if an exception is thrown.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    TResult

    The type of the return value of the method.

    | Improve this Doc

    TryExecuteFunction<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, T1, T2, T3, T4)

    Returns a value that indicates whether the specified method was invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult> method, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
    Parameters
    Type Name Description
    System.Func<T1, T2, T3, T4, TResult> method

    The function delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    T4 arg4

    The fourth parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    T4

    The type of the fourth parameter of the method.

    TResult

    The type of the return value of the method that you explicitly have chosen to ignore.

    | Improve this Doc

    TryExecuteFunction<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, T1, T2, T3, T4, out TResult)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult> method, T1 arg1, T2 arg2, T3 arg3, T4 arg4, out TResult result)
    Parameters
    Type Name Description
    System.Func<T1, T2, T3, T4, TResult> method

    The function delegate to invoke to try and get the TResult.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    T4 arg4

    The fourth parameter of the method.

    TResult result

    When this method returns, contains the TResult from method, or default(TResult) if an exception is thrown.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    T4

    The type of the fourth parameter of the method.

    TResult

    The type of the return value of the method.

    | Improve this Doc

    TryExecuteFunction<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)

    Returns a value that indicates whether the specified method was invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult> method, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
    Parameters
    Type Name Description
    System.Func<T1, T2, T3, T4, T5, TResult> method

    The function delegate to invoke.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    T4 arg4

    The fourth parameter of the method.

    T5 arg5

    The fifth parameter of the method.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    T4

    The type of the fourth parameter of the method.

    T5

    The type of the fifth parameter of the method.

    TResult

    The type of the return value of the method that you explicitly have chosen to ignore.

    | Improve this Doc

    TryExecuteFunction<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5, out TResult)

    Returns a value that indicates whether the specified method can be invoked without an exception.

    Declaration
    public static bool TryExecuteFunction<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult> method, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, out TResult result)
    Parameters
    Type Name Description
    System.Func<T1, T2, T3, T4, T5, TResult> method

    The function delegate to invoke to try and get the TResult.

    T1 arg1

    The first parameter of the method.

    T2 arg2

    The second parameter of the method.

    T3 arg3

    The third parameter of the method.

    T4 arg4

    The fourth parameter of the method.

    T5 arg5

    The fifth parameter of the method.

    TResult result

    When this method returns, contains the TResult from method, or default(TResult) if an exception is thrown.

    Returns
    Type Description
    System.Boolean

    true if an instance of TResult has been created; otherwise false.

    Type Parameters
    Name Description
    T1

    The type of the first parameter of the method.

    T2

    The type of the second parameter of the method.

    T3

    The type of the third parameter of the method.

    T4

    The type of the fourth parameter of the method.

    T5

    The type of the fifth parameter of the method.

    TResult

    The type of the return value of the method.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX