Manager for excessive punctuation. More...

Inheritance diagram for Crosstales.BWF.Manager.PunctuationManager:
Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >

Public Member Functions

void Load ()
 Loads the current filter with all settings from this object. More...
 
bool Contains (string text)
 Searches for excessive punctuations in a text. More...
 
void ContainsAsync (string text)
 Searches asynchronously for excessive punctuations in a text. Use the "OnContainsComplete"-callback to get the result. More...
 
System.Collections.Generic.List< string > GetAll (string text)
 Searches for excessive punctuations in a text. More...
 
void GetAllAsync (string text)
 Searches asynchronously for excessive punctuations in a text. Use the "OnGetAllComplete"-callback to get the result. More...
 
string ReplaceAll (string text, bool markOnly=false, string prefix="", string postfix="")
 Searches and replaces all excessive punctuations in a text. More...
 
void ReplaceAllAsync (string text, bool markOnly=false, string prefix="", string postfix="")
 Searches and replaces asynchronously all domains in a text. Use the "OnReplaceAllComplete"-callback to get the result. More...
 
string Mark (string text, bool replace=false, string prefix="<b><color=red>", string postfix="</color></b>")
 Marks the text with a prefix and postfix. More...
 
- Public Member Functions inherited from Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >
string Unmark (string text, string prefix="<b><color=red>", string postfix="</color></b>")
 Unmarks the text with a prefix and postfix. More...
 

Static Public Member Functions

static void ResetObject ()
 Resets this object. More...
 

Public Attributes

Crosstales.BWF.OnContainsCompleted OnContainsCompleted
 
Crosstales.BWF.OnGetAllCompleted OnGetAllCompleted
 
Crosstales.BWF.OnReplaceAllCompleted OnReplaceAllCompleted
 
- Public Attributes inherited from Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >
bool isReady
 Checks the readiness status of the manager. More...
 

Protected Member Functions

override void Awake ()
 
override void OnApplicationQuit ()
 
- Protected Member Functions inherited from Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >
void onContainsComplete (string text, bool result)
 
void onGetAllComplete (string text, System.Collections.Generic.List< string > badWords)
 
void onReplaceAllComplete (string originalText, string cleanText)
 

Protected Attributes

override Crosstales.BWF.OnContainsCompleted onContainsCompleted => OnContainsCompleted
 
override Crosstales.BWF.OnGetAllCompleted onGetAllCompleted => OnGetAllCompleted
 
override Crosstales.BWF.OnReplaceAllCompleted onReplaceAllCompleted => OnReplaceAllCompleted
 
- Protected Attributes inherited from Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >
_filter
 

Properties

int???? PunctuationCharsNumber [get, set]
 Defines the number of allowed punctuation letters in a row (default: 3). More...
 
- Properties inherited from Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >
bool DisableOrdering [get, set]
 
abstract OnContainsCompleted onContainsCompleted [get]
 
abstract OnGetAllCompleted onGetAllCompleted [get]
 
abstract OnReplaceAllCompleted onReplaceAllCompleted [get]
 

Additional Inherited Members

- Events inherited from Crosstales.BWF.Manager.BaseManager< PunctuationManager, PunctuationFilter >
ContainsComplete OnContainsComplete
 An event triggered whenever the "Contains"-operation is completed. More...
 
GetAllComplete OnGetAllComplete
 An event triggered whenever the "GetAll"-operation is completed. More...
 
ReplaceAllComplete OnReplaceAllComplete
 An event triggered whenever the "ReplaceAll"-operation is completed. More...
 

Detailed Description

Manager for excessive punctuation.

Member Function Documentation

◆ Contains()

bool Crosstales.BWF.Manager.PunctuationManager.Contains ( string  text)

Searches for excessive punctuations in a text.

Parameters
textText to check
Returns
True if a match was found

◆ ContainsAsync()

void Crosstales.BWF.Manager.PunctuationManager.ContainsAsync ( string  text)

Searches asynchronously for excessive punctuations in a text. Use the "OnContainsComplete"-callback to get the result.

Parameters
textText to check

◆ GetAll()

System.Collections.Generic.List<string> Crosstales.BWF.Manager.PunctuationManager.GetAll ( string  text)

Searches for excessive punctuations in a text.

Parameters
textText to check
Returns
List with all the matches

◆ GetAllAsync()

void Crosstales.BWF.Manager.PunctuationManager.GetAllAsync ( string  text)

Searches asynchronously for excessive punctuations in a text. Use the "OnGetAllComplete"-callback to get the result.

Parameters
textText to check

◆ Load()

void Crosstales.BWF.Manager.PunctuationManager.Load ( )

Loads the current filter with all settings from this object.

◆ Mark()

string Crosstales.BWF.Manager.PunctuationManager.Mark ( string  text,
bool  replace = false,
string  prefix = "<b><color=red>",
string  postfix = "</color></b>" 
)

Marks the text with a prefix and postfix.

Parameters
textText containing excessive punctuations
replaceReplace the excessive punctuations (default: false, optional)
prefixPrefix for every found punctuation (default: bold and red, optional)
postfixPostfix for every found punctuation (default: bold and red, optional)
Returns
Text with marked excessive punctuations

◆ ReplaceAll()

string Crosstales.BWF.Manager.PunctuationManager.ReplaceAll ( string  text,
bool  markOnly = false,
string  prefix = "",
string  postfix = "" 
)

Searches and replaces all excessive punctuations in a text.

Parameters
textText to check
markOnlyOnly mark the words (default: false, optional)
prefixPrefix for every found punctuation (optional)
postfixPostfix for every found punctuation (optional)
Returns
Clean text

◆ ReplaceAllAsync()

void Crosstales.BWF.Manager.PunctuationManager.ReplaceAllAsync ( string  text,
bool  markOnly = false,
string  prefix = "",
string  postfix = "" 
)

Searches and replaces asynchronously all domains in a text. Use the "OnReplaceAllComplete"-callback to get the result.

Parameters
textText to check
markOnlyOnly mark the words (default: false, optional)
prefixPrefix for every found punctuation (optional)
postfixPostfix for every found punctuation (optional)

◆ ResetObject()

static void Crosstales.BWF.Manager.PunctuationManager.ResetObject ( )
static

Resets this object.

Property Documentation

◆ PunctuationCharsNumber

int???? Crosstales.BWF.Manager.PunctuationManager.PunctuationCharsNumber
getset

Defines the number of allowed punctuation letters in a row (default: 3).


The documentation for this class was generated from the following file:
  • C:/Users/slaub/Unity/assets/BWFPro/BWFPro/Assets/Plugins/crosstales/BadWordFilter/Scripts/Manager/PunctuationManager.cs