Skip to content

Format version string

This operation renders a Version instance's current state as the library's canonical Major.Minor.Build.Revision string. It is a pure read-and-format step: it does not parse, validate, or normalize the stored segment values before emitting them, so whatever text each property currently holds is what the caller receives.

Field Value
Operation ID OP-VER-002
Trigger Caller invokes Version.ToString()
Inputs Current Major, Minor, Build, and Revision property values
Outputs Dot-delimited Major.Minor.Build.Revision string
Primary components Version.ToString()
Entry point SAIF.Framework.Version\Version.vb

Steps

  1. Read the instance's current Major, Minor, Build, and Revision property values.
  2. Substitute those four values into the fixed template "{0}.{1}.{2}.{3}" using String.Format.
  3. No normalization or validation is applied: each stored string is inserted exactly as-is, so any blank or non-numeric content carries through into the formatted result.
  4. Return the formatted string to the caller.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start([Caller invokes ToString]) --> Read[Read current segment values]
    Read --> Format[Substitute into Major.Minor.Build.Revision template]
    Format --> EndOk([Return formatted string])

Failure and edge-case behavior

  • There is no validation branch in this operation; it always emits the four stored segment strings, in order, regardless of their content.
  • Because formatting never calls Parse or ToInt, a segment left blank or set to non-numeric text by an earlier operation remains visible, unaltered, in the output string.

Sources

  • SAIF.Framework.Version\Version.vb