Class PicklistItemDefinitionCollection
Represents a collection of picklist items that can be used as values for a given picklist field.
Inheritance
Implements
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemoryApi
Assembly: Sdl.LanguagePlatform.TranslationMemoryApi.dll
Syntax
public class PicklistItemDefinitionCollection : ObservableCollection<PicklistItemDefinition>, IList<PicklistItemDefinition>, ICollection<PicklistItemDefinition>, IList, ICollection, IReadOnlyList<PicklistItemDefinition>, IReadOnlyCollection<PicklistItemDefinition>, IEnumerable<PicklistItemDefinition>, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged
Properties
this[string]
Gets the picklist item with the specified name.
Declaration
public PicklistItemDefinition this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
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 |
---|---|
ArgumentNullException | Thrown if |
Methods
Add(string)
Adds a new picklist item definition with the specified name.
Declaration
public PicklistItemDefinition Add(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The picklist item name. |
Returns
Type | Description |
---|---|
PicklistItemDefinition | The newly added picklist item definition. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ClearItems()
Removes all items from the collection.
Declaration
protected override void ClearItems()
Overrides
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 |
---|---|---|
string | name | The picklist item name. This is considered case insensitive. |
Returns
Type | Description |
---|---|
bool | True if this collection contains a picklist item with the same name as the specified picklist item. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
InsertItem(int, PicklistItemDefinition)
Inserts an item into the collection at the specified index.
Declaration
protected override void InsertItem(int index, PicklistItemDefinition item)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index at which |
PicklistItemDefinition | item | The object to insert. |
Overrides
Remove(string)
Remove the picklist item definition with the specified name from this collection.
Declaration
public bool Remove(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the picklist item definition to remove. This is considered case-insensitive. |
Returns
Type | Description |
---|---|
bool | True if the item was removed; false if the collection did not contain the specified item. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
RemoveItem(int)
Removes the item at the specified index of the collection.
Declaration
protected override void RemoveItem(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | The zero-based index of the element to remove. |