Search Results for

    Show / Hide Table of Contents

    Class EnumerableExtensions

    Extensions for System.Collections.Generic.IEnumerable<T> that don't currently exist in System.Linq.

    Inheritance
    System.Object
    EnumerableExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: IPA.Utilities
    Assembly: IPA.Loader.dll
    Syntax
    public static class EnumerableExtensions

    Methods

    | Improve this Doc View Source

    NonNull<T>(IEnumerable<T>)

    LINQ-style extension method that filters null elements out of an enumeration.

    Declaration
    public static IEnumerable<T> NonNull<T>(this IEnumerable<T> self)
        where T : class
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self

    the enumeration to filter

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    a filtered enumerable

    Type Parameters
    Name Description
    T

    the type of the enumeration

    | Improve this Doc View Source

    NonNull<T>(IEnumerable<Nullable<T>>)

    LINQ-style extension method that filters null elements from an enumeration of nullable types.

    Declaration
    public static IEnumerable<T> NonNull<T>(this IEnumerable<T?> self)
        where T : struct
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Nullable<T>> self

    the enumeration to filter

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    a filtered enumerable

    Type Parameters
    Name Description
    T

    the underlying type of the nullable enumeration

    | Improve this Doc View Source

    NonNull<T, U>(IEnumerable<T>, Func<T, U>)

    LINQ-style extension method that filters null elements out of an enumeration based on a converter.

    Declaration
    public static IEnumerable<T> NonNull<T, U>(this IEnumerable<T> self, Func<T, U> pred)
        where U : class
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self

    the enumeration to filter

    System.Func<T, U> pred

    the predicate to select for filtering

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    a filtered enumerable

    Type Parameters
    Name Description
    T

    the type of the enumeration

    U

    the type to compare to null

    | Improve this Doc View Source

    NonNull<T, U>(IEnumerable<T>, Func<T, Nullable<U>>)

    LINQ-style extension method that filters null elements out of an enumeration based on a converter to a nullable type.

    Declaration
    public static IEnumerable<T> NonNull<T, U>(this IEnumerable<T> self, Func<T, U?> pred)
        where U : struct
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> self

    the enumeration to filter

    System.Func<T, System.Nullable<U>> pred

    the predicate to select for filtering

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<T>

    a filtered enumerable

    Type Parameters
    Name Description
    T

    the type of the enumeration

    U

    the type of the predicate's resulting nullable

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX