Search Results for

    Show / Hide Table of Contents

    Class TuIdContexts

    A collection of translation unit idcontext objects.

    The same translation unit may occur in different places within a document, thus having different contexts.

    Inheritance
    object
    TuIdContexts
    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
    [DataContract]
    public class TuIdContexts

    Constructors

    TuIdContexts()

    Initializes a new instance with default values.

    Declaration
    public TuIdContexts()

    TuIdContexts(TuIdContexts)

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

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

    The other instance.

    Properties

    Length

    Gets the number of contexts contained in this instance.

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

    Values

    Gets or sets the collection of sid contexts of this instance.

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

    Methods

    Add(string)

    Adds a new context to the list, if it isn't already there.

    Declaration
    public bool Add(string newVal)
    Parameters
    Type Name Description
    string newVal

    The new context.

    Returns
    Type Description
    bool

    true if newVal was added, false if it was already in the list.

    AddRange(TuIdContexts)

    Adds the elements of another instance to the list of this instance without checking for duplicates.

    Declaration
    public void AddRange(TuIdContexts contexts)
    Parameters
    Type Name Description
    TuIdContexts contexts

    The other instance.

    AddRange(IEnumerable<string>)

    Adds a collection of contexts to this instance without checking for duplicates.

    Declaration
    public void AddRange(IEnumerable<string> values)
    Parameters
    Type Name Description
    IEnumerable<string> values

    The context collection.

    Assign(TuIdContexts)

    Assigns the elements of another instance to the list of this instance.

    Declaration
    public bool Assign(TuIdContexts contexts)
    Parameters
    Type Name Description
    TuIdContexts contexts

    The other instance.

    Returns
    Type Description
    bool

    true if this instance was changed, otherwise false.

    Clear()

    Removes all the contexts from this instance.

    Declaration
    public void Clear()

    Equals(TuIdContexts)

    Determines if this instance is equivalent to another instance, i.e. they contain the same collection of contexts, independent of order.

    Declaration
    public bool Equals(TuIdContexts other)
    Parameters
    Type Name Description
    TuIdContexts other

    The other instance.

    Returns
    Type Description
    bool

    true if the two objects represent the same collection of contexts, otherwise false.

    HasValue(string)

    Determines whether a context is already in the list.

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

    The context.

    Returns
    Type Description
    bool

    true if it is already in the list, otherwise false.

    HasValues(TuIdContexts)

    Determines whether this instance contains all the contexts from another instance.

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

    The other instance.

    Returns
    Type Description
    bool

    true if this instance contains all the contexts from other, otherwise false.

    Merge(TuIdContexts)

    Adds the elements of another instance to the list of this instance if they don't already exist in the collection.

    Declaration
    public bool Merge(TuIdContexts contexts)
    Parameters
    Type Name Description
    TuIdContexts contexts

    The other instance.

    Returns
    Type Description
    bool

    true if this instance was changed, otherwise false.

    Merge(IEnumerable<string>)

    Adds a collection of contexts to this instance if they don't already exist in the collection.

    Declaration
    public bool Merge(IEnumerable<string> values)
    Parameters
    Type Name Description
    IEnumerable<string> values

    The collection of contexts to be added.

    Returns
    Type Description
    bool

    true if this instance was changed, otherwise false.

    Merge(string)

    Adds an element to the list if it doesn't already exist.

    Declaration
    public bool Merge(string value)
    Parameters
    Type Name Description
    string value

    The new context.

    Returns
    Type Description
    bool

    true if value was added, otherwise false.

    In this article
    • Constructors
      • TuIdContexts()
      • TuIdContexts(TuIdContexts)
    • Properties
      • Length
      • Values
    • Methods
      • Add(string)
      • AddRange(TuIdContexts)
      • AddRange(IEnumerable<string>)
      • Assign(TuIdContexts)
      • Clear()
      • Equals(TuIdContexts)
      • HasValue(string)
      • HasValues(TuIdContexts)
      • Merge(TuIdContexts)
      • Merge(IEnumerable<string>)
      • Merge(string)
    Back to top Generated by DocFX