Search Results for

    Show / Hide Table of Contents

    Class EnsureObjectStates

    Ensures that certain objects have the target state.

    Inheritance
    System.Object
    EnsureObjectStates
    Namespace: DisCatSharp.Common
    Assembly: DisCatSharp.Common.dll
    Syntax
    public static class EnsureObjectStates

    Methods

    | Improve this Doc View Source

    EmptyOrNull<T>(List<T>)

    Checks whether the list is null or empty.

    Declaration
    public static bool EmptyOrNull<T>(this List<T> list)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T> list

    The list to check on.

    Returns
    Type Description
    System.Boolean

    True if satisfied, false otherwise.

    Type Parameters
    Name Description
    T

    Any value type.

    | Improve this Doc View Source

    EmptyOrNull<T1, T2>(Dictionary<T1, T2>)

    Checks whether the dictionary is null or empty.

    Declaration
    public static bool EmptyOrNull<T1, T2>(this Dictionary<T1, T2> dictionary)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<T1, T2> dictionary

    The dictionary to check on.

    Returns
    Type Description
    System.Boolean

    True if satisfied, false otherwise.

    Type Parameters
    Name Description
    T1

    Any key type.

    T2

    Any value type.

    | Improve this Doc View Source

    NotEmptyAndNotNull<T>(List<T>)

    Checks whether the list is not null and not empty.

    Declaration
    public static bool NotEmptyAndNotNull<T>(this List<T> list)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T> list

    The list to check on.

    Returns
    Type Description
    System.Boolean

    True if satisfied, false otherwise.

    Type Parameters
    Name Description
    T

    Any value type.

    | Improve this Doc View Source

    NotEmptyAndNotNull<T1, T2>(Dictionary<T1, T2>)

    Checks whether the dictionary is not null and not empty.

    Declaration
    public static bool NotEmptyAndNotNull<T1, T2>(this Dictionary<T1, T2> dictionary)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<T1, T2> dictionary

    The dictionary to check on.

    Returns
    Type Description
    System.Boolean

    True if satisfied, false otherwise.

    Type Parameters
    Name Description
    T1

    Any key type.

    T2

    Any value type.

    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems