Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​Diagnostics.​TagList

Assembly: System.Diagnostics.DiagnosticSource

Implemented Interfaces

Represents a list of tags that can be accessed by index. Provides methods to search, sort, and manipulate lists.

Properties

public int
Count
Gets the number of tags contained in the <see cref="T:System.Diagnostics.TagList" /> .
public bool
IsReadOnly
Gets a value indicating whether the <see cref="T:System.Diagnostics.TagList" /> is read-only. This property will always return <see langword="false" /> .
public Collections.​Generic.​KeyValuePair<​string, object>
Item

Methods

public void
Add​(string key, object value)
Adds a tag with the specified <paramref name="key" /> and <paramref name="value" /> to the list.
key The tag key.
value The tag value.
public void
Add​(Collections.​Generic.​KeyValuePair<​string, object> tag)
Adds a tag to the list.
tag The key-value pair of the tag to add to the list.
public void
CopyTo​(Span<​Collections.​Generic.​KeyValuePair<​string, object>> tags)
Copies the contents of this <see cref="T:System.Diagnostics.TagList" /> into a destination <paramref name="tags" /> span.
tags The destination <see cref="T:System.Span`1" /> object.
public void
Insert​(int index, Collections.​Generic.​KeyValuePair<​string, object> item)
Inserts an element into the <see cref="T:System.Diagnostics.TagList" /> at the specified index.
index The zero-based index at which the item should be inserted.
item The tag to insert.
public void
RemoveAt​(int index)
Removes the element at the specified index of the <see cref="T:System.Diagnostics.TagList" /> .
index The zero-based index of the element to remove.
public void
Clear​()
Removes all elements from the <see cref="T:System.Diagnostics.TagList" /> .
public bool
Contains​(Collections.​Generic.​KeyValuePair<​string, object> item)
Determines whether a tag is in the <see cref="T:System.Diagnostics.TagList" /> .
Returns <see langword="true" /> if item is found in the <see cref="T:System.Diagnostics.TagList" /> ; otherwise, <see langword="false" /> .
item The tag to locate in the <see cref="T:System.Diagnostics.TagList" /> .
public void
CopyTo​(Collections.​Generic.​KeyValuePair[] array, int arrayIndex)
Copies the entire <see cref="T:System.Diagnostics.TagList" /> to a compatible one-dimensional array, starting at the specified index of the target array.
array The one-dimensional Array that is the destination of the elements copied from <see cref="T:System.Diagnostics.TagList" /> . The Array must have zero-based indexing.
arrayIndex The zero-based index in <paramref name="array" /> at which copying begins.
public bool
Remove​(Collections.​Generic.​KeyValuePair<​string, object> item)
Removes the first occurrence of a specific object from the <see cref="T:System.Diagnostics.TagList" /> .
Returns <see langword="true" /> if <paramref name="item" /> is successfully removed; otherwise, <see langword="false" /> . This method also returns <see langword="false" /> if <paramref name="item" /> was not found in the <see cref="T:System.Diagnostics.TagList" /> .
item The tag to remove from the <see cref="T:System.Diagnostics.TagList" /> .
GetEnumerator​()
Returns an enumerator that iterates through the <see cref="T:System.Diagnostics.TagList" /> .
Returns An enumerator that iterates through the <see cref="T:System.Diagnostics.TagList" /> .
public int
IndexOf​(Collections.​Generic.​KeyValuePair<​string, object> item)
Searches for the specified tag and returns the zero-based index of the first occurrence within the entire <see cref="T:System.Diagnostics.TagList" /> .
Returns The zero-based index of the first ocurrence of <paramref name="item" /> in the tag list.
item The tag to locate in the <see cref="T:System.Diagnostics.TagList" /> .
public bool
Equals​(object obj)
Inherited from ValueType
public int
GetHashCode​()
Inherited from ValueType
public string
ToString​()
Inherited from ValueType
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object