Class ReadOnlyTagCollection
- Namespace
- TMPEffects.Tags.Collections
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public class ReadOnlyTagCollection : IReadOnlyTagCollection, IReadOnlyCollection<TMPEffectTagTuple>, IEnumerable<TMPEffectTagTuple>, IEnumerable
- Inheritance
-
ReadOnlyTagCollection
- Implements
- Inherited Members
Properties
TagCount
The amount of TMPEffectTagTuple in this collection.
public int TagCount { get; }
Property Value
Methods
Contains(TMPEffectTag, TMPEffectTagIndices?)
Whether this collection contains the given tag with the given indices (if supplied).
public bool Contains(TMPEffectTag tag, TMPEffectTagIndices? indices = null)
Parameters
tag
TMPEffectTagThe tag to check.
indices
TMPEffectTagIndices?The tag indices. If you don't care about the tag's indices, leave as default.
Returns
- bool
true if this collection contains the given tag with the given indices (if supplied); otherwise false.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<TMPEffectTagTuple> GetEnumerator()
Returns
- IEnumerator<TMPEffectTagTuple>
An enumerator that can be used to iterate through the collection.
IndicesOf(TMPEffectTag)
Get the associated indices of the given tag.
public TMPEffectTagIndices? IndicesOf(TMPEffectTag tag)
Parameters
tag
TMPEffectTagThe tag to get the indices of.
Returns
- TMPEffectTagIndices?
The indices of the given tag, if the tag is contained in the collection; otherwise null.
TagAt(int, int?)
Get the tag at the given startIndex
with the correct order
.
If order
is left to default, the first tag at startIndex
will be returned.
public TMPEffectTag TagAt(int startIndex, int? order = null)
Parameters
Returns
- TMPEffectTag
The tag at the given indices, if it exists; otherwise null.
TagsAt(int)
Get the tags starting at the given startIndex
.
public IEnumerable<TMPEffectTagTuple> TagsAt(int startIndex)
Parameters
startIndex
intThe start index.
Returns
- IEnumerable<TMPEffectTagTuple>
All tags starting at the given
startIndex
.
TagsAt(int, TMPEffectTagTuple[], int)
Get the tags starting at the given startIndex
.
public int TagsAt(int startIndex, TMPEffectTagTuple[] buffer, int bufferIndex = 0)
Parameters
startIndex
intThe start index.
buffer
TMPEffectTagTuple[]The buffer the tags will be stored in.
bufferIndex
intThe offset index of the buffer, i.e. the index at which the tags should be inserted into
buffer
.
Returns
- int
The amount of tags starting at the given
startIndex
.