Search Results for

    Show / Hide Table of Contents

    Interface ICollectionGuardable

    This interface provides methods for 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 ICollectionGuardable

    Methods

    | Improve this Doc View Source

    All<T>(IEnumerable<T>, Func<T, Boolean>, String, String)

    The implementation shall check, if all elements of the input enumeration meet a predicate function.

    Declaration
    IEnumerable<T> All<T>(IEnumerable<T> input, Func<T, bool> predicate, string expression = null, string message = null)
    Parameters
    Type Name Description
    IEnumerable<T> input

    The instance under test.

    Func<T, System.Boolean> predicate

    The test function, every element must meet.

    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
    IEnumerable<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

    Contains<T>(IEnumerable<T>, T, String, String)

    The implementation shall check, if the input enumeration contains a specific element.

    Declaration
    IEnumerable<T> Contains<T>(IEnumerable<T> input, T item, string expression = null, string message = null)
    Parameters
    Type Name Description
    IEnumerable<T> input

    The instance under test.

    T item

    The test item, used for compare opertations.

    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
    IEnumerable<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

    ContainsNot<T>(IEnumerable<T>, T, String, String)

    The implementation shall check, if the input enumeration doesn't contain a specific element.

    Declaration
    IEnumerable<T> ContainsNot<T>(IEnumerable<T> input, T item, string expression = null, string message = null)
    Parameters
    Type Name Description
    IEnumerable<T> input

    The instance under test.

    T item

    The test item, used for compare opertations.

    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
    IEnumerable<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

    IsFilled<T>(IEnumerable<T>, String, String)

    The implementation shall check, if all elements of the input enumeration are not null.

    Declaration
    IEnumerable<T> IsFilled<T>(IEnumerable<T> input, string expression = null, string message = null)
    Parameters
    Type Name Description
    IEnumerable<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
    IEnumerable<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

    IsNotEmpty<T>(IEnumerable<T>, String, String)

    The implementation shall check, if the input enumeration is not empty.

    Declaration
    IEnumerable<T> IsNotEmpty<T>(IEnumerable<T> input, string expression = null, string message = null)
    Parameters
    Type Name Description
    IEnumerable<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
    IEnumerable<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.
    ☀
    ☾