Class TagProcessorManager
- Namespace
- TMPEffects.TextProcessing
Manages multiple TagProcessor.
public class TagProcessorManager : ITagProcessorManager, IEnumerable<TagProcessor>, IEnumerable- Inheritance
- 
      
      TagProcessorManager
- Implements
- Inherited Members
Constructors
TagProcessorManager()
public TagProcessorManager()Properties
TagProcessors
Mapping of prefix to list of TagProcessor.
public ReadOnlyDictionary<char, ReadOnlyCollection<TagProcessor>> TagProcessors { get; }Property Value
Methods
AddProcessor(char, TagProcessor, int)
Add a processor.
public void AddProcessor(char prefix, TagProcessor processor, int priority = 0)Parameters
- prefixchar
- Prefix of tags processed by - processor.
- processorTagProcessor
- The processor. 
- priorityint
- Priority of this processor. Only one processors can process any given tag, so the order that processors are invoked in matters. 
 Less than zero => last processed
 zero => first processed (highest priority)
 Greater than zero => priority-th processed
 Greater than current amount of processors => last processed
Clear()
Remove all processors.
public void Clear()GetEnumerator()
Get all TagProcessor managed by this instance.
public IEnumerator<TagProcessor> GetEnumerator()Returns
- IEnumerator<TagProcessor>
- All TagProcessor managed by this instance. 
RegisterTo(TMPEffectsTextProcessor)
Register all TagProcessor to the given textProcessor.
public void RegisterTo(TMPEffectsTextProcessor textProcessor)Parameters
- textProcessorTMPEffectsTextProcessor
- The TMPEffectsTextProcessor to register to. 
RemoveProcessor(char, TagProcessor)
Remove a processor.
public bool RemoveProcessor(char prefix, TagProcessor processor)Parameters
- prefixchar
- Prefix of tags processed by - processor.
- processorTagProcessor
- The processor. 
Returns
- bool
- true if the processors was removed; otherwise false. 
UnregisterFrom(TMPEffectsTextProcessor)
Unregister all TagProcessor from the given textProcessor.
public void UnregisterFrom(TMPEffectsTextProcessor textProcessor)Parameters
- textProcessorTMPEffectsTextProcessor
- The TMPEffectsTextProcessor to unregister from.