New to Telerik Document Processing? Start a free 30-day trial

Represents a collection of field values for an embedded file in a PDF Portfolio. Each entry maps a schema field key to its value.

This collection stores custom metadata values that correspond to fields defined in the portfolio schema (Schema). The field keys must match the keys defined in the schema for the values to be displayed correctly.

Definition

Namespace:Telerik.Documents.Fixed.Model.Collections

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

C#
public class CollectionItemValues : IEnumerable<KeyValuePair<string, CollectionItemValue>>, IEnumerable

Inheritance: objectCollectionItemValues

Implements: IEnumerableIEnumerable<KeyValuePair<string, CollectionItemValue>>

Properties

Gets the number of values in the collection.

C#
public int Count { get; }

Gets or sets the value associated with the specified field key.

C#
public CollectionItemValue this[string fieldKey] { get; set; }
Parameters:fieldKeystring

The key of the schema field.

Property Value:

The collection item value associated with the key.

Methods

Removes all values from the collection.

C#
public void Clear()

Determines whether the collection contains a value with the specified field key.

C#
public bool ContainsKey(string fieldKey)
Parameters:fieldKeystring

The key to locate.

Returns:

bool

true if the collection contains a value with the key; otherwise, false.

Returns an enumerator that iterates through the collection.

C#
public IEnumerator<KeyValuePair<string, CollectionItemValue>> GetEnumerator()
Returns:

IEnumerator<KeyValuePair<string, CollectionItemValue>>

An enumerator for the collection.

Implements: IEnumerable<KeyValuePair<string, CollectionItemValue>>.GetEnumerator()

Removes the value with the specified field key.

C#
public bool Remove(string fieldKey)
Parameters:fieldKeystring

The key of the value to remove.

Returns:

bool

true if the value was removed; otherwise, false.

Sets a date value for the specified field key.

C#
public CollectionItemValue SetDate(string fieldKey, DateTime date)
Parameters:fieldKeystring

The key of the schema field.

dateDateTime

The date value.

Returns:

CollectionItemValue

The created CollectionItemValue, allowing further configuration such as setting a prefix.

Sets a numeric value for the specified field key.

C#
public CollectionItemValue SetNumber(string fieldKey, double number)
Parameters:fieldKeystring

The key of the schema field.

numberdouble

The numeric value.

Returns:

CollectionItemValue

The created CollectionItemValue, allowing further configuration such as setting a prefix.

Sets a text value for the specified field key.

C#
public CollectionItemValue SetText(string fieldKey, string text)
Parameters:fieldKeystring

The key of the schema field.

textstring

The text value.

Returns:

CollectionItemValue

The created CollectionItemValue, allowing further configuration such as setting a prefix.

Tries to get the value associated with the specified field key.

C#
public bool TryGetValue(string fieldKey, out CollectionItemValue value)
Parameters:fieldKeystring

The key of the value to get.

valueCollectionItemValue

When this method returns, contains the value, or null if not found.

Returns:

bool

true if the value was found; otherwise, false.