| MediaWikiVersionParse(String, Boolean) Method |
This is preliminary documentation and is subject to change.
Parses a MediaWiki core version number from its string representation.
Namespace: WikiClientLibraryAssembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax public static MediaWikiVersion Parse(
string version,
bool allowTruncation
)
Public Shared Function Parse (
version As String,
allowTruncation As Boolean
) As MediaWikiVersion
Dim version As String
Dim allowTruncation As Boolean
Dim returnValue As MediaWikiVersion
returnValue = MediaWikiVersion.Parse(version,
allowTruncation)
public:
static MediaWikiVersion Parse(
String^ version,
bool allowTruncation
)
static member Parse :
version : string *
allowTruncation : bool -> MediaWikiVersion
Parameters
- version String
- The version to be parsed.
- allowTruncation Boolean
- Whether allows truncating unknown version suffix (such as -1+deb7u1 in 1.19.5-1+deb7u1).
Return Value
MediaWikiVersionThe parsed version.
Exceptions Exception | Condition |
---|
ArgumentException | version is null or empty. |
FormatException | version is not a valid version expression, such as
- is null, empty, or whitespace.
- has more than 3 version components before the first dash, if any.
- has invalid dev-channel suffix, and suffix truncation is not allowed. See for a list of valid dev-channel suffixes.
- has invalid numeric version components, including failure to parse as number, or arithmetic overflow.
|
See Also