private void UpdateCheckSums(char character) { int characterCheckValue = _type.GetCheckValue(character); _evenCheckSumValue += characterCheckValue; _type = _type.Next(); characterCheckValue = _type.GetCheckValue(character); _oddCheckSumValue += characterCheckValue; }
public CreditCardNumberDetector(int initialNumberOfDigits) { Reset(); NumberOfDigits = _initialNumberOfDigits = initialNumberOfDigits; _type = CheckSumType.GetFor(NumberOfDigits); }
public void Reset() { _indexes.Clear(); _matchingCardLengths.Clear(); NumberOfDigits = _initialNumberOfDigits = 0; _type = CheckSumType.GetFor(NumberOfDigits); _evenCheckSumValue = _oddCheckSumValue = 0; }