New to Telerik Document ProcessingStart a free 30-day trial

Stores document variables as case-insensitive name-value pairs for use with merge fields and custom document metadata.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Collections

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public class DocumentVariableCollection : IEnumerable<KeyValuePair<string, string>>, IEnumerable

Inheritance: objectDocumentVariableCollection

Implements: IEnumerableIEnumerable<KeyValuePair<string, string>>

Methods

Adds a new document variable or updates the existing variable's value if the name already exists.

C#
public void Add(string name, string value)
Parameters:namestring

The name.

valuestring

The value.

Determines whether the collection contains a document variable with the specified name using case-insensitive comparison.

C#
public bool Contains(string name)
Parameters:namestring

The name.

Returns:

bool

Returns an enumerator that iterates through all document variable name-value pairs in the collection.

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

IEnumerator<KeyValuePair<string, string>>

A IEnumerator<T> that can be used to iterate through the collection.

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

Removes the document variable with the specified name and returns whether the removal was successful.

C#
public bool Remove(string name)
Parameters:namestring

The name.

Returns:

bool

Properties

Gets the number of document variables currently stored in the collection.

C#
public int Count { get; }
Property Value:

The count.

Gets or sets the value of the document variable with the specified name using case-insensitive matching, throwing if the name does not exist on get.

C#
public string this[string name] { get; set; }
Parameters:namestringProperty Value:

The document variable name