Interface ITagCollection
- Namespace
- TMPEffects.Tags.Collections
- Assembly
- TMPEffects.dll
A writable collection of TMPEffectTagTuple.
public interface ITagCollection : IReadOnlyTagCollection, IReadOnlyCollection<TMPEffectTagTuple>, IEnumerable<TMPEffectTagTuple>, IEnumerable
- Inherited Members
Methods
Clear()
Clear the entire collection.
void Clear()
Remove(TMPEffectTag, TMPEffectTagIndices?)
Remove the given tag, with the specified indices (if supplied).
bool Remove(TMPEffectTag tag, TMPEffectTagIndices? indices = null)
Parameters
tag
TMPEffectTagThe tag to remove.
indices
TMPEffectTagIndices?The indices of the tag.
Returns
- bool
true if the tag was removed; false otherwise.
RemoveAllAt(int, TMPEffectTagTuple[], int)
Remove all tags starting at the given startIndex
.
int RemoveAllAt(int startIndex, TMPEffectTagTuple[] buffer = null, int bufferIndex = 0)
Parameters
startIndex
intThe start index.
buffer
TMPEffectTagTuple[]Buffer to save the removed tags into. Leave at default if you do not want to get the tags.
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 removed tags.
RemoveAt(int, int?)
Remove the tag starting at the given startIndex
with the correct order
.
If order
is left to default, the first tag at startIndex
will be removed.
bool RemoveAt(int startIndex, int? order = null)
Parameters
Returns
- bool
true if a tag was removed; false otherwise.
TryAdd(TMPEffectTag, int, int, int?)
Attempt to add a new tag to the collection.
If orderAtIndex
is left to default, the order will be assigned so it is the first tag at the given startIndex
.
bool TryAdd(TMPEffectTag tag, int startIndex = 0, int endIndex = -1, int? orderAtIndex = null)
Parameters
tag
TMPEffectTagThe tag to add.
startIndex
intThe tag's start index.
endIndex
intThe tag's end index.
orderAtIndex
int?The tag's order at index.
Returns
- bool
true if the tag was successfully added; false otherwise.
TryAdd(TMPEffectTag, TMPEffectTagIndices)
Attempt to add a new tag to the collection.
bool TryAdd(TMPEffectTag tag, TMPEffectTagIndices indices)
Parameters
tag
TMPEffectTagThe tag to add.
indices
TMPEffectTagIndicesThe tag's indices.
Returns
- bool
true if the tag was successfully added; false otherwise.