SAIF.Framework.Version overview¶
Documentation context: Packaged Component (NuGet)
SAIF.Framework.Version is a small, self-contained utility library that provides a custom four-part (Major.Minor.Build.Revision) version-number value object, Version, with parsing, formatting, numeric comparison, and template-based incrementing. It parallels but does not use System.Version, and is architecturally isolated from the rest of the SAIF Framework.
Purpose¶
- Represent, parse, format, compare, and increment a four-segment version number (
Major.Minor.Build.Revision) as a reusable value object. - Support version-stamping style workflows where a version string needs to be incremented according to a template format (including a
*auto-increment token and{year}/{month}/{day}date placeholders).
Responsibilities¶
- Parse a delimited version string into
Major,Minor,Build, andRevisionsegments, defaulting missing trailing segments to"0". - Format a
Versioninstance back to its canonical"{Major}.{Minor}.{Build}.{Revision}"string viaToString(). - Compare two
Versioninstances numerically (not as strings) viaCompareToand the overloaded=,<>,<,>operators. - Produce an incremented version from a template
formatstring viaIncrement(format). - Coerce non-numeric or unparsable version segments to
0when normalizing values for comparison, via the internalToIntextension method.
Key components¶
Version: The sole domain class. ImplementsIComparable; owns all parsing, formatting, comparison, and increment logic.Extensions: A supporting module providing theToInt(value As String) As Integerextension method onString, used internally byVersionto normalize segment values.
Related documentation¶
Sources¶
SAIF.Framework.Version\Version.vbSAIF.Framework.Version\SAIF.Framework.Version.vbproj