Class TagCollection
A key-value collection of string tags for custom data storage on
shapes and slides. Keys are case-sensitive. Maps to the OOXML
p:custDataLst/p:tagLst elements.
Inheritance
TagCollection
Assembly: DRIT.Presentation.dll
Syntax
public class TagCollection : IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable
Properties
Count
Gets the number of tags in the collection.
Declaration
public int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether the collection is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
this[string]
Gets or sets the tag value associated with the specified key.
Declaration
public string this[string key] { get; set; }
Parameters
| Type |
Name |
Description |
| string |
key |
|
Property Value
Keys
Gets a collection containing the keys in the tag collection.
Declaration
public ICollection<string> Keys { get; }
Property Value
Values
Gets a collection containing the values in the tag collection.
Declaration
public ICollection<string> Values { get; }
Property Value
Methods
Add(KeyValuePair<string, string>)
Adds a key-value pair to the collection.
Declaration
public void Add(KeyValuePair<string, string> item)
Parameters
Add(string, string)
Adds a tag with the specified key and value.
Declaration
public void Add(string key, string value)
Parameters
Clear()
Removes all tags from the collection.
Declaration
Contains(KeyValuePair<string, string>)
Determines whether the collection contains the specified key-value pair.
Declaration
public bool Contains(KeyValuePair<string, string> item)
Parameters
Returns
ContainsKey(string)
Determines whether the collection contains the specified key.
Declaration
public bool ContainsKey(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
CopyTo(KeyValuePair<string, string>[], int)
Copies the key-value pairs to an array starting at the specified index.
Declaration
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
Parameters
Get(string)
Gets or sets a tag value by key. Returns null when the
key is not present. Setting to null removes the tag.
Declaration
public string Get(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
Remove(KeyValuePair<string, string>)
Removes the first occurrence of the specified key-value pair.
Declaration
public bool Remove(KeyValuePair<string, string> item)
Parameters
Returns
Remove(string)
Removes the tag with the specified key.
Declaration
public bool Remove(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
Set(string, string)
Sets a tag value. If the value is null, the tag is removed.
Declaration
public void Set(string key, string value)
Parameters
TryGetValue(string, out string)
Gets the value associated with the specified key.
Declaration
public bool TryGetValue(string key, out string value)
Parameters
Returns
Implements