Search Results for

    Show / Hide Table of Contents

    Class SearchResultFieldValueAccessor

    A class which allows to use a search result as a ITypedKeyValueContainer.

    Inheritance
    object
    SearchResultFieldValueAccessor
    Implements
    ITypedKeyValueContainer
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    public class SearchResultFieldValueAccessor : ITypedKeyValueContainer

    Constructors

    SearchResultFieldValueAccessor(SearchResult)

    Initializes a new instance wiht the specified values.

    Declaration
    public SearchResultFieldValueAccessor(SearchResult r)
    Parameters
    Type Name Description
    SearchResult r

    The search result.

    Methods

    GetType(string)

    Returns the type of the field with name "fieldName". If the object does not have a value for that field, returns FieldValueType.Unknown.

    Declaration
    public FieldValueType GetType(string fieldName)
    Parameters
    Type Name Description
    string fieldName

    The field name.

    Returns
    Type Description
    FieldValueType

    The type of that field, or FieldValueType.Unknown if it doesn't exist.

    GetValue(string)

    Returns the value of field with name "fieldName". The return value can be any field type.

    Declaration
    public FieldValue GetValue(string fieldName)
    Parameters
    Type Name Description
    string fieldName

    The field name.

    Returns
    Type Description
    FieldValue

    The value of the field, or null if not defined.

    GetValue(string, FieldValueType)

    Returns the value of field with name "fieldName", given the field value type t.

    Declaration
    public FieldValue GetValue(string fieldName, FieldValueType t)
    Parameters
    Type Name Description
    string fieldName

    The field name

    FieldValueType t

    The field type to return the value for.

    Returns
    Type Description
    FieldValue

    null if no value is defined. Throws exception if value is of a different type.

    Implements

    ITypedKeyValueContainer
    In this article
    • Constructors
      • SearchResultFieldValueAccessor(SearchResult)
    • Methods
      • GetType(string)
      • GetValue(string)
      • GetValue(string, FieldValueType)
    • Implements
    Back to top Generated by DocFX