Class ProjectionComparer | UIWidgets | 1.5.4-preview.12
docs.unity3d.com
    Show / Hide Table of Contents

    Class ProjectionComparer

    Non-generic class to produce instances of the generic class, optionally using type inference.

    Inheritance
    Object
    ProjectionComparer
    Namespace: Unity.UIWidgets.Runtime.external
    Syntax
    public static class ProjectionComparer

    Methods

    Create<TSource, TKey>(TSource, Func<TSource, TKey>)

    Creates an instance of ProjectionComparer using the specified projection. The ignored parameter is solely present to aid type inference.

    Declaration
    public static ProjectionComparer<TSource, TKey> Create<TSource, TKey>(TSource ignored, Func<TSource, TKey> projection)
    Parameters
    Type Name Description
    TSource ignored

    Value is ignored - type may be used by type inference

    Func<TSource, TKey> projection

    Projection to use when determining the key of an element

    Returns
    Type Description
    ProjectionComparer<TSource, TKey>

    A comparer which will compare elements by projecting each element to its key, and comparing keys

    Type Parameters
    Name Description
    TSource

    Type parameter for the elements to be compared

    TKey

    Type parameter for the keys to be compared, after being projected from the elements

    Create<TSource, TKey>(Func<TSource, TKey>)

    Creates an instance of ProjectionComparer using the specified projection.

    Declaration
    public static ProjectionComparer<TSource, TKey> Create<TSource, TKey>(Func<TSource, TKey> projection)
    Parameters
    Type Name Description
    Func<TSource, TKey> projection

    Projection to use when determining the key of an element

    Returns
    Type Description
    ProjectionComparer<TSource, TKey>

    A comparer which will compare elements by projecting each element to its key, and comparing keys

    Type Parameters
    Name Description
    TSource

    Type parameter for the elements to be compared

    TKey

    Type parameter for the keys to be compared, after being projected from the elements

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023