C# Class Onism.Cldr.Test.Utils.NaiveTokenRemover

Represents an object capable of removing descendant tokens of JToken in a similar way to how gitignore handles patterns. This naive implementation is used to test another algorithm.
Show file Open project: pgolebiowski/onism-cldr Class Usage Examples

Public Methods

Method Description
NaiveTokenRemover ( ) : System.Collections.Generic
Remove ( JToken root, PatternCollection patterns ) : void

Removes tokens from this JSON token using a collection of patterns. This naive algorithm marks all the affected leaves every time a pattern is evaluated.

Private Methods

Method Description
FindLeaves ( JToken token ) : IEnumerable
GetId ( JToken token ) : long

Method Details

NaiveTokenRemover() public method

public NaiveTokenRemover ( ) : System.Collections.Generic
return System.Collections.Generic

Remove() public method

Removes tokens from this JSON token using a collection of patterns. This naive algorithm marks all the affected leaves every time a pattern is evaluated.
public Remove ( JToken root, PatternCollection patterns ) : void
root JToken
patterns PatternCollection
return void