Interface ITagCollection
- Namespace
- TMPEffects.Tags.Collections
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
tagTMPEffectTagThe tag to remove.
indicesTMPEffectTagIndices?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
startIndexintThe start index.
bufferTMPEffectTagTuple[]Buffer to save the removed tags into. Leave at default if you do not want to get the tags.
bufferIndexintThe 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
tagTMPEffectTagThe tag to add.
startIndexintThe tag's start index.
endIndexintThe tag's end index.
orderAtIndexint?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
tagTMPEffectTagThe tag to add.
indicesTMPEffectTagIndicesThe tag's indices.
Returns
- bool
true if the tag was successfully added; false otherwise.