Skip to content

SAIF.Framework.BaseN business rules

This page captures business rules enforced by this library.

BR-001: Hexadecimal digit must not exceed base 16

Field Value
Statement A digit value processed by HexConverter must not exceed the converter's base (16).
Trigger HexConverter.ConvertAlphaToNumeric or HexConverter.ConvertNumericToAlpha receives a value greater than Base (16).
Enforcement HexConverter.vb — throws a ConverterException.
Outcome The invalid digit is rejected; the caller receives a ConverterException with message "'{value}' must be less than '{base}'".
Source SAIF.Framework.BaseN\HexConverter.vb, SAIF.Framework.BaseN\ConverterException.vb

BR-002: Excel (base-26) digit must not exceed base 26

Field Value
Statement A digit value processed by ExcelConverter must not exceed the converter's base (26).
Trigger ExcelConverter.ConvertNumericToAlpha or ExcelConverter.ConvertAlphaToNumeric receives a value greater than Base (26).
Enforcement ExcelConverter.vb — throws a ConverterException.
Outcome The invalid digit is rejected; the caller receives a ConverterException.
Source SAIF.Framework.BaseN\ExcelConverter.vb, SAIF.Framework.BaseN\ConverterException.vb

BR-003: Excel-style base-26 conversion is bijective (no zero digit)

Field Value
Statement Excel-style base-26 formatting has no zero digit; a "Z" position rolls over into an additional digit, mirroring spreadsheet column naming (A, B, … Z, AA, AB, …).
Trigger Any digit in the array equals 0 during ExcelConverter.FormatBaseN.
Enforcement ExcelConverter.vb — the FormatBaseN override adjusts a zero digit to the base value (26) and decrements/rolls the preceding digit(s) accordingly.
Outcome Produces correct Excel-style column-letter output instead of a literal "0" digit.
Source SAIF.Framework.BaseN\ExcelConverter.vb

BR-004: Non-numeric input to the default alpha-to-numeric conversion is treated as zero

Field Value
Statement Non-numeric input to the default alpha-to-numeric conversion is treated as zero rather than raising an error.*
Trigger ConverterBase.ConvertAlphaToNumeric receives a non-numeric string and no subclass override applies (used by BinaryConverter and OctalConverter, which do not override alpha/numeric conversion).
Enforcement ConverterBase.vb — returns 0 silently when IsNumeric(input) is False.
Outcome Callers receive 0 for invalid input instead of an exception; only BinaryConverter and OctalConverter are affected by this default, non-strict behavior.
Source SAIF.Framework.BaseN\ConverterBase.vb, SAIF.Framework.BaseN\BinaryConverter.vb, SAIF.Framework.BaseN\OctalConverter.vb

Notes

  • HexConverter and ExcelConverter enforce strict bounds checking (BR-001, BR-002), while BinaryConverter and OctalConverter rely on the non-strict default described in BR-004.
  • No inherited business rules were found; this library has no base classes or services from dependency framework libraries.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Framework.BaseN\HexConverter.vb
  • SAIF.Framework.BaseN\ExcelConverter.vb
  • SAIF.Framework.BaseN\ConverterBase.vb
  • SAIF.Framework.BaseN\BinaryConverter.vb
  • SAIF.Framework.BaseN\OctalConverter.vb
  • SAIF.Framework.BaseN\ConverterException.vb