Crosstales.BWF.Filter.DomainFilter Class Reference

Filter for domains. The class can also replace all domains inside a string. More...

Inheritance diagram for Crosstales.BWF.Filter.DomainFilter:
Crosstales.BWF.Filter.BaseFilter Crosstales.BWF.Filter.IFilter

Public Member Functions

 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...
 
- Public Member Functions inherited from Crosstales.BWF.Filter.BaseFilter
 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...
 

Public Attributes

string ReplaceCharacters
 Replace characters for domains. More...
 
- Public Attributes inherited from Crosstales.BWF.Filter.BaseFilter
bool DisableOrdering
 

Properties

System.Collections.Generic.List< DomainProvider >? DomainProvider [get, set]
 List of all domain providers. More...
 
override bool? isReady [get]
 Checks the readiness status of the filter. More...
 
- Properties inherited from Crosstales.BWF.Filter.BaseFilter
virtual System.Collections.Generic.List< SourceSources [get]
 
abstract bool isReady [get]
 
- Properties inherited from Crosstales.BWF.Filter.IFilter
System.Collections.Generic.List< Crosstales.BWF.Data.SourceSources [get]
 All sources of the current filter. More...
 
bool isReady [get]
 Checks the readiness status of the current filter. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Crosstales.BWF.Filter.BaseFilter
static void logFilterNotReady ()
 
static void logResourceNotFound (string res)
 
static void logContains ()
 
static void logGetAll ()
 
static void logReplaceAll ()
 
- Protected Attributes inherited from Crosstales.BWF.Filter.BaseFilter
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>()
 

Detailed Description

Filter for domains. The class can also replace all domains inside a string.

Constructor & Destructor Documentation

◆ DomainFilter()

Crosstales.BWF.Filter.DomainFilter.DomainFilter ( System.Collections.Generic.List< DomainProvider domainProvider,
string  replaceCharacters = "*",
bool  disableOrdering = false 
)

Instantiate the class.

Parameters
domainProviderList of all domain providers.
replaceCharactersReplace characters for domains (default: *, optional).
disableOrderingDisables the ordering of the 'GetAll'-method (default: false, optional).

Member Function Documentation

◆ Contains()

override bool Crosstales.BWF.Filter.DomainFilter.Contains ( string  text,
params string[]  sourceNames 
)
virtual

Searches for bad words in a text.

Parameters
textText to check
sourceNamesRelevant 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
textText to check
sourceNamesRelevant 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
textText to check
markOnlyOnly mark the words (default: false, optional)
prefixPrefix for every found bad word (optional)
postfixPostfix for every found bad word (optional)
sourceNamesRelevant sources (e.g. "english", optional)
Returns
Clean text

Implements Crosstales.BWF.Filter.BaseFilter.

Member Data Documentation

◆ ReplaceCharacters

string Crosstales.BWF.Filter.DomainFilter.ReplaceCharacters

Replace characters for domains.

Property Documentation

◆ 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