C# Class McSherry.SemanticVersioning.SemanticVersion

Afficher le fichier Open project: McSherry/McSherry.SemanticVersioning Class Usage Examples

Méthodes publiques

Méthode Description
ToString ( string format ) : string

Formats the value of the current SemanticVersion as specified.

For information on the acceptable format specifiers, see the Remarks section of the IFormattable.ToString(string, IFormatProvider) implementation for SemanticVersion.

Private Methods

Méthode Description
IFormattable ( string format, IFormatProvider provider ) : string

Formats the value of the current SemanticVersion as specified.

The format of a Semantic Version is not dependent on culture information, and so the value of provider is ignored.

The value of format should contain one of the below-listed format specifiers. Custom format patterns are not supported. If format is null, the default format specifier, "G", is used in its place.

The list of recognised format specifiers is given in the below table.

Format Specifier Description Example "c" Prefixed concise format. Identical to the concise format ("C"), except prefixed with a lowercase "v".

v1.8

v1.15.1

v2.1-beta.3

"C" Concise format. Omits metadata items, and only includes the Patch version if it is non-zero.

1.8

1.15.1

2.1-beta.3

"g" Prefixed default format. Identical to the default format ("G"), except prefixed with a lowercase "v".

v1.7.0-alpha.2+20150925.f8f2cb1a

v1.2.5

v2.0.1-rc.1

"G", null The default format, as given by the Semantic Versioning 2.0.0 specification.

1.7.0-alpha.2+20150925.f8f2cb1a

1.2.5

2.0.1-rc.1

Method Details

ToString() public méthode

Formats the value of the current SemanticVersion as specified.

For information on the acceptable format specifiers, see the Remarks section of the IFormattable.ToString(string, IFormatProvider) implementation for SemanticVersion.

/// Thrown when the format specifier given in /// is not recognised or is invalid. ///
public ToString ( string format ) : string
format string /// The format to use, or null for the default format. ///
Résultat string