@@ -30,12 +30,7 @@ public readonly struct CSemVer
3030 /// <param name="minor">Minor version value [0-49999]</param>
3131 /// <param name="patch">Patch version value [0-9999]</param>
3232 /// <param name="preRelVersion">Pre-release version information (if a pre-release build)</param>
33- /// <param name="buildMetaData">[Optional]Additional build meta data [default: empty string]</param>
34- /// <remarks>
35- /// This is used internally when converting from a File Version as those only have a single bit
36- /// to indicate if they are a Release/CI build. The rest of the information is lost and therefore
37- /// does not participate in ordering.
38- /// </remarks>
33+ /// <param name="buildMetaData">Any additional build meta data [default: empty string]</param>
3934 public CSemVer ( int major
4035 , int minor
4136 , int patch
@@ -77,8 +72,10 @@ public CSemVer( int major
7772 /// <summary>Gets the <see cref="FileVersionQuad"/> representation of this <see cref="CSemVer"/></summary>
7873 /// <remarks>
7974 /// Since a <see cref="FileVersionQuad"/> is entirely numeric the conversion is somewhat "lossy" but does
80- /// NOT lose any relation to other versions converted. That, is the loss does not include any information
81- /// that impacts build version sort ordering. (any data lost is ignored for sort ordering anyway)
75+ /// NOT lose any relation to other released versions converted. That, is the loss does not include any CI
76+ /// information, only that it was a CI build. Two CI builds with the same base version will produce the
77+ /// same value! CI builds are not intended for long term stability and this is not a bug but a design of
78+ /// how CSemVer (and CSemVer-CI) work to produce a <see cref="FileVersionQuad"/>.
8279 /// </remarks>
8380 public FileVersionQuad FileVersion
8481 {
@@ -119,7 +116,8 @@ public ulong OrderedVersion
119116 /// <summary>Gets a value indicating whether this is a zero based version</summary>
120117 public bool IsZero => Major == 0 && Minor == 0 && Patch == 0 ;
121118
122- /// <inheritdoc/>
119+ /// <summary>Converts the internal representation of this version to a valid CSemVer formatted string</summary>
120+ /// <returns>CSemVer formatted string</returns>
123121 public override string ToString ( )
124122 {
125123 return ConstrainedVersion ? . ToString ( ) ?? string . Empty ;
@@ -183,9 +181,9 @@ public override int GetHashCode( )
183181 /// <returns><see langword="true"/> if the conversion is performed or <see langword="false"/> if not (<paramref name="reason"/> will hold reason it is not successful)</returns>
184182 /// <remarks>
185183 /// While EVERY <see cref="CSemVer"/> conforms to valid <see cref="SemVer"/> the reverse is not always true.
186- /// This method attempts to make a conversion using the classic try pattern with the inclusion of a string
184+ /// This method attempts to make a conversion using the classic try pattern with the inclusion of an exception
187185 /// that explains the reason for any failures. This is useful in debugging or for creating wrappers that will
188- /// throw an exception.
186+ /// throw the exception.
189187 /// </remarks>
190188 public static bool TryFrom (
191189 SemVer ver ,
@@ -273,7 +271,7 @@ public static CSemVer From( UInt64 fileVersion, IReadOnlyCollection<string>? bui
273271 /// <summary>Converts a CSemVer ordered version integral value (UInt64) into a full <see cref="CSemVer"/></summary>
274272 /// <param name="orderedVersion">The ordered version value</param>
275273 /// <param name="buildMetaData">Optional build meta data value for the version</param>
276- /// <returns><see cref="CSemVer"/> corresponding to the ordered version number provided</returns>
274+ /// <returns>Version corresponding to the ordered version number provided</returns>
277275 public static CSemVer FromOrderedVersion ( UInt64 orderedVersion , IReadOnlyCollection < string > ? buildMetaData = null )
278276 {
279277 buildMetaData ??= [ ] ;
@@ -314,7 +312,7 @@ public static CSemVer FromOrderedVersion( UInt64 orderedVersion, IReadOnlyCollec
314312 /// <summary>Factory method to create a <see cref="CSemVer"/> from information available as part of a build</summary>
315313 /// <param name="buildVersionXmlPath">Path to the BuildVersion XML data for the repository</param>
316314 /// <param name="buildMeta">Additional Build meta data for the build</param>
317- /// <returns><see cref="CSemVer"/> </returns>
315+ /// <returns>Version information parsed from the build XML </returns>
318316 public static CSemVer From ( string buildVersionXmlPath , IReadOnlyCollection < string > ? buildMeta )
319317 {
320318 var parsedBuildVersionXml = ParsedBuildVersionXml . ParseFile ( buildVersionXmlPath ) ;
@@ -343,6 +341,9 @@ public static CSemVer Parse( string s, IFormatProvider? provider )
343341 }
344342
345343 /// <inheritdoc/>
344+ /// <remarks>
345+ /// <paramref name="provider"/> is ALWAYS ignored by this implementation. The format is defined by the spec and independent of culture.
346+ /// </remarks>
346347 public static bool TryParse ( [ NotNullWhen ( true ) ] string ? s , IFormatProvider ? provider , [ MaybeNullWhen ( false ) ] out CSemVer result )
347348 {
348349 return TryParse ( s , out result , out _ ) ;
0 commit comments