Manager for domains. More...

Inheritance diagram for Crosstales.BWF.Manager.DomainManager:
Crosstales.BWF.Manager.BaseManager< DomainManager, DomainFilter >

Public Member Functions

void Load ()
 Loads the current filter with all settings from this object. More...
 
bool Contains (string text, params string[] sourceNames)
 Searches for domains in a text. More...
 
void ContainsAsync (string text, params string[] sourceNames)
 Searches asynchronously for domains in a text. Use the "OnContainsComplete"-callback to get the result. More...
 
System.Collections.Generic.List< string > GetAll (string text, params string[] sourceNames)
 Searches for domains in a text. More...
 
void GetAllAsync (string text, params string[] sourceNames)
 Searches asynchronously for domains in a text. Use the "OnGetAllComplete"-callback to get the result. More...
 
string ReplaceAll (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames)
 Searches and replaces all domains in a text. More...
 
void ReplaceAllAsync (string text, bool markOnly=false, string prefix="", string postfix="", params string[] sourceNames)
 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>", params string[] sourceNames)
 Marks the text with a prefix and postfix. More...
 
- Public Member Functions inherited from Crosstales.BWF.Manager.BaseManager< DomainManager, DomainFilter >
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
 
System.Collections.Generic.List< Crosstales.BWF.Data.SourceSources => _filter?.Sources
 Returns all sources for the manager. More...
 
int TotalRegexCount => Sources.Sum(src => src.RegexCount)
 Total number of Regex of all providers and sources. More...
 
- Public Attributes inherited from Crosstales.BWF.Manager.BaseManager< DomainManager, DomainFilter >
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< DomainManager, DomainFilter >
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< DomainManager, DomainFilter >
_filter
 

Properties

string??? ReplaceChars [get, set]
 Replace characters for domains. More...
 
System.Collections.Generic.List< DomainProviderDomainProvider [get, set]
 List of all domain providers. More...
 
- Properties inherited from Crosstales.BWF.Manager.BaseManager< DomainManager, DomainFilter >
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< DomainManager, DomainFilter >
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 domains.

Member Function Documentation

◆ Contains()

bool Crosstales.BWF.Manager.DomainManager.Contains ( string  text,
params string[]  sourceNames 
)

Searches for domains in a text.

Parameters
textText to check
sourceNamesRelevant sources (e.g. "iana", optional)
Returns
True if a match was found

◆ ContainsAsync()

void Crosstales.BWF.Manager.DomainManager.ContainsAsync ( string  text,
params string[]  sourceNames 
)

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

Parameters
textText to check
sourceNamesRelevant sources (e.g. "english", optional)

◆ GetAll()

System.Collections.Generic.List<string> Crosstales.BWF.Manager.DomainManager.GetAll ( string  text,
params string[]  sourceNames 
)

Searches for domains in a text.

Parameters
textText to check
sourceNamesRelevant sources (e.g. "iana", optional)
Returns
List with all the matches

◆ GetAllAsync()

void Crosstales.BWF.Manager.DomainManager.GetAllAsync ( string  text,
params string[]  sourceNames 
)

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

Parameters
textText to check
sourceNamesRelevant sources (e.g. "english", optional)

◆ Load()

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

Loads the current filter with all settings from this object.

◆ Mark()

string Crosstales.BWF.Manager.DomainManager.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.

Parameters
textText containing domains
replaceReplace the domains (default: false, optional)
prefixPrefix for every found domain (default: bold and red, optional)
postfixPostfix for every found domain (default: bold and red, optional)
sourceNamesRelevant sources (e.g. "iana", optional)
Returns
Text with marked domains

◆ ReplaceAll()

string Crosstales.BWF.Manager.DomainManager.ReplaceAll ( string  text,
bool  markOnly = false,
string  prefix = "",
string  postfix = "",
params string[]  sourceNames 
)

Searches and replaces all domains in a text.

Parameters
textText to check
markOnlyOnly mark the words (default: false, optional)
prefixPrefix for every found domain (optional)
postfixPostfix for every found domain (optional)
sourceNamesRelevant sources (e.g. "iana", optional)
Returns
Clean text

◆ ReplaceAllAsync()

void Crosstales.BWF.Manager.DomainManager.ReplaceAllAsync ( string  text,
bool  markOnly = false,
string  prefix = "",
string  postfix = "",
params string[]  sourceNames 
)

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 domain (optional)
postfixPostfix for every found domain (optional)
sourceNamesRelevant sources (e.g. "iana", optional)

◆ ResetObject()

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

Resets this object.

Member Data Documentation

◆ Sources

System.Collections.Generic.List<Crosstales.BWF.Data.Source> Crosstales.BWF.Manager.DomainManager.Sources => _filter?.Sources

Returns all sources for the manager.

Returns
List with all sources for the manager

◆ TotalRegexCount

int Crosstales.BWF.Manager.DomainManager.TotalRegexCount => Sources.Sum(src => src.RegexCount)

Total number of Regex of all providers and sources.

Returns
Total number of Regex of all providers and sources.

Property Documentation

◆ DomainProvider

System.Collections.Generic.List<DomainProvider> Crosstales.BWF.Manager.DomainManager.DomainProvider
getset

List of all domain providers.

◆ ReplaceChars

string??? Crosstales.BWF.Manager.DomainManager.ReplaceChars
getset

Replace characters for domains.


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