Show / Hide Table of Contents

    Class Indexer<T>

    Indexed objects comparer
    Hint: Objects can be indexed by annotation attribute IndexAttribute

    Inheritance
    Object
    Indexer<T>
    Implements
    IComparer<T>
    IEqualityComparer<T>
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: XData.Extensions
    Assembly: XData.docfx.dll
    Syntax
    public class Indexer<T> : IIndexer, IComparer<T>, IEqualityComparer<T>
    Type Parameters
    Name Description
    T

    Indexed object type

    Constructors

    | Improve this Doc View Source

    Indexer(String)

    Indexer parametrized constructor

    Declaration
    public Indexer(string propertyName)
    Parameters
    Type Name Description
    String propertyName

    Comparable property name

    Methods

    | Improve this Doc View Source

    Compare(T, T)

    Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

    Declaration
    public int Compare(T x, T y)
    Parameters
    Type Name Description
    T x

    The first object to compare.

    T y

    The second object to compare.

    Returns
    Type Description
    Int32

    A signed integer that indicates the relative values of x and y, as shown in the following table.Value Meaning Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.

    Exceptions
    Type Condition
    XDataRuntimeException

    IndexedAttribute not found

    | Improve this Doc View Source

    Equals(T, T)

    Determines whether the specified objects are equal.

    Declaration
    public bool Equals(T x, T y)
    Parameters
    Type Name Description
    T x

    The first object to compare.

    T y

    The second object to compare.

    Returns
    Type Description
    Boolean

    true if the specified objects are equal; otherwise, false.

    Exceptions
    Type Condition
    XDataRuntimeException

    IndexedAttribute not found

    | Improve this Doc View Source

    GetHashCode(T)

    Returns a hash code for the specified object.

    Declaration
    public int GetHashCode(T obj)
    Parameters
    Type Name Description
    T obj

    The Object for which a hash code is to be returned.

    Returns
    Type Description
    Int32

    A hash code for the specified object.

    Exceptions
    Type Condition
    ArgumentNullException

    The type of obj is a reference type and obj is null.

    XDataRuntimeException

    IndexedAttribute not found

    | Improve this Doc View Source

    GetInstance()

    Singleton comparer instance

    Declaration
    public static Indexer<T> GetInstance()
    Returns
    Type Description
    Indexer<T>

    Comparer instance

    Implements

    System.Collections.Generic.IComparer<T>
    System.Collections.Generic.IEqualityComparer<T>

    Extension Methods

    SerializationExtensions.ToXml<T>(T)
    CollectionsExtensions.SetValue<TKey, T>(TKey, T)
    CollectionsExtensions.AsEnum<T>(T)
    DataObjectQueryableExtensions.CompareVariable(Object, FilterOperation, String)
    Processing.Do<T>(T, Action<IProcess<T>>[])
    TypeExtensions.TryConvert<T, TResult>(T, Func<T, TResult>)
    TypeExtensions.TryConvert<T, TResult>(T, Func<T, TResult>, TResult)
    TypeExtensions.ChangeType<T>(Object)
    TypeExtensions.ChangeType(Object, Type)
    TypeExtensions.InvokeMethod<TRet>(Object, Type[], Expression<Func<TRet>>, BindingFlags)
    TypeExtensions.InvokeMethod(Object, Type[], Expression<Action>, BindingFlags)
    TypeExtensions.InvokeMethod<TRet>(Object, Expression<Func<TRet>>, BindingFlags)
    TypeExtensions.InvokeMethod(Object, Expression<Action>, BindingFlags)
    SqlBlockExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IBlockQueryAdapter, TResult>>)
    QueryDescriptionExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IQueryStructureAdapter, TResult>>)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX