Search Results for

    Show / Hide Table of Contents

    Interface INumericGuardable

    This interface provides methods for numeric related guard clauses. The implementation of these methods should succeed, if they approve the statement of the method name.

    Namespace: TeleScope.GuardClauses.Abstractions
    Assembly: TeleScope.GuardClauses.dll
    Syntax
    public interface INumericGuardable

    Methods

    | Improve this Doc View Source

    IsExact<T>(T, T, String, String)

    The implementation shall check, if the input number has exactly the same value of the comparator.

    Declaration
    T IsExact<T>(T input, T comparator, string expression = null, string message = null)
        where T : IComparable
    Parameters
    Type Name Description
    T input

    The instance under test.

    T comparator

    The instance that shall be compared by an implementation of the method.

    System.String expression

    The optional parameter name under test.

    System.String message

    The optional exception message that wil be used, if the method implementation throws.

    Returns
    Type Description
    T

    The input data, if no exception will be thrown.

    Type Parameters
    Name Description
    T

    The type param under test.

    | Improve this Doc View Source

    IsLarger<T>(T, T, String, String)

    The implementation shall check, if the input number is larger than the comparator.

    Declaration
    T IsLarger<T>(T input, T comparator, string expression = null, string message = null)
        where T : IComparable
    Parameters
    Type Name Description
    T input

    The instance under test.

    T comparator

    The instance that shall be compared by an implementation of the method.

    System.String expression

    The optional parameter name under test.

    System.String message

    The optional exception message that wil be used, if the method implementation throws.

    Returns
    Type Description
    T

    The input data, if no exception will be thrown.

    Type Parameters
    Name Description
    T

    The type param under test.

    | Improve this Doc View Source

    IsLargerThanZero<T>(T, String, String)

    The implementation shall check, if the input number is larger than zero.

    Declaration
    T IsLargerThanZero<T>(T input, string expression = null, string message = null)
        where T : IComparable
    Parameters
    Type Name Description
    T input

    The instance under test.

    System.String expression

    The optional parameter name under test.

    System.String message

    The optional exception message that wil be used, if the method implementation throws.

    Returns
    Type Description
    T

    The input data, if no exception will be thrown.

    Type Parameters
    Name Description
    T

    The type param under test.

    | Improve this Doc View Source

    IsNot<T>(T, String, String, T[])

    The implementation shall check, if the input number has not the same value of the comparator.

    Declaration
    T IsNot<T>(T input, string expression = null, string message = null, params T[] comparators)
        where T : IComparable
    Parameters
    Type Name Description
    T input

    The instance under test.

    System.String expression

    The optional parameter name under test.

    System.String message

    The optional exception message that wil be used, if the method implementation throws.

    T[] comparators

    The potential multiple instance that shall be compared by an implementation of the method.

    Returns
    Type Description
    T

    The input data, if no exception will be thrown.

    Type Parameters
    Name Description
    T

    The type param under test.

    | Improve this Doc View Source

    IsNotZero<T>(T, String, String)

    The implementation shall check, if the input number is not zero.

    Declaration
    T IsNotZero<T>(T input, string expression = null, string message = null)
        where T : IComparable
    Parameters
    Type Name Description
    T input

    The instance under test.

    System.String expression

    The optional parameter name under test.

    System.String message

    The optional exception message that wil be used, if the method implementation throws.

    Returns
    Type Description
    T

    The input data, if no exception will be thrown.

    Type Parameters
    Name Description
    T

    The type param under test.

    | Improve this Doc View Source

    IsSmaller<T>(T, T, String, String)

    The implementation shall check, if the input number is smaller than the comparator.

    Declaration
    T IsSmaller<T>(T input, T comparator, string expression = null, string message = null)
        where T : IComparable
    Parameters
    Type Name Description
    T input

    The instance under test.

    T comparator

    The instance that shall be compared by an implementation of the method.

    System.String expression

    The optional parameter name under test.

    System.String message

    The optional exception message that wil be used, if the method implementation throws.

    Returns
    Type Description
    T

    The input data, if no exception will be thrown.

    Type Parameters
    Name Description
    T

    The type param under test.

    • GITHUB
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    Copyright 2020-2022 TeleScope-dotnet. Generated by DocFX.
    ☀
    ☾