Class TagCollection
A key-value collection of string tags for custom data storage on
shapes. Keys are case-sensitive. Maps to the OOXML
p:custDataLst/p:tagLst elements.
Implements
Inherited Members
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class TagCollection : IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable
Constructors
TagCollection()
A key-value collection of string tags for custom data storage on
shapes. Keys are case-sensitive. Maps to the OOXML
p:custDataLst/p:tagLst elements.
Declaration
public TagCollection()
Properties
Count
Reports the number of items currently held by TagCollection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int | The count returned by the operation. |
IsReadOnly
Indicates whether the read only condition is true for the TagCollection.
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| bool | The is read only returned by the operation. |
this[string]
Provides indexed access to values in the TagCollection.
Declaration
public string this[string key] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | key |
Property Value
| Type | Description |
|---|---|
| string | The this returned by the operation. |
Keys
Exposes the keys associated with TagCollection.
Declaration
public ICollection<string> Keys { get; }
Property Value
| Type | Description |
|---|---|
| ICollection<string> | The keys returned by the operation. |
Values
Exposes the values associated with TagCollection.
Declaration
public ICollection<string> Values { get; }
Property Value
| Type | Description |
|---|---|
| ICollection<string> | The values returned by the operation. |
Methods
Add(KeyValuePair<string, string>)
Adds the supplied item to the TagCollection.
Declaration
public void Add(KeyValuePair<string, string> item)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyValuePair<string, string> | item | The item used by the operation. |
Add(string, string)
Adds the supplied item to the TagCollection.
Declaration
public void Add(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key used by the operation. |
| string | value | The value used by the operation. |
Clear()
Exposes the clear associated with TagCollection.
Declaration
public void Clear()
Contains(KeyValuePair<string, string>)
Exposes the contains associated with TagCollection.
Declaration
public bool Contains(KeyValuePair<string, string> item)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyValuePair<string, string> | item | The item used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The contains returned by the operation. |
ContainsKey(string)
Exposes the contains key associated with TagCollection.
Declaration
public bool ContainsKey(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The contains key returned by the operation. |
CopyTo(KeyValuePair<string, string>[], int)
Exposes the copy to associated with TagCollection.
Declaration
public void CopyTo(KeyValuePair<string, string>[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyValuePair<string, string>[] | array | The array used by the operation. |
| int | arrayIndex | The array index used by the operation. |
Get(string)
Retrieves the requested value from the TagCollection.
Declaration
public string Get(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key used by the operation. |
Returns
| Type | Description |
|---|---|
| string | The get returned by the operation. |
GetEnumerator()
Exposes the string associated with TagCollection.
Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<KeyValuePair<string, string>> | The string returned by the operation. |
Remove(KeyValuePair<string, string>)
Removes the selected item from the TagCollection.
Declaration
public bool Remove(KeyValuePair<string, string> item)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyValuePair<string, string> | item | The item used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The remove returned by the operation. |
Remove(string)
Removes the selected item from the TagCollection.
Declaration
public bool Remove(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The remove returned by the operation. |
Set(string, string)
Updates the value held by the TagCollection.
Declaration
public void Set(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key used by the operation. |
| string | value | The value used by the operation. |
TryGetValue(string, out string)
Retrieves the requested get value from the TagCollection.
Declaration
public bool TryGetValue(string key, out string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key used by the operation. |
| string | value | The value used by the operation. |
Returns
| Type | Description |
|---|---|
| bool | The try get value returned by the operation. |