tgstation-server  4.4.0
The /tg/station 13 server suite
VersionExtensions.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace Tgstation.Server.Api
4 {
8  public static class VersionExtensions
9  {
15  public static Version Semver(this Version version)
16  {
17  if (version == null)
18  throw new ArgumentNullException(nameof(version));
19 
20  return new Version(
21  version.Major,
22  version.Minor,
23  version.Build == -1 ? 0 : version.Build);
24  }
25  }
26 }
static Version Semver(this Version version)
Converts a given version into one with only Version.Major, Version.Minor, and Version.Build.
Extensions for the Version .