/// <summary> /// Ctor /// </summary> /// <param name="hashType">Used hash type</param> /// <param name="ignoreCase">Ignore case of hashed text (used UPPER variant)</param> /// <param name="ignoreWhiteSpace">Ignore whitespace characters on begining and ending of text</param> /// <param name="leadingCharactersToIgnore">Lenght of prefix that should be ignored</param> public StringHasher(TextDiffHashType hashType, bool ignoreCase, bool ignoreWhiteSpace, int leadingCharactersToIgnore) { _hashType = hashType; _ignoreCase = ignoreCase; _ignoreWhiteSpace = ignoreWhiteSpace; _leadingCharactersToIgnore = leadingCharactersToIgnore; _uniqueTable = new Dictionary <string, int>(); }
/// <summary> /// Ctor /// </summary> /// <param name="hashType">Type of used hash algorithm</param> /// <param name="ignoreCase">If ignore case</param> /// <param name="ignoreWhiteSpace">If ignore whitespaces on beginning and end</param> /// <param name="leadingCharactersToIgnore">Prefix lenght to ignore</param> /// <param name="supportChangeEditType">If change edit type is supported</param> public TextDiff(TextDiffHashType hashType, bool ignoreCase, bool ignoreWhiteSpace, int leadingCharactersToIgnore, bool supportChangeEditType) { _hasher = new StringHasher(hashType, ignoreCase, ignoreWhiteSpace, leadingCharactersToIgnore); _supportChangeEditType = supportChangeEditType; }
/// <summary> /// Ctor /// </summary> /// <param name="hashType">Type of used hash algorithm</param> /// <param name="ignoreCase">If ignore case</param> /// <param name="ignoreWhiteSpace">If ignore whitespaces on beginning and end</param> public TextDiff(TextDiffHashType hashType, bool ignoreCase, bool ignoreWhiteSpace) : this(hashType, ignoreCase, ignoreWhiteSpace, 0, true) { }