Search Results for

    Show / Hide Table of Contents

    Class SearchResultFieldValueComparer

    Implements a comparer for search results.

    Inheritance
    System.Object
    SearchResultFieldValueComparer
    Implements
    IFieldValueComparer<SearchResult>
    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: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    public class SearchResultFieldValueComparer : IFieldValueComparer<SearchResult>

    Constructors

    SearchResultFieldValueComparer()

    Declaration
    public SearchResultFieldValueComparer()

    Methods

    Compare(SearchResult, SearchResult, String)

    Compares two search results' specified field values and returns an indication of their relative values.

    Currently only the following field names are allowed: sco (score), usc (usage count), usd (last used date), crd (creation date), chd (change date).

    If a field name is used which is not listed above, Compare will return zero.

    Declaration
    public int Compare(SearchResult a, SearchResult b, string fieldName)
    Parameters
    Type Name Description
    SearchResult a

    The first of the two items to compare.

    SearchResult b

    The second of the two items to compare.

    System.String fieldName

    The field used for comparison.

    Returns
    Type Description
    System.Int32

    Less than zero if a is less than b, zero if a equals b or a value greater than zero if a is greater than b.

    Implements

    IFieldValueComparer<T>

    On this page

    • Constructors
      • SearchResultFieldValueComparer()
    • Methods
      • Compare(SearchResult, SearchResult, String)
    • Implements
    Back to top Generated by DocFX