//--------------------------------------------------------------------- /// <summary> /// Initialize a new instance from a system version. /// </summary> public VersionRelease(System.Version systemVersion) { if (systemVersion == null) throw new ArgumentNullException(); this.version = systemVersion; this.release = Release.FromBuildNumber(systemVersion.Build); }
//--------------------------------------------------------------------- /// <summary> /// Initialize a new instance from a version number (major and minor /// components) and a release. /// </summary> public VersionRelease(int major, int minor, Release release) { ValidateVersionParam(major, "major"); ValidateVersionParam(minor, "minor"); if (release == null) throw new ArgumentNullException(); this.version = new System.Version(major, minor, release.BuildNumber); this.release = release; }