![]() |
TwitchLib 3.5.3
|
Helper class which maintains a collection of all emotes active for a given channel. More...
Public Member Functions | |
| MessageEmoteCollection () | |
| Default, empty constructor initializes the list and sets the preferred EmoteFilterDelegate to AllInclusiveEmoteFilter(MessageEmote) More... | |
| MessageEmoteCollection (EmoteFilterDelegate preferredFilter) | |
| Constructor which specifies a particular preferred T:TwitchLib.Models.Client.MessageEmoteCollection.EmoteFilterDelegate More... | |
| void | Add (MessageEmote emote) |
| Adds an MessageEmote to the collection. Duplicate emotes (judged by MessageEmote.Text) are ignored. More... | |
| void | Merge (IEnumerable< MessageEmote > emotes) |
| Adds every MessageEmote from an enumerable collection to the internal collection. Duplicate emotes (judged by MessageEmote.Text) are ignored. More... | |
| void | Remove (MessageEmote emote) |
| Removes the specified MessageEmote from the collection. More... | |
| void | RemoveAll () |
| Removes all MessageEmotes from the collection. More... | |
| string | ReplaceEmotes (string originalMessage, EmoteFilterDelegate del=null) |
| Replaces all instances of all registered emotes passing the provided EmoteFilterDelegate with their designated MessageEmote.ReplacementStrings More... | |
| delegate bool | EmoteFilterDelegate (MessageEmote emote) |
| A delegate function which, when given a MessageEmote, determines whether it should be replaced. More... | |
Static Public Member Functions | |
| static bool | AllInclusiveEmoteFilter (MessageEmote emote) |
| The default emote filter includes every MessageEmote registered on this list. More... | |
| static bool | TwitchOnlyEmoteFilter (MessageEmote emote) |
| This emote filter includes only MessageEmotes provided by Twitch. More... | |
Helper class which maintains a collection of all emotes active for a given channel.
| TwitchLib.Client.Models.MessageEmoteCollection.MessageEmoteCollection | ( | ) |
Default, empty constructor initializes the list and sets the preferred EmoteFilterDelegate to AllInclusiveEmoteFilter(MessageEmote)
| TwitchLib.Client.Models.MessageEmoteCollection.MessageEmoteCollection | ( | EmoteFilterDelegate | preferredFilter | ) |
Constructor which specifies a particular preferred T:TwitchLib.Models.Client.MessageEmoteCollection.EmoteFilterDelegate
| preferredFilter |
| void TwitchLib.Client.Models.MessageEmoteCollection.Add | ( | MessageEmote | emote | ) |
Adds an MessageEmote to the collection. Duplicate emotes (judged by MessageEmote.Text) are ignored.
| emote | The MessageEmote to add to the collection. |
|
static |
The default emote filter includes every MessageEmote registered on this list.
| emote | An emote which is ignored in this filter. |
| delegate bool TwitchLib.Client.Models.MessageEmoteCollection.EmoteFilterDelegate | ( | MessageEmote | emote | ) |
A delegate function which, when given a MessageEmote, determines whether it should be replaced.
| emote | The MessageEmote to be considered |
| void TwitchLib.Client.Models.MessageEmoteCollection.Merge | ( | IEnumerable< MessageEmote > | emotes | ) |
Adds every MessageEmote from an enumerable collection to the internal collection. Duplicate emotes (judged by MessageEmote.Text) are ignored.
| emotes | A collection of MessageEmotes. |
| void TwitchLib.Client.Models.MessageEmoteCollection.Remove | ( | MessageEmote | emote | ) |
Removes the specified MessageEmote from the collection.
| emote | The MessageEmote to remove. |
| void TwitchLib.Client.Models.MessageEmoteCollection.RemoveAll | ( | ) |
Removes all MessageEmotes from the collection.
| string TwitchLib.Client.Models.MessageEmoteCollection.ReplaceEmotes | ( | string | originalMessage, |
| EmoteFilterDelegate | del = null |
||
| ) |
Replaces all instances of all registered emotes passing the provided EmoteFilterDelegate with their designated MessageEmote.ReplacementStrings
| originalMessage | The original message which needs to be processed for emotes. |
| del | An EmoteFilterDelegate which returns true if its received MessageEmote is to be replaced. Defaults to CurrentEmoteFilter. |
|
static |
This emote filter includes only MessageEmotes provided by Twitch.
| emote | A MessageEmote which will be replaced if its Source is MessageEmote.EmoteSource.Twitch |