Search Results for

    Show / Hide Table of Contents

    Class FieldValue

    Represents a field value, which is a combination of a field name, a field value type, and the actual field values. This class is abstract.

    Inheritance
    System.Object
    FieldValue
    DateTimeFieldValue
    IntFieldValue
    MultiplePicklistFieldValue
    MultipleStringFieldValue
    SinglePicklistFieldValue
    SingleStringFieldValue
    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 abstract class FieldValue

    Constructors

    FieldValue()

    Initializes a new instance with default values. Required for serialization.

    Declaration
    public FieldValue()

    FieldValue(String)

    Initializes a new instance with the specified field name.

    Declaration
    public FieldValue(string name)
    Parameters
    Type Name Description
    System.String name

    The field name.

    Properties

    Name

    Gets or sets the field name of this instance. If the vield name is not valid, an exception is thrown.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    ValueType

    Gets the field value type.

    Declaration
    public abstract FieldValueType ValueType { get; set; }
    Property Value
    Type Description
    FieldValueType

    Methods

    Add(FieldValue)

    Adds another field value to the current value. The other value must be of the same type.

    Declaration
    public abstract bool Add(FieldValue rhs)
    Parameters
    Type Name Description
    FieldValue rhs

    The field value to add.

    Returns
    Type Description
    System.Boolean

    true

    Add(String)

    Adds another string to this instance's value list, if this instance is of any of the multiple valued types.

    Declaration
    public abstract bool Add(string s)
    Parameters
    Type Name Description
    System.String s

    The new value to be added.

    Returns
    Type Description
    System.Boolean

    true if this instance was changed, false otherwise.

    Clear()

    Resets this instance to the default value.

    Declaration
    public abstract void Clear()

    Duplicate()

    Creates a new instance that is a deep copy of this instance.

    Declaration
    public abstract FieldValue Duplicate()
    Returns
    Type Description
    FieldValue

    A new instance that is a deep copy of this instance.

    GetValueString()

    Compute a string which represents the field value without the field name in a way which can be reversed through parsing. This should only be used internally by the field expression parser. UI-level presentation should use the field value's .ToString() method to get the field value display string.

    Declaration
    public abstract string GetValueString()
    Returns
    Type Description
    System.String

    A serialized string representation of the field value, which is suitable for persisting, and can be parsed through Parse(String).

    Merge(FieldValue)

    Merges this instance with another field value, which must be of the same type.

    Declaration
    public abstract bool Merge(FieldValue rhs)
    Parameters
    Type Name Description
    FieldValue rhs

    The object to merge with.

    Returns
    Type Description
    System.Boolean

    true if this instance was changed, false otherwise.

    Parse(String)

    Initializes this instance from a string (deserialization).

    Declaration
    public abstract void Parse(string s)
    Parameters
    Type Name Description
    System.String s

    The string that contains the serialized form.

    Substract(FieldValue)

    Substracts a field value from this instance's field value. Both field values must be of the same type.

    Declaration
    public abstract bool Substract(FieldValue rhs)
    Parameters
    Type Name Description
    FieldValue rhs

    The field value to substract.

    Returns
    Type Description
    System.Boolean

    true if this instance was changed, false otherwise.

    On this page

    • Constructors
      • FieldValue()
      • FieldValue(String)
    • Properties
      • Name
      • ValueType
    • Methods
      • Add(FieldValue)
      • Add(String)
      • Clear()
      • Duplicate()
      • GetValueString()
      • Merge(FieldValue)
      • Parse(String)
      • Substract(FieldValue)
    Back to top Generated by DocFX