C# Class SILUBS.ScriptureChecks.MixedCapitalizationCheck

Inheritance: IScrCheckInventory
Show file Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
Check ( IEnumerable toks, RecordErrorHandler record ) : void

Execute the check. Call 'RecordError' for every error found.

GetReferences ( IEnumerable tokens, string desiredKey ) : List

Get all instances of the item being checked in the token list passed. This includes both valid and invalid instances. This is used 1) to create an inventory of these items. To show the user all instance of an item with a specified key. 2) With a "desiredKey" in order to fetch instance of a specific item (e.g. all the places where "the" is a repeated word.

MixedCapitalizationCheck ( IChecksDataSource checksDataSource ) : System

Save ( ) : void

Update the parameter values for storing the valid and invalid lists in CheckDataSource and then save them. This is here because the inventory form does not know the names of the parameters that need to be saved for a given check, only the check knows this.

Private Methods

Method Description
Localize ( string strToLocalize ) : string

Returns a localized version of the specified string.

Method Details

Check() public method

Execute the check. Call 'RecordError' for every error found.
public Check ( IEnumerable toks, RecordErrorHandler record ) : void
toks IEnumerable ITextTokens corresponding to the text to be checked. /// Typically this is one books worth.
record RecordErrorHandler Call this delegate to report each error found.
return void

GetReferences() public method

Get all instances of the item being checked in the token list passed. This includes both valid and invalid instances. This is used 1) to create an inventory of these items. To show the user all instance of an item with a specified key. 2) With a "desiredKey" in order to fetch instance of a specific item (e.g. all the places where "the" is a repeated word.
public GetReferences ( IEnumerable tokens, string desiredKey ) : List
tokens IEnumerable Tokens for text to be scanned
desiredKey string If you only want instance of a specific key (e.g. one word, /// one punctuation pattern, one character, etc.) place it here. Empty string returns /// all items.
return List

MixedCapitalizationCheck() public method

public MixedCapitalizationCheck ( IChecksDataSource checksDataSource ) : System
checksDataSource IChecksDataSource
return System

Save() public method

Update the parameter values for storing the valid and invalid lists in CheckDataSource and then save them. This is here because the inventory form does not know the names of the parameters that need to be saved for a given check, only the check knows this.
public Save ( ) : void
return void