Search Results for

    Show / Hide Table of Contents

    Class PicklistItemDefinitionCollection

    Represents a collection of picklist items that can be used as values for a given picklist field.

    Inheritance
    System.Object
    PicklistItemDefinitionCollection
    Namespace: Sdl.LanguagePlatform.TranslationMemoryApi
    Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
    Syntax
    public class PicklistItemDefinitionCollection : ObservableCollection<PicklistItemDefinition>

    Properties

    Item[String]

    Gets the picklist item with the specified name.

    Declaration
    public PicklistItemDefinition this[string name] { get; }
    Parameters
    Type Name Description
    System.String name

    The name of the picklist item.

    Property Value
    Type Description
    PicklistItemDefinition

    The picklist item definition; or null if not such picklist item exists in this collection.

    Remarks

    The name is considered case-insensitive.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if name is null or empty.

    Methods

    Add(String)

    Adds a new picklist item definition with the specified name.

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

    The picklist item name.

    Returns
    Type Description
    PicklistItemDefinition

    The newly added picklist item definition.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if name is null or empty.

    ClearItems()

    Removes all items from the collection.

    Declaration
    protected override void ClearItems()

    Contains(String)

    Returns true if this collection contains a picklist item with the specified name.

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

    The picklist item name. This is considered case insensitive.

    Returns
    Type Description
    System.Boolean

    True if this collection contains a picklist item with the same name as the specified picklist item.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if name is null or empty.

    InsertItem(Int32, PicklistItemDefinition)

    Inserts an item into the collection at the specified index.

    Declaration
    protected override void InsertItem(int index, PicklistItemDefinition item)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index at which item should be inserted.

    PicklistItemDefinition item

    The object to insert.

    Remove(String)

    Remove the picklist item definition with the specified name from this collection.

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

    The name of the picklist item definition to remove. This is considered case-insensitive.

    Returns
    Type Description
    System.Boolean

    True if the item was removed; false if the collection did not contain the specified item.

    Exceptions
    Type Condition
    System.ArgumentNullException

    Thrown if name is null or empty.

    RemoveItem(Int32)

    Removes the item at the specified index of the collection.

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to remove.

    On this page

    • Properties
      • Item[String]
    • Methods
      • Add(String)
      • ClearItems()
      • Contains(String)
      • InsertItem(Int32, PicklistItemDefinition)
      • Remove(String)
      • RemoveItem(Int32)
    Back to top Generated by DocFX