Filter for domains. The class can also replace all domains inside a string.
More...
|
| DomainFilter (System.Collections.Generic.List< DomainProvider > domainProvider, string replaceCharacters="*", bool disableOrdering=false) |
| Instantiate the class. More...
|
|
override bool | Contains (string text, params string[] sourceNames) |
| Searches for bad words in a text. More...
|
|
override System.Collections.Generic.List< string > | GetAll (string text, params string[] sourceNames) |
| Searches for bad words in a text. More...
|
|
override string | ReplaceAll (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames) |
| Searches and replaces all bad words in a text. More...
|
|
| BaseFilter (bool disableOrdering) |
| Instantiate the class. More...
|
|
virtual string | Unmark (string text, string prefix="<b><color=red>", string postfix="</color></b>") |
| Unmarks the text with a prefix and postfix. More...
|
|
virtual string | Mark (string text, bool replace=false, string prefix="<b><color=red>", string postfix="</color></b>", params string[] sourceNames) |
| Marks the text with a prefix and postfix. More...
|
|
|
static void | logFilterNotReady () |
|
static void | logResourceNotFound (string res) |
|
static void | logContains () |
|
static void | logGetAll () |
|
static void | logReplaceAll () |
|
readonly System.Collections.Generic.Dictionary< string, Source > | _sources = new System.Collections.Generic.Dictionary<string, Source>() |
|
readonly System.Collections.Generic.List< string > | _getAllResult = new System.Collections.Generic.List<string>() |
|
Filter for domains. The class can also replace all domains inside a string.
◆ DomainFilter()
Crosstales.BWF.Filter.DomainFilter.DomainFilter |
( |
System.Collections.Generic.List< DomainProvider > |
domainProvider, |
|
|
string |
replaceCharacters = "*" , |
|
|
bool |
disableOrdering = false |
|
) |
| |
Instantiate the class.
- Parameters
-
domainProvider | List of all domain providers. |
replaceCharacters | Replace characters for domains (default: *, optional). |
disableOrdering | Disables the ordering of the 'GetAll'-method (default: false, optional). |
◆ Contains()
override bool Crosstales.BWF.Filter.DomainFilter.Contains |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
|
virtual |
Searches for bad words in a text.
- Parameters
-
text | Text to check |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- True if a match was found
Implements Crosstales.BWF.Filter.BaseFilter.
◆ GetAll()
override System.Collections.Generic.List<string> Crosstales.BWF.Filter.DomainFilter.GetAll |
( |
string |
text, |
|
|
params string[] |
sourceNames |
|
) |
| |
|
virtual |
Searches for bad words in a text.
- Parameters
-
text | Text to check |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- List with all the matches
Implements Crosstales.BWF.Filter.BaseFilter.
◆ ReplaceAll()
override string Crosstales.BWF.Filter.DomainFilter.ReplaceAll |
( |
string |
text, |
|
|
bool |
markOnly = false , |
|
|
string |
prefix = "" , |
|
|
string |
postfix = "" , |
|
|
params string[] |
sourceNames |
|
) |
| |
|
virtual |
Searches and replaces all bad words in a text.
- Parameters
-
text | Text to check |
markOnly | Only mark the words (default: false, optional) |
prefix | Prefix for every found bad word (optional) |
postfix | Postfix for every found bad word (optional) |
sourceNames | Relevant sources (e.g. "english", optional) |
- Returns
- Clean text
Implements Crosstales.BWF.Filter.BaseFilter.
◆ ReplaceCharacters
string Crosstales.BWF.Filter.DomainFilter.ReplaceCharacters |
Replace characters for domains.
◆ DomainProvider
System.Collections.Generic.List<DomainProvider>? Crosstales.BWF.Filter.DomainFilter.DomainProvider |
|
getset |
List of all domain providers.
- Returns
- All domain providers.
◆ isReady
override bool? Crosstales.BWF.Filter.DomainFilter.isReady |
|
get |
Checks the readiness status of the filter.
- Returns
- True if the filter is ready.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/BWFPro/BWFPro/Assets/Plugins/crosstales/BadWordFilter/Scripts/Filter/DomainFilter.cs