Search Results for

    Show / Hide Table of Contents

    Class MultipleStringFieldValue

    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
    object
    FieldValue
    MultipleStringFieldValue
    Inherited Members
    FieldValue.Name
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    [DataContract]
    public class MultipleStringFieldValue : FieldValue

    Constructors

    MultipleStringFieldValue()

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

    Declaration
    public MultipleStringFieldValue()

    MultipleStringFieldValue(MultipleStringFieldValue)

    Initializes a new instance of the MultipleStringFieldValue class from another instance.

    Declaration
    public MultipleStringFieldValue(MultipleStringFieldValue other)
    Parameters
    Type Name Description
    MultipleStringFieldValue other

    The other instance.

    MultipleStringFieldValue(string)

    Initializes a new instance with the specified field name.

    Declaration
    public MultipleStringFieldValue(string name)
    Parameters
    Type Name Description
    string name

    The field name.

    MultipleStringFieldValue(string, ICollection<string>)

    Initializes a new instance of the MultipleStringFieldValue class with the specified field name and values.

    Declaration
    public MultipleStringFieldValue(string name, ICollection<string> values)
    Parameters
    Type Name Description
    string name

    The field name.

    ICollection<string> values

    The values.

    Properties

    Count

    Gets the number of different items in the collection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    ValueType

    Gets the field value type.

    Declaration
    public override FieldValueType ValueType { get; set; }
    Property Value
    Type Description
    FieldValueType
    Overrides
    FieldValue.ValueType

    Values

    Gets or sets the value list for this instance.

    Declaration
    [DataMember]
    public IEnumerable<string> Values { get; set; }
    Property Value
    Type Description
    IEnumerable<string>

    Methods

    Add(FieldValue)

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

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

    The field value to add.

    Returns
    Type Description
    bool

    true

    Overrides
    FieldValue.Add(FieldValue)

    Add(string)

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

    Declaration
    public override sealed bool Add(string v)
    Parameters
    Type Name Description
    string v
    Returns
    Type Description
    bool

    true if this instance was changed, false otherwise.

    Overrides
    FieldValue.Add(string)

    Clear()

    Resets this instance to the default value.

    Declaration
    public override void Clear()
    Overrides
    FieldValue.Clear()

    Contains(string)

    Synonymous to HasValue(string)

    Declaration
    public bool Contains(string v)
    Parameters
    Type Name Description
    string v
    Returns
    Type Description
    bool

    Duplicate()

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

    Declaration
    public override FieldValue Duplicate()
    Returns
    Type Description
    FieldValue

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

    Overrides
    FieldValue.Duplicate()

    Equals(object)

    System.Object.Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)

    GetHashCode()

    System.Object.GetHashCode(object)

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()

    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 override string GetValueString()
    Returns
    Type Description
    string

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

    Overrides
    FieldValue.GetValueString()

    HasValue(string)

    Determines if this instance already contains a specified value.

    The comparison is case insenstive.

    Declaration
    public bool HasValue(string v)
    Parameters
    Type Name Description
    string v

    The value.

    Returns
    Type Description
    bool

    true if this instance contains v, false otherwise.

    HasValues(MultipleStringFieldValue)

    Determines if this instance contains all the values of another instance.

    The comparison is case insensitive.

    Declaration
    public bool HasValues(MultipleStringFieldValue other)
    Parameters
    Type Name Description
    MultipleStringFieldValue other

    The other instance.

    Returns
    Type Description
    bool

    true if this instance contains all the values of other, false otherwise.

    Merge(FieldValue)

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

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

    The object to merge with.

    Returns
    Type Description
    bool

    true if this instance was changed, false otherwise.

    Overrides
    FieldValue.Merge(FieldValue)

    Parse(string)

    Initializes this instance from a string (deserialization).

    Declaration
    public override void Parse(string s)
    Parameters
    Type Name Description
    string s

    The string that contains the serialized form.

    Overrides
    FieldValue.Parse(string)

    Remove(string)

    Removes a value from this instance's value list.

    Declaration
    public bool Remove(string v)
    Parameters
    Type Name Description
    string v

    The value.

    Returns
    Type Description
    bool

    Substract(FieldValue)

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

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

    The field value to substract.

    Returns
    Type Description
    bool

    true if this instance was changed, false otherwise.

    Overrides
    FieldValue.Substract(FieldValue)

    ToString()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the object, for display purposes.

    Overrides
    object.ToString()
    In this article
    • Constructors
      • MultipleStringFieldValue()
      • MultipleStringFieldValue(MultipleStringFieldValue)
      • MultipleStringFieldValue(string)
      • MultipleStringFieldValue(string, ICollection<string>)
    • Properties
      • Count
      • ValueType
      • Values
    • Methods
      • Add(FieldValue)
      • Add(string)
      • Clear()
      • Contains(string)
      • Duplicate()
      • Equals(object)
      • GetHashCode()
      • GetValueString()
      • HasValue(string)
      • HasValues(MultipleStringFieldValue)
      • Merge(FieldValue)
      • Parse(string)
      • Remove(string)
      • Substract(FieldValue)
      • ToString()
    Back to top Generated by DocFX