public NumberResults(INumberVerifierSettings settings, List <string> sourceNumbers, List <string> targetNumbers) { _settings = settings; _sourceNumbers = sourceNumbers; _targetNumbers = targetNumbers; }
public NumberVerifierMain(INumberVerifierSettings numberVerifierSettings) { _verificationSettings = numberVerifierSettings; _textFormatter ??= new TextFormatter(); _numberValidator = new NumberValidator(); }
public static IEnumerable <string> GetSourceDecimalSeparators(INumberVerifierSettings numberVerifierSettings) { yield return(numberVerifierSettings.SourceDecimalComma ? @"\u002C" : string.Empty); yield return(numberVerifierSettings.SourceDecimalPeriod ? @"\u002E" : string.Empty); yield return(numberVerifierSettings.SourceDecimalCustomSeparator ? numberVerifierSettings.GetSourceDecimalCustomSeparator : string.Empty); }
public static IEnumerable <string> GetTargetThousandSeparators(INumberVerifierSettings numberVerifierSettings) { yield return(numberVerifierSettings.TargetThousandsSpace ? @"\u0020" : string.Empty); yield return(numberVerifierSettings.TargetThousandsNobreakSpace ? @"\u00A0" : string.Empty); yield return(numberVerifierSettings.TargetThousandsThinSpace ? @"\u2009" : string.Empty); yield return(numberVerifierSettings.TargetThousandsNobreakThinSpace ? @"\u202F" : string.Empty); yield return(numberVerifierSettings.TargetThousandsComma ? @"\u002C" : string.Empty); yield return(numberVerifierSettings.TargetThousandsPeriod ? @"\u002E" : string.Empty); yield return(numberVerifierSettings.TargetThousandsCustomSeparator ? numberVerifierSettings.GetTargetThousandsCustomSeparator : string.Empty); }
public void Verify(string sourceText, string targetText, INumberVerifierSettings settings, out NumberTexts sourceNumberTexts, out NumberTexts targetNumberTexts, List <ExcludedRange> sourceExcludedRanges = null, List <ExcludedRange> targetExcludedRanges = null) { _settings = settings; _sourceText = sourceText?.Normalize(System.Text.NormalizationForm.FormKC); _targetText = targetText?.Normalize(System.Text.NormalizationForm.FormKC); if (_sourceText is null && _targetText is null) { sourceNumberTexts = null; targetNumberTexts = null; return; } _sourceThousandSeparators = GetAllowedThousandSeparators(true); _sourceDecimalSeparators = GetAllowedDecimalSeparators(true).Select(Regex.Unescape).ToList(); _targetThousandSeparators = GetAllowedThousandSeparators(false); _targetDecimalSeparators = GetAllowedDecimalSeparators(false).Select(Regex.Unescape).ToList(); _sourceNumberAreaSeparatorsList = GetSourceNumberAreaSeparators(); _targetNumberAreaSeparatorsList = GetTargetNumberAreaSeparators(); Verify(out sourceNumberTexts, out targetNumberTexts, sourceExcludedRanges, targetExcludedRanges); }
public static string GetHindi(INumberVerifierSettings numberVerifierSettings) { return(numberVerifierSettings.HindiNumberVerification ? numberVerifierSettings.GetHindi : string.Empty); }
public static string GetAlphanumericsCustomSeparator(INumberVerifierSettings numberVerifierSettings) { return(numberVerifierSettings.CustomsSeparatorsAlphanumerics ? numberVerifierSettings.GetAlphanumericsCustomSeparator : string.Empty); }
public NumberResults(INumberVerifierSettings settings, List <string> sourceNumbers, List <string> targetNumbers, string sourceText, string targetText) : this(settings, sourceNumbers, targetNumbers) { SourceText = sourceText; _targetText = targetText; }
public NumberFormatVerifier(INumberVerifierSettings settings, ITextGenerator textGenerator) { VerificationSettings = settings; TextGenerator = textGenerator; }
public NumberVerifierMain(INumberVerifierSettings numberVerifierSettings) { _verificationSettings = numberVerifierSettings; }
public ExtractData(INumberVerifierSettings settings, IEnumerable <string> extractList) { _settings = settings; _extractList = extractList; }