Class DocumentVariableCollection
Represents a collection of all document variables in a RadDocument.
Inheritance
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public class DocumentVariableCollection : Object, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
Constructors
DocumentVariableCollection(RadDocument)
Initializes a new instance of the DocumentVariableCollection class.
Declaration
public DocumentVariableCollection(RadDocument owner)
Parameters
RadDocument
owner
The associated document. |
DocumentVariableCollection(RadDocument, DocumentVariableCollection)
Initializes a new instance of the DocumentVariableCollection class.
Declaration
public DocumentVariableCollection(RadDocument owner, DocumentVariableCollection toCopyFrom)
Parameters
RadDocument
owner
The associated document. |
DocumentVariableCollection
toCopyFrom
A collection of document variables which will be added to the associated document. |
Properties
Count
Gets the number of elements contained in the System.Collections.Generic.ICollection<>.
Declaration
public int Count { get; }
Property Value
System.Int32
|
IsReadOnly
Gets a value indicating whether the System.Collections.Generic.ICollection<> is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean
|
Item[String]
Gets or sets the variable with the specified key.
Declaration
public object this[string key] { get; set; }
Parameters
System.String
key
The key of the variable. |
Property Value
System.Object
The document variable. |
Keys
Gets an System.Collections.Generic.ICollection<> containing the keys of the System.Collections.Generic.IDictionary<, >.
Declaration
public ICollection<string> Keys { get; }
Property Value
System.Collections.Generic.ICollection<System.String>
|
Values
Gets an System.Collections.Generic.ICollection<> containing the values in the System.Collections.Generic.IDictionary<, >.
Declaration
public ICollection<object> Values { get; }
Property Value
System.Collections.Generic.ICollection<System.Object>
|
Methods
Add(String, Object)
Adds an element with the provided key and value to the System.Collections.Generic.IDictionary<, >.
Declaration
public void Add(string key, object value)
Parameters
System.String
key
The object to use as the key of the element to add. |
System.Object
value
The object to use as the value of the element to add. |
Clear()
Removes all items from the System.Collections.Generic.ICollection<>.
Declaration
public void Clear()
ContainsKey(String)
Determines whether the System.Collections.Generic.IDictionary<, > contains an element with the specified key.
Declaration
public bool ContainsKey(string key)
Parameters
System.String
key
The key to locate in the System.Collections.Generic.IDictionary<, >. |
Returns
System.Boolean
true if the System.Collections.Generic.IDictionary<, > contains an element with the key; otherwise, false. |
EvaluateVariableValue(String)
Evaluates the variable value.
Declaration
public object EvaluateVariableValue(string variableName)
Parameters
System.String
variableName
Name of the variable. |
Returns
System.Object
The value of the variable. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
An enumerator that can be used to iterate through the collection. |
Remove(String)
Removes the element with the specified key from the System.Collections.Generic.IDictionary<, >.
Declaration
public bool Remove(string key)
Parameters
System.String
key
The key of the element to remove. |
Returns
System.Boolean
true if the element is successfully removed; otherwise, false. This method also returns false if |
TryGetValue(String, out Object)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(string key, out object value)
Parameters
System.String
key
The key whose value to get. |
System.Object
value
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 |
Returns
System.Boolean
true if the object that implements System.Collections.Generic.IDictionary<, > contains an element with the specified key; otherwise, false. |