• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

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
object
TagCollection
Implements
IDictionary<string, string>
ICollection<KeyValuePair<string, string>>
IEnumerable<KeyValuePair<string, string>>
IEnumerable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Presentation
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
Type Description
int

IsReadOnly

Gets a value indicating whether the collection is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
bool

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
Type Description
string

Keys

Gets a collection containing the keys in the tag collection.

Declaration
public ICollection<string> Keys { get; }
Property Value
Type Description
ICollection<string>

Values

Gets a collection containing the values in the tag collection.

Declaration
public ICollection<string> Values { get; }
Property Value
Type Description
ICollection<string>

Methods

Add(KeyValuePair<string, string>)

Adds a key-value pair to the collection.

Declaration
public void Add(KeyValuePair<string, string> item)
Parameters
Type Name Description
KeyValuePair<string, string> item

Add(string, string)

Adds a tag with the specified key and value.

Declaration
public void Add(string key, string value)
Parameters
Type Name Description
string key
string value

Clear()

Removes all tags from the collection.

Declaration
public void Clear()

Contains(KeyValuePair<string, string>)

Determines whether the collection contains the specified key-value pair.

Declaration
public bool Contains(KeyValuePair<string, string> item)
Parameters
Type Name Description
KeyValuePair<string, string> item
Returns
Type Description
bool

ContainsKey(string)

Determines whether the collection contains the specified key.

Declaration
public bool ContainsKey(string key)
Parameters
Type Name Description
string key
Returns
Type Description
bool

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
Type Name Description
KeyValuePair<string, string>[] array
int arrayIndex

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
Type Description
string

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
Type Description
IEnumerator<KeyValuePair<string, string>>

Remove(KeyValuePair<string, string>)

Removes the first occurrence of the specified key-value pair.

Declaration
public bool Remove(KeyValuePair<string, string> item)
Parameters
Type Name Description
KeyValuePair<string, string> item
Returns
Type Description
bool

Remove(string)

Removes the tag with the specified key.

Declaration
public bool Remove(string key)
Parameters
Type Name Description
string key
Returns
Type Description
bool

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
Type Name Description
string key
string value

TryGetValue(string, out string)

Gets the value associated with the specified key.

Declaration
public bool TryGetValue(string key, out string value)
Parameters
Type Name Description
string key
string value
Returns
Type Description
bool

Implements

IDictionary<TKey, TValue>
ICollection<T>
IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX