Class
DocumentVariableCollection

Represents a collection of all document variables in a RadDocument.

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class DocumentVariableCollection : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable

Inheritance: objectDocumentVariableCollection

Implements: ICollection<KeyValuePair<string, object>>IDictionary<string, object>IEnumerableIEnumerable<KeyValuePair<string, object>>

Constructors

DocumentVariableCollection(RadDocument)

Initializes a new instance of the DocumentVariableCollection class.

Declaration

cs-api-definition
public DocumentVariableCollection(RadDocument owner)

Parameters

owner

RadDocument

The associated document.

DocumentVariableCollection(RadDocument, DocumentVariableCollection)

Initializes a new instance of the DocumentVariableCollection class.

Declaration

cs-api-definition
public DocumentVariableCollection(RadDocument owner, DocumentVariableCollection toCopyFrom)

Parameters

owner

RadDocument

The associated document.

toCopyFrom

DocumentVariableCollection

A collection of document variables which will be added to the associated document.

Properties

Count

Gets the number of elements contained in the ICollection<T>.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

Implements ICollection<KeyValuePair<string, object>>.Count

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Implements ICollection<KeyValuePair<string, object>>.IsReadOnly

Keys

Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>.

Declaration

cs-api-definition
public ICollection<string> Keys { get; }

Property Value

ICollection<string>

Implements IDictionary<string, object>.Keys

Values

Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>.

Declaration

cs-api-definition
public ICollection<object> Values { get; }

Property Value

ICollection<object>

Implements IDictionary<string, object>.Values

this[string]

Gets or sets the variable with the specified key.

Declaration

cs-api-definition
public object this[string key] { get; set; }

Parameters

key

string

The key of the variable.

Property Value

object

The document variable.

Implements IDictionary<string, object>.this[string]

Methods

Add(string, object)

Adds an element with the provided key and value to the IDictionary<TKey, TValue>.

Declaration

cs-api-definition
public void Add(string key, object value)

Parameters

key

string

The object to use as the key of the element to add.

value

object

The object to use as the value of the element to add.

Implements IDictionary<string, object>.Add(string, object)

Clear()

Removes all items from the ICollection<T>.

Declaration

cs-api-definition
public void Clear()

Implements ICollection<KeyValuePair<string, object>>.Clear()

ContainsKey(string)

Determines whether the IDictionary<TKey, TValue> contains an element with the specified key.

Declaration

cs-api-definition
public bool ContainsKey(string key)

Parameters

key

string

The key to locate in the IDictionary<TKey, TValue>.

Returns

bool

true if the IDictionary<TKey, TValue> contains an element with the key; otherwise, false.

Implements IDictionary<string, object>.ContainsKey(string)

EvaluateVariableValue(string)

Evaluates the variable value.

Declaration

cs-api-definition
public object EvaluateVariableValue(string variableName)

Parameters

variableName

string

Name of the variable.

Returns

object

The value of the variable.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<string, object>>

An enumerator that can be used to iterate through the collection.

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

Remove(string)

Removes the element with the specified key from the IDictionary<TKey, TValue>.

Declaration

cs-api-definition
public bool Remove(string key)

Parameters

key

string

The key of the element to remove.

Returns

bool

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original IDictionary<TKey, TValue>.

Implements IDictionary<string, object>.Remove(string)

TryGetValue(string, out object)

Gets the value associated with the specified key.

Declaration

cs-api-definition
public bool TryGetValue(string key, out object value)

Parameters

key

string

The key whose value to get.

value

object

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

bool

true if the object that implements IDictionary<TKey, TValue> contains an element with the specified key; otherwise, false.

Implements IDictionary<string, object>.TryGetValue(string, out object)